Browse code

Optimizations and extensions

Benjamin Roth authored on19/01/2017 13:34:46
Showing3 changed files
... ...
@@ -13,6 +13,11 @@ $color-text: #000000;
13 13
 $color-link: #878787;
14 14
 
15 15
 /**
16
+ * Gutters
17
+ */
18
+$gutter-default: 1 / 960 * 30 * 100%;
19
+
20
+/**
16 21
  * Font sizes and defaults
17 22
  */
18 23
 $font-size-default: 16px;
... ...
@@ -14,16 +14,20 @@
14 14
  * Mixins
15 15
  */
16 16
 
17
-@mixin font-awesome {
17
+@mixin iconfont {
18 18
   display: inline-block;
19
-  font: normal normal normal 14px/1 FontAwesome;
20
-  font-size: inherit;
21
-  text-rendering: auto;
19
+  font-family: 'icomoon' !important;
20
+  speak: none;
21
+  font-style: normal;
22
+  font-weight: normal;
23
+  font-variant: normal;
24
+  text-transform: none;
25
+  line-height: 1;
22 26
   -webkit-font-smoothing: antialiased;
23 27
   -moz-osx-font-smoothing: grayscale;
24 28
 }
25 29
 
26
-@mixin fa-text-replacement($height, $width) {
30
+@mixin icon-text-replacement($height, $width) {
27 31
   height: $height;
28 32
   width: $width;
29 33
   padding: 0;
... ...
@@ -37,6 +41,26 @@
37 41
   position: relative;
38 42
 }
39 43
 
44
+@mixin cf {
45
+  &:before,
46
+  &:after {
47
+    content: " "; /* 1 */
48
+    display: table; /* 2 */
49
+  }
50
+
51
+  &:after {
52
+    clear: both;
53
+  }
54
+
55
+  /**
56
+   * For IE 6/7 only
57
+   * Include this rule to trigger hasLayout and contain floats.
58
+   */
59
+  & {
60
+    *zoom: 1;
61
+  }
62
+}
63
+
40 64
 /**
41 65
  * Hide invisible elements
42 66
  */
... ...
@@ -75,23 +99,7 @@ img {
75 99
 .block,
76 100
 #container,
77 101
 .inside {
78
-  &:before,
79
-  &:after {
80
-	content: " "; /* 1 */
81
-	display: table; /* 2 */
82
-  }
83
-
84
-  &:after {
85
-	clear: both;
86
-  }
87
-
88
-  /**
89
-   * For IE 6/7 only
90
-   * Include this rule to trigger hasLayout and contain floats.
91
-   */
92
-  & {
93
-	*zoom: 1;
94
-  }
102
+  @include cf;
95 103
 }
96 104
 
97 105
 @if $load-holy-grail-layout {
... ...
@@ -116,8 +124,11 @@ img {
116 124
  * Standards
117 125
  */
118 126
 
119
-body {
127
+html, body {
120 128
   font: $font-size-default/$line-height-default $font-family;
129
+}
130
+
131
+body {
121 132
   font-weight: $font-weight-default;
122 133
   color: $color-text;
123 134
 }
... ...
@@ -18,6 +18,8 @@ $button-text-color: #ffffff;
18 18
 $button-background-color: #2f67b7;
19 19
 $button-border-color: #082054;
20 20
 $background-color-ro: #eeeeee;
21
+$placeholder-color: #9c8152;
22
+$field-color: #9c8152;
21 23
 
22 24
 // Sizes & Paddings
23 25
 $field-padding: 3px 6px;
... ...
@@ -29,6 +31,9 @@ $button-border-width: 2px;
29 31
 
30 32
 $font-size-field: 16px;
31 33
 
34
+// Font
35
+$font-family-form: "Noto Serif", Arial, Helvetica, FreeSans, sans-serif;
36
+
32 37
 /**
33 38
  * Since fieldset borders are removed in the reset style sheet, adjust the
34 39
  * legends accordingly
... ...
@@ -47,7 +52,26 @@ select {
47 52
   line-height: 150%;
48 53
   outline: none;
49 54
   font-size: $font-size-field;
50
-  font-family: inherit;
55
+  font-family: $font-family-form;
56
+}
57
+
58
+/**
59
+ * Placeholders
60
+ */
61
+::-webkit-input-placeholder {
62
+  color: $placeholder-color;
63
+}
64
+
65
+:-moz-placeholder { /* Firefox 18- */
66
+  color: $placeholder-color;
67
+}
68
+
69
+::-moz-placeholder {  /* Firefox 19+ */
70
+  color: $placeholder-color;
71
+}
72
+
73
+:-ms-input-placeholder {
74
+  color: $placeholder-color;
51 75
 }
52 76
 
53 77
 /**
... ...
@@ -65,6 +89,7 @@ input[type="number"], input[type="search"], input[type="tel"], input[type="time"
65 89
   @include box-shadow(inset 0 1px 1px $shadow-color);
66 90
   @include transition(all .15s linear);
67 91
   @include box-sizing(border-box);
92
+  color: $field-color;
68 93
 
69 94
   &:focus {
70 95
     outline: 0;
... ...
@@ -174,11 +199,24 @@ input[type="submit"], .button, button {
174 199
  * Optional button styles
175 200
  */
176 201
 .button_block input[type="submit"],
177
-.button_block button {
202
+.button_block button,
203
+button.button_block,
204
+.button_block.button {
178 205
   display: block;
179 206
   width: 100%;
180 207
 }
181 208
 
209
+.button_small input[type="submit"],
210
+.button_small button,
211
+button.button_small,
212
+.button_small.button {
213
+  height: 30px;
214
+}
215
+
216
+a.button_small.button {
217
+  line-height: 30px;
218
+}
219
+
182 220
 /**
183 221
  * Checkbox
184 222
  */