styles with scss
authorBruno Trecenti <btrecent@thoughtworks.com>
Mon, 17 Mar 2014 22:19:54 +0000 (19:19 -0300)
committerBruno Trecenti <btrecent@thoughtworks.com>
Mon, 17 Mar 2014 22:20:59 +0000 (19:20 -0300)
examples/default.html
src/stylesheets/_colors.scss [new file with mode: 0644]
src/stylesheets/base.scss [new file with mode: 0644]

index 9a4f485..4bb27ec 100644 (file)
   <script src="../src/models/radar.js"></script>
   <script src="../src/graphing/radar.js"></script>
   <style>
-    body {
-      font: 11px 'Open Sans';
-    }
-    svg {
-      padding: 20px;
-    }
-    svg circle:nth-child(1) {
-      fill: #eaeaea;
-    }
-    svg circle:nth-child(2) {
-      fill: #dadada;
-    }
-    svg circle:nth-child(3) {
-      fill: #cacaca;
-    }
-    svg circle:nth-child(4) {
-      fill: #bababa;
-    }
-    svg text.blip-text {
-      font-size: 9px;
-      font-style: italic;
-      fill: #fff;
-    }
-    svg text.line-text {
-      font-weight: bold;
-      text-transform: uppercase;
-      fill: #000;
-    }
-
-    svg text.tools,
-    svg text.techniques,
-    svg text.platforms,
-    svg text.languages-frameworks {
-      font-weight: bold;
-      text-transform:uppercase;
-      font-size: 16px;
-    }
-    svg line {
-      stroke: rgba(255, 255, 255, 0.3);
-    }
-    svg circle.tools,
-    svg circle.techniques,
-    svg circle.platforms,
-    svg circle.languages-frameworks,
-    svg polygon.tools,
-    svg polygon.techniques,
-    svg polygon.platforms,
-    svg polygon.languages-frameworks {
-      stroke: #fff;
-    }
-    svg .tools { fill: #83AD78 }
-    svg .techniques { fill: #3DB5BE }
-    svg .platforms { fill: #E88744 }
-    svg .languages-frameworks { fill: #8D2145 }
   </style>
 </head>
 <body>
diff --git a/src/stylesheets/_colors.scss b/src/stylesheets/_colors.scss
new file mode 100644 (file)
index 0000000..aa674d7
--- /dev/null
@@ -0,0 +1,15 @@
+$green: #83ad78;
+$blue: #3db5be;
+$orange: #e88744;
+$violet: #8d2145;
+
+$grey-darkest: #bababa;
+$grey-dark: #cacaca;
+$grey: #dadada;
+$grey-light: #eaeaea;
+$grey-lightest: #fafafa;
+
+$white: #fff;
+$black: #000;
+
+$grey-alpha-03: rgba(255, 255, 255, 0.3);
diff --git a/src/stylesheets/base.scss b/src/stylesheets/base.scss
new file mode 100644 (file)
index 0000000..4a59d22
--- /dev/null
@@ -0,0 +1,43 @@
+@import 'colors';
+
+body {
+  font: 9px 'Open Sans';
+}
+
+svg {
+  padding: 20px;
+
+  .first { fill: $green; }
+  .second { fill: $blue; }
+  .third { fill: $orange; }
+  .fourth { fill: $violet; }
+
+  circle {
+    &:nth-child(1) { stroke: none; fill: $grey-light; }
+    &:nth-child(2) { stroke: none; fill: $grey; }
+    &:nth-child(3) { stroke: none; fill: $grey-dark; }
+    &:nth-child(4) { stroke: none; fill: $grey-darkest; }
+  }
+
+  circle, polygon {
+    stroke: $white;
+  }
+
+  line {
+    stroke: $grey-alpha-03;
+  }
+
+  text {
+    .blip-text {
+      font-style: italic;
+      fill: $white;
+    }
+
+    .line-text {
+      font-size: 16px;
+      font-weight: bold;
+      text-transform: uppercase;
+      fill: $black;
+    }
+  }
+}