archetype 0.0.1.pre.1 → 0.0.1.pre.3.00dfd9a

Sign up to get free protection for your applications and to get access to all the features.
Files changed (185) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +88 -0
  3. data/LICENSE +16 -0
  4. data/README.md +87 -1
  5. data/VERSION.yml +6 -0
  6. data/lib/README.rdoc +4 -0
  7. data/lib/archetype.rb +45 -0
  8. data/lib/archetype/functions.rb +9 -0
  9. data/lib/archetype/functions/hash.rb +149 -0
  10. data/lib/archetype/functions/helpers.rb +125 -0
  11. data/lib/archetype/functions/styleguide_memoizer.rb +61 -0
  12. data/lib/archetype/sass_extensions.rb +6 -0
  13. data/lib/archetype/sass_extensions/functions.rb +14 -0
  14. data/lib/archetype/sass_extensions/functions/environment.rb +14 -0
  15. data/lib/archetype/sass_extensions/functions/lists.rb +284 -0
  16. data/lib/archetype/sass_extensions/functions/locale.rb +77 -0
  17. data/lib/archetype/sass_extensions/functions/numbers.rb +19 -0
  18. data/lib/archetype/sass_extensions/functions/styleguide.rb +406 -0
  19. data/lib/archetype/sass_extensions/functions/ui.rb +59 -0
  20. data/lib/archetype/sass_extensions/functions/version.rb +95 -0
  21. data/lib/archetype/version.rb +75 -0
  22. data/stylesheets/_archetype.scss +2 -0
  23. data/stylesheets/archetype/_base.scss +46 -0
  24. data/stylesheets/archetype/_config.scss +366 -0
  25. data/stylesheets/archetype/_grid.scss +3 -0
  26. data/stylesheets/archetype/_hacks.scss +72 -0
  27. data/stylesheets/archetype/_init.scss +23 -0
  28. data/stylesheets/archetype/_styleguide.scss +6 -0
  29. data/stylesheets/archetype/_ui.scss +326 -0
  30. data/stylesheets/archetype/_util.scss +12 -0
  31. data/stylesheets/archetype/base/_h5bp.scss +307 -0
  32. data/stylesheets/archetype/base/_hybrid.scss +25 -0
  33. data/stylesheets/archetype/base/_normalize.scss +595 -0
  34. data/stylesheets/archetype/base/_reset.scss +72 -0
  35. data/stylesheets/archetype/grid/_config.scss +14 -0
  36. data/stylesheets/archetype/grid/_grid.scss +391 -0
  37. data/stylesheets/archetype/styleguide/_components.scss +25 -0
  38. data/stylesheets/archetype/styleguide/_helpers.scss +215 -0
  39. data/stylesheets/archetype/styleguide/_primitives.scss +10 -0
  40. data/stylesheets/archetype/styleguide/_styleguide.scss +41 -0
  41. data/stylesheets/archetype/styleguide/components/_alerts.scss +59 -0
  42. data/stylesheets/archetype/styleguide/components/_annotations.scss +27 -0
  43. data/stylesheets/archetype/styleguide/components/_bristol.scss +15 -0
  44. data/stylesheets/archetype/styleguide/components/_button_groups.scss +47 -0
  45. data/stylesheets/archetype/styleguide/components/_button_toolbars.scss +17 -0
  46. data/stylesheets/archetype/styleguide/components/_buttons.scss +338 -0
  47. data/stylesheets/archetype/styleguide/components/_canvas.scss +15 -0
  48. data/stylesheets/archetype/styleguide/components/_carets.scss +336 -0
  49. data/stylesheets/archetype/styleguide/components/_closes.scss +63 -0
  50. data/stylesheets/archetype/styleguide/components/_container.scss +27 -0
  51. data/stylesheets/archetype/styleguide/components/_copy.scss +85 -0
  52. data/stylesheets/archetype/styleguide/components/_flyouts.scss +52 -0
  53. data/stylesheets/archetype/styleguide/components/_headings.scss +33 -0
  54. data/stylesheets/archetype/styleguide/components/_headlines.scss +63 -0
  55. data/stylesheets/archetype/styleguide/components/_hovercards.scss +27 -0
  56. data/stylesheets/archetype/styleguide/components/_icons.scss +17 -0
  57. data/stylesheets/archetype/styleguide/components/_identities.scss +34 -0
  58. data/stylesheets/archetype/styleguide/components/_links.scss +66 -0
  59. data/stylesheets/archetype/styleguide/components/_loaders.scss +154 -0
  60. data/stylesheets/archetype/styleguide/components/_menu_items.scss +31 -0
  61. data/stylesheets/archetype/styleguide/components/_module.scss +15 -0
  62. data/stylesheets/archetype/styleguide/components/_pullquotes.scss +29 -0
  63. data/stylesheets/archetype/styleguide/components/_punchcut.scss +18 -0
  64. data/stylesheets/archetype/styleguide/components/_tooltips.scss +28 -0
  65. data/stylesheets/archetype/styleguide/primitives/_animations.scss +17 -0
  66. data/stylesheets/archetype/styleguide/primitives/_dimensions.scss +50 -0
  67. data/stylesheets/archetype/styleguide/primitives/_glyphs.scss +11 -0
  68. data/stylesheets/archetype/styleguide/primitives/_misc.scss +8 -0
  69. data/stylesheets/archetype/styleguide/primitives/_palettes.scss +94 -0
  70. data/stylesheets/archetype/styleguide/primitives/_shadows.scss +23 -0
  71. data/stylesheets/archetype/styleguide/primitives/_sprites.scss +46 -0
  72. data/stylesheets/archetype/styleguide/primitives/_textures.scss +10 -0
  73. data/stylesheets/archetype/styleguide/primitives/_typography.scss +56 -0
  74. data/stylesheets/archetype/util/_debug.scss +40 -0
  75. data/stylesheets/archetype/util/_lists.scss +57 -0
  76. data/stylesheets/archetype/util/_misc.scss +108 -0
  77. data/stylesheets/archetype/util/_rtl.scss +279 -0
  78. data/stylesheets/archetype/util/_spacing.scss +78 -0
  79. data/stylesheets/archetype/util/_styles.scss +466 -0
  80. data/stylesheets/archetype/util/_targeting.scss +210 -0
  81. data/stylesheets/archetype/util/_units.scss +18 -0
  82. data/templates/example/index.html +40 -0
  83. data/templates/example/manifest.rb +13 -0
  84. data/templates/example/screen.scss +99 -0
  85. data/templates/example/vendor/archetype/animations/loaders/large/large.png +0 -0
  86. data/templates/example/vendor/archetype/animations/loaders/large/large_dark.png +0 -0
  87. data/templates/example/vendor/archetype/animations/loaders/large/large_dark_static.png +0 -0
  88. data/templates/example/vendor/archetype/animations/loaders/large/large_static.png +0 -0
  89. data/templates/example/vendor/archetype/animations/loaders/medium/medium.png +0 -0
  90. data/templates/example/vendor/archetype/animations/loaders/medium/medium_dark.png +0 -0
  91. data/templates/example/vendor/archetype/animations/loaders/medium/medium_dark_static.png +0 -0
  92. data/templates/example/vendor/archetype/animations/loaders/medium/medium_static.png +0 -0
  93. data/templates/example/vendor/archetype/animations/loaders/small/small.png +0 -0
  94. data/templates/example/vendor/archetype/animations/loaders/small/small_dark.png +0 -0
  95. data/templates/example/vendor/archetype/animations/loaders/small/small_dark_static.png +0 -0
  96. data/templates/example/vendor/archetype/animations/loaders/small/small_static.png +0 -0
  97. data/templates/example/vendor/archetype/fontawesome-webfont.eot +0 -0
  98. data/templates/example/vendor/archetype/fontawesome-webfont.svg +255 -0
  99. data/templates/example/vendor/archetype/fontawesome-webfont.ttf +0 -0
  100. data/templates/example/vendor/archetype/fontawesome-webfont.woff +0 -0
  101. data/templates/project/manifest.rb +9 -0
  102. data/templates/project/screen.scss +1 -0
  103. data/templates/project/vendor/archetype/animations/loaders/large/large.png +0 -0
  104. data/templates/project/vendor/archetype/animations/loaders/large/large_dark.png +0 -0
  105. data/templates/project/vendor/archetype/animations/loaders/large/large_dark_static.png +0 -0
  106. data/templates/project/vendor/archetype/animations/loaders/large/large_static.png +0 -0
  107. data/templates/project/vendor/archetype/animations/loaders/medium/medium.png +0 -0
  108. data/templates/project/vendor/archetype/animations/loaders/medium/medium_dark.png +0 -0
  109. data/templates/project/vendor/archetype/animations/loaders/medium/medium_dark_static.png +0 -0
  110. data/templates/project/vendor/archetype/animations/loaders/medium/medium_static.png +0 -0
  111. data/templates/project/vendor/archetype/animations/loaders/small/small.png +0 -0
  112. data/templates/project/vendor/archetype/animations/loaders/small/small_dark.png +0 -0
  113. data/templates/project/vendor/archetype/animations/loaders/small/small_dark_static.png +0 -0
  114. data/templates/project/vendor/archetype/animations/loaders/small/small_static.png +0 -0
  115. data/templates/project/vendor/archetype/fontawesome-webfont.eot +0 -0
  116. data/templates/project/vendor/archetype/fontawesome-webfont.svg +255 -0
  117. data/templates/project/vendor/archetype/fontawesome-webfont.ttf +0 -0
  118. data/templates/project/vendor/archetype/fontawesome-webfont.woff +0 -0
  119. data/test/fixtures/stylesheets/archetype/assets/fonts/fontawesome-webfont.eot +0 -0
  120. data/test/fixtures/stylesheets/archetype/assets/fonts/fontawesome-webfont.svg +255 -0
  121. data/test/fixtures/stylesheets/archetype/assets/fonts/fontawesome-webfont.ttf +0 -0
  122. data/test/fixtures/stylesheets/archetype/assets/fonts/fontawesome-webfont.woff +0 -0
  123. data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/large/large.png +0 -0
  124. data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/large/large_dark.png +0 -0
  125. data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/large/large_dark_static.png +0 -0
  126. data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/large/large_static.png +0 -0
  127. data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/medium/medium.png +0 -0
  128. data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/medium/medium_dark.png +0 -0
  129. data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/medium/medium_dark_static.png +0 -0
  130. data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/medium/medium_static.png +0 -0
  131. data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/small/small.png +0 -0
  132. data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/small/small_dark.png +0 -0
  133. data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/small/small_dark_static.png +0 -0
  134. data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/small/small_static.png +0 -0
  135. data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/sprites/hovercard_tip.png +0 -0
  136. data/test/fixtures/stylesheets/archetype/config.rb +19 -0
  137. data/test/fixtures/stylesheets/archetype/expected/b.css +14 -0
  138. data/test/fixtures/stylesheets/archetype/expected/base.css +349 -0
  139. data/test/fixtures/stylesheets/archetype/expected/hacks/ie_pseudo.css +11 -0
  140. data/test/fixtures/stylesheets/archetype/expected/locale.css +23 -0
  141. data/test/fixtures/stylesheets/archetype/expected/styleguide/buttons.css +2091 -0
  142. data/test/fixtures/stylesheets/archetype/expected/styleguide/fallback_styles.css +9 -0
  143. data/test/fixtures/stylesheets/archetype/expected/styleguide/nested_styleguides.css +24 -0
  144. data/test/fixtures/stylesheets/archetype/expected/styleguide/selective_state.css +174 -0
  145. data/test/fixtures/stylesheets/archetype/expected/ui/glyph_icon.css +37 -0
  146. data/test/fixtures/stylesheets/archetype/expected/ui/hide_element.css +8 -0
  147. data/test/fixtures/stylesheets/archetype/expected/ui/stroke.css +17 -0
  148. data/test/fixtures/stylesheets/archetype/expected/ui/triangle.css +35 -0
  149. data/test/fixtures/stylesheets/archetype/expected/utilities/associative.css +9 -0
  150. data/test/fixtures/stylesheets/archetype/expected/utilities/if-set.css +9 -0
  151. data/test/fixtures/stylesheets/archetype/expected/utilities/spacing/horizontal-spacing.css +29 -0
  152. data/test/fixtures/stylesheets/archetype/expected/utilities/spacing/vertical-spacing.css +29 -0
  153. data/test/fixtures/stylesheets/archetype/expected/utilities/styles/filter.css +11 -0
  154. data/test/fixtures/stylesheets/archetype/expected/utilities/styles/font-family.css +16 -0
  155. data/test/fixtures/stylesheets/archetype/expected/utilities/styles/z-index.css +15 -0
  156. data/test/fixtures/stylesheets/archetype/expected/utilities/targeting/target-browser.css +100 -0
  157. data/test/fixtures/stylesheets/archetype/expected/utilities/targeting/target-os.css +55 -0
  158. data/test/fixtures/stylesheets/archetype/source/b.scss +9 -0
  159. data/test/fixtures/stylesheets/archetype/source/base.scss +3 -0
  160. data/test/fixtures/stylesheets/archetype/source/hacks/ie_pseudo.scss +13 -0
  161. data/test/fixtures/stylesheets/archetype/source/locale.scss +43 -0
  162. data/test/fixtures/stylesheets/archetype/source/styleguide/buttons.scss +18 -0
  163. data/test/fixtures/stylesheets/archetype/source/styleguide/fallback_styles.scss +22 -0
  164. data/test/fixtures/stylesheets/archetype/source/styleguide/nested_styleguides.scss +40 -0
  165. data/test/fixtures/stylesheets/archetype/source/styleguide/selective_state.scss +22 -0
  166. data/test/fixtures/stylesheets/archetype/source/ui/glyph_icon.scss +13 -0
  167. data/test/fixtures/stylesheets/archetype/source/ui/hide_element.scss +5 -0
  168. data/test/fixtures/stylesheets/archetype/source/ui/stroke.scss +13 -0
  169. data/test/fixtures/stylesheets/archetype/source/ui/triangle.scss +13 -0
  170. data/test/fixtures/stylesheets/archetype/source/utilities/associative.scss +24 -0
  171. data/test/fixtures/stylesheets/archetype/source/utilities/if-set.scss +16 -0
  172. data/test/fixtures/stylesheets/archetype/source/utilities/spacing/horizontal-spacing.scss +27 -0
  173. data/test/fixtures/stylesheets/archetype/source/utilities/spacing/vertical-spacing.scss +27 -0
  174. data/test/fixtures/stylesheets/archetype/source/utilities/styles/filter.scss +9 -0
  175. data/test/fixtures/stylesheets/archetype/source/utilities/styles/font-family.scss +9 -0
  176. data/test/fixtures/stylesheets/archetype/source/utilities/styles/z-index.scss +18 -0
  177. data/test/fixtures/stylesheets/archetype/source/utilities/targeting/target-browser.scss +70 -0
  178. data/test/fixtures/stylesheets/archetype/source/utilities/targeting/target-os.scss +42 -0
  179. data/test/helpers/diff.rb +49 -0
  180. data/test/helpers/io.rb +36 -0
  181. data/test/helpers/test_case.rb +62 -0
  182. data/test/integrations/archetype_test.rb +126 -0
  183. data/test/test_helper.rb +26 -0
  184. data/test/units/sass_extensions_test.rb +207 -0
  185. metadata +303 -15
@@ -0,0 +1,307 @@
1
+ // HTML5 Boilerplate
2
+
3
+ // @category base
4
+
5
+ @mixin base-h5bp-base() {
6
+ /* ==========================================================================
7
+ Base styles: opinionated defaults
8
+ ========================================================================== */
9
+
10
+ html,
11
+ button,
12
+ input,
13
+ select,
14
+ textarea {
15
+ color: #222;
16
+ }
17
+
18
+ body {
19
+ font-size: 1em;
20
+ line-height: 1.4;
21
+ }
22
+
23
+ /*
24
+ * Remove text-shadow in selection highlight: h5bp.com/i
25
+ * These selection declarations have to be separate.
26
+ * Customize the background color to match your design.
27
+ */
28
+
29
+ ::-moz-selection {
30
+ background: #b3d4fc;
31
+ text-shadow: none;
32
+ }
33
+
34
+ ::selection {
35
+ background: #b3d4fc;
36
+ text-shadow: none;
37
+ }
38
+
39
+ /*
40
+ * A better looking default horizontal rule
41
+ */
42
+
43
+ hr {
44
+ display: block;
45
+ height: 1px;
46
+ border: 0;
47
+ border-top: 1px solid #ccc;
48
+ margin: 1em 0;
49
+ padding: 0;
50
+ }
51
+ }
52
+
53
+ @mixin base-h5bp-images() {
54
+ /*
55
+ * Remove the gap between images and the bottom of their containers: h5bp.com/i/440
56
+ */
57
+
58
+ img {
59
+ vertical-align: middle;
60
+ }
61
+ }
62
+
63
+
64
+ @mixin base-h5bp-fieldset() {
65
+ /*
66
+ * Remove default fieldset styles.
67
+ */
68
+
69
+ fieldset {
70
+ border: 0;
71
+ margin: 0;
72
+ padding: 0;
73
+ }
74
+ }
75
+
76
+ @mixin base-h5bp-forms() {
77
+ /*
78
+ * Allow only vertical resizing of textareas.
79
+ */
80
+
81
+ textarea {
82
+ resize: vertical;
83
+ }
84
+ }
85
+
86
+ @mixin base-h5bp-chromeframe() {
87
+ /* ==========================================================================
88
+ Chrome Frame prompt
89
+ ========================================================================== */
90
+
91
+ .chromeframe {
92
+ margin: 0.2em 0;
93
+ background: #ccc;
94
+ color: #000;
95
+ padding: 0.2em 0;
96
+ }
97
+ }
98
+
99
+ @mixin base-h5bp-helpers() {
100
+ /* ==========================================================================
101
+ Helper classes
102
+ ========================================================================== */
103
+
104
+ /*
105
+ * Image replacement
106
+ */
107
+
108
+ .ir {
109
+ background-color: transparent;
110
+ border: 0;
111
+ overflow: hidden;
112
+ /* IE 6/7 fallback */
113
+ *text-indent: -9999px;
114
+ }
115
+
116
+ .ir:before {
117
+ content: "";
118
+ display: block;
119
+ width: 0;
120
+ height: 100%;
121
+ }
122
+
123
+ /*
124
+ * Hide from both screenreaders and browsers: h5bp.com/u
125
+ */
126
+
127
+ .hidden {
128
+ display: none !important;
129
+ visibility: hidden;
130
+ }
131
+
132
+ /*
133
+ * Hide only visually, but have it available for screenreaders: h5bp.com/v
134
+ */
135
+
136
+ .visuallyhidden {
137
+ border: 0;
138
+ clip: rect(0 0 0 0);
139
+ height: 1px;
140
+ margin: -1px;
141
+ overflow: hidden;
142
+ padding: 0;
143
+ position: absolute;
144
+ width: 1px;
145
+ }
146
+
147
+ /*
148
+ * Extends the .visuallyhidden class to allow the element to be focusable
149
+ * when navigated to via the keyboard: h5bp.com/p
150
+ */
151
+
152
+ .visuallyhidden.focusable:active,
153
+ .visuallyhidden.focusable:focus {
154
+ clip: auto;
155
+ height: auto;
156
+ margin: 0;
157
+ overflow: visible;
158
+ position: static;
159
+ width: auto;
160
+ }
161
+
162
+ /*
163
+ * Hide visually and from screenreaders, but maintain layout
164
+ */
165
+
166
+ .invisible {
167
+ visibility: hidden;
168
+ }
169
+
170
+ /*
171
+ * Clearfix: contain floats
172
+ *
173
+ * For modern browsers
174
+ * 1. The space content is one way to avoid an Opera bug when the
175
+ * `contenteditable` attribute is included anywhere else in the document.
176
+ * Otherwise it causes space to appear at the top and bottom of elements
177
+ * that receive the `clearfix` class.
178
+ * 2. The use of `table` rather than `block` is only necessary if using
179
+ * `:before` to contain the top-margins of child elements.
180
+ */
181
+
182
+ .clearfix:before,
183
+ .clearfix:after {
184
+ content: " "; /* 1 */
185
+ display: table; /* 2 */
186
+ }
187
+
188
+ .clearfix:after {
189
+ clear: both;
190
+ }
191
+
192
+ /*
193
+ * For IE 6/7 only
194
+ * Include this rule to trigger hasLayout and contain floats.
195
+ */
196
+
197
+ .clearfix {
198
+ *zoom: 1;
199
+ }
200
+ }
201
+
202
+ @mixin base-h5bp-print() {
203
+ /* ==========================================================================
204
+ Print styles.
205
+ Inlined to avoid required HTTP connection: h5bp.com/r
206
+ ========================================================================== */
207
+ @media print {
208
+ * {
209
+ background: transparent !important;
210
+ color: #000 !important; /* Black prints faster: h5bp.com/s */
211
+ box-shadow: none !important;
212
+ text-shadow: none !important;
213
+ }
214
+
215
+ a,
216
+ a:visited {
217
+ text-decoration: underline;
218
+ }
219
+
220
+ a[href]:after {
221
+ content: " (" attr(href) ")";
222
+ }
223
+
224
+ abbr[title]:after {
225
+ content: " (" attr(title) ")";
226
+ }
227
+
228
+ /*
229
+ * Don't show links for images, or javascript/internal links
230
+ */
231
+
232
+ .ir a:after,
233
+ a[href^="javascript:"]:after,
234
+ a[href^="#"]:after {
235
+ content: "";
236
+ }
237
+
238
+ pre,
239
+ blockquote {
240
+ border: 1px solid #999;
241
+ page-break-inside: avoid;
242
+ }
243
+
244
+ thead {
245
+ display: table-header-group; /* h5bp.com/t */
246
+ }
247
+
248
+ tr,
249
+ img {
250
+ page-break-inside: avoid;
251
+ }
252
+
253
+ img {
254
+ max-width: 100% !important;
255
+ }
256
+
257
+ @page {
258
+ margin: 0.5cm;
259
+ }
260
+
261
+ p,
262
+ h2,
263
+ h3 {
264
+ orphans: 3;
265
+ widows: 3;
266
+ }
267
+
268
+ h2,
269
+ h3 {
270
+ page-break-after: avoid;
271
+ }
272
+ }
273
+ }
274
+
275
+ // HTML5 Boilerplate reset
276
+ // @mixin base-h5bp
277
+ // @param $exclude {List} the list of features to exclude from the reset
278
+ // @link https://github.com/h5bp/html5-boilerplate/
279
+ @mixin base-h5bp($exclude: ()) {
280
+ /*! HTML5 Boilerplate | MIT License | @b378ce239d */
281
+ /*
282
+ * HTML5 Boilerplate
283
+ *
284
+ * What follows is the result of much research on cross-browser styling.
285
+ * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
286
+ * Kroc Camen, and the H5BP dev community and team.
287
+ */
288
+ $exclude: -compass-list($exclude);
289
+ @if(not index($exclude, h5bp-base)) {
290
+ @include base-h5bp-base();
291
+ }
292
+ @if(not index($exclude, h5bp-images)) {
293
+ @include base-h5bp-images();
294
+ }
295
+ @if(not index($exclude, h5bp-forms)) {
296
+ @include base-h5bp-forms();
297
+ }
298
+ @if(not index($exclude, h5bp-chromeframe)) {
299
+ @include base-h5bp-chromeframe();
300
+ }
301
+ @if(not index($exclude, h5bp-helpers)) {
302
+ @include base-h5bp-helpers();
303
+ }
304
+ @if(not index($exclude, h5bp-print)) {
305
+ @include base-h5bp-print();
306
+ }
307
+ }
@@ -0,0 +1,25 @@
1
+ // @category base
2
+ @import "normalize";
3
+ @import "reset";
4
+ @import "h5bp";
5
+
6
+ // hybrid method for reset using both a global reset as well as some normalize features
7
+ // @mixin base-hybrid
8
+ // @param $exclude {List} the list of features to exclude from the reset
9
+ @mixin base-hybrid($exclude: ()) {
10
+ $exclude: -compass-list($exclude);
11
+ // start with a reset
12
+ @if not index($exclude, reset) {
13
+ @include base-reset($exclude: $exclude);
14
+ }
15
+
16
+ // add in some good stuff from normalize
17
+ @if not index($exclude, normalize) {
18
+ @include base-normalize($exclude: join(normalize-html5 normalize-page normalize-typography normalize-quotes normalize-lists normalize-embeds normalize-figures normalize-tables normalize-ime, $exclude));
19
+ }
20
+
21
+ // and some boilerplate
22
+ @if not index($exclude, h5bp) {
23
+ @include base-h5bp($exclude: $exclude);
24
+ }
25
+ }
@@ -0,0 +1,595 @@
1
+ // normalize.css v2.0.1 | MIT License | git.io/normalize
2
+
3
+ // @category base
4
+ @mixin base-normalize-html5() {
5
+ /* ==========================================================================
6
+ HTML5 display definitions
7
+ ========================================================================== */
8
+
9
+ /*
10
+ * Corrects `block` display not defined in IE 8/9.
11
+ */
12
+
13
+ article,
14
+ aside,
15
+ details,
16
+ figcaption,
17
+ figure,
18
+ footer,
19
+ header,
20
+ hgroup,
21
+ nav,
22
+ section,
23
+ summary {
24
+ display: block;
25
+ }
26
+
27
+ /*
28
+ * Corrects `inline-block` display not defined in IE 8/9.
29
+ */
30
+
31
+ audio,
32
+ canvas,
33
+ video {
34
+ @include inline-block();
35
+ }
36
+
37
+ /*
38
+ * Prevents modern browsers from displaying `audio` without controls.
39
+ * Remove excess height in iOS 5 devices.
40
+ */
41
+
42
+ audio:not([controls]) {
43
+ display: none;
44
+ height: 0;
45
+ }
46
+
47
+ /*
48
+ * Addresses styling for `hidden` attribute not present in IE 8/9.
49
+ */
50
+
51
+ [hidden] {
52
+ display: none;
53
+ }
54
+ }
55
+
56
+ @mixin base-normalize-text-adjust() {
57
+ /*
58
+ * 0. Corrects text resizing oddly in IE6/7 when body font-size is set using em units
59
+ * http://clagnut.com/blog/348/#c790
60
+ * 1. Sets default font family to sans-serif.
61
+ * 2. Prevents iOS text size adjust after orientation change, without disabling user zoom
62
+ * www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/
63
+ */
64
+ html {
65
+ // legacy
66
+ @if $legacy-support-for-ie7 or $legacy-support-for-ie6 {
67
+ font-size: 100%; /* 0 */
68
+ }
69
+ font-family: sans-serif; /* 1 */
70
+ -webkit-text-size-adjust: 100%; /* 2 */
71
+ -ms-text-size-adjust: 100%; /* 2 */
72
+ }
73
+
74
+ }
75
+
76
+ @mixin base-normalize-page() {
77
+ /* =============================================================================
78
+ Base
79
+ ========================================================================== */
80
+
81
+ /*
82
+ * Removes default margin.
83
+ */
84
+
85
+ body {
86
+ margin: 0;
87
+ }
88
+ }
89
+
90
+ @mixin base-normalize-links() {
91
+ /* ==========================================================================
92
+ Links
93
+ ========================================================================== */
94
+
95
+ /*
96
+ * Addresses `outline` inconsistency between Chrome and other browsers.
97
+ */
98
+
99
+ a:focus {
100
+ outline: thin dotted;
101
+ }
102
+
103
+ /*
104
+ * Improves readability when focused and also mouse hovered in all browsers.
105
+ */
106
+
107
+ a:active,
108
+ a:hover {
109
+ outline: 0;
110
+ }
111
+ }
112
+
113
+ @mixin base-normalize-typogrpahy-core() {
114
+ /*
115
+ * Corrects font family set oddly in Safari 5 and Chrome.
116
+ */
117
+
118
+ code,
119
+ kbd,
120
+ pre,
121
+ samp {
122
+ font-family: monospace, serif;
123
+ font-size: 1em;
124
+ }
125
+
126
+ /*
127
+ * Improves readability of pre-formatted text in all browsers.
128
+ */
129
+
130
+ pre {
131
+ white-space: pre;
132
+ white-space: pre-wrap;
133
+ word-wrap: break-word;
134
+ }
135
+
136
+
137
+ /*
138
+ * Addresses inconsistent and variable font size in all browsers.
139
+ */
140
+
141
+ small {
142
+ font-size: 80%;
143
+ }
144
+
145
+ /*
146
+ * Prevents `sub` and `sup` affecting `line-height` in all browsers.
147
+ */
148
+
149
+ sub,
150
+ sup {
151
+ font-size: 75%;
152
+ line-height: 0;
153
+ position: relative;
154
+ vertical-align: baseline;
155
+ }
156
+
157
+ sup {
158
+ top: -0.5em;
159
+ }
160
+
161
+ sub {
162
+ bottom: -0.25em;
163
+ }
164
+ }
165
+
166
+ @mixin base-normalize-typography() {
167
+ /* =============================================================================
168
+ Typography
169
+ ========================================================================== */
170
+
171
+ /*
172
+ * Addresses font sizes and margins set differently in IE6/7
173
+ * Addresses font sizes within 'section' and 'article' in FF4+, Chrome, S5
174
+ */
175
+
176
+ h1 {
177
+ font-size: 2em;
178
+ margin: 0.67em 0;
179
+ }
180
+
181
+ h2 {
182
+ font-size: 1.5em;
183
+ margin: 0.83em 0;
184
+ }
185
+
186
+ h3 {
187
+ font-size: 1.17em;
188
+ margin: 1em 0;
189
+ }
190
+
191
+ h4 {
192
+ font-size: 1em;
193
+ margin: 1.33em 0;
194
+ }
195
+
196
+ h5 {
197
+ font-size: 0.83em;
198
+ margin: 1.67em 0;
199
+ }
200
+
201
+ h6 {
202
+ font-size: 0.75em;
203
+ margin: 2.33em 0;
204
+ }
205
+
206
+ /*
207
+ * Addresses styling not present in IE 8/9, Safari 5, and Chrome.
208
+ */
209
+
210
+ abbr[title] {
211
+ border-bottom: 1px dotted;
212
+ }
213
+
214
+ /*
215
+ * Addresses style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
216
+ */
217
+
218
+ b,
219
+ strong {
220
+ font-weight: bold;
221
+ }
222
+ /*
223
+ * Addresses styling not present in Safari 5 and Chrome.
224
+ */
225
+
226
+ dfn {
227
+ font-style: italic;
228
+ }
229
+
230
+ /*
231
+ * Addresses styling not present in IE 8/9.
232
+ */
233
+
234
+ mark {
235
+ background: #ff0;
236
+ color: #000;
237
+ }
238
+
239
+ blockquote {
240
+ margin: 1em 40px;
241
+ }
242
+
243
+ /*
244
+ * Addresses margins set differently in IE6/7
245
+ */
246
+
247
+ p,
248
+ pre {
249
+ margin: 1em 0;
250
+ }
251
+ }
252
+
253
+ @mixin base-normalize-quotes() {
254
+ /*
255
+ * Sets consistent quote types.
256
+ */
257
+ q {
258
+ quotes: "\201C" "\201D" "\2018" "\2019";
259
+ }
260
+ }
261
+
262
+ @mixin base-normalize-lists() {
263
+ // legacy
264
+ @if $legacy-support-for-ie7 or $legacy-support-for-ie6 {
265
+ /* =============================================================================
266
+ Lists
267
+ ========================================================================== */
268
+
269
+ /*
270
+ * Addresses margins set differently in IE6/7
271
+ */
272
+
273
+ dl,
274
+ menu,
275
+ ol,
276
+ ul {
277
+ margin: 1em 0;
278
+ }
279
+
280
+ dd {
281
+ margin: 0 0 0 40px;
282
+ }
283
+
284
+ /*
285
+ * Addresses paddings set differently in IE6/7
286
+ */
287
+
288
+ menu,
289
+ ol,
290
+ ul {
291
+ padding: 0 0 0 40px;
292
+ }
293
+
294
+ /*
295
+ * Corrects list images handled incorrectly in IE7
296
+ */
297
+
298
+ nav ul,
299
+ nav ol {
300
+ list-style: none;
301
+ list-style-image: none;
302
+ }
303
+ }
304
+ }
305
+
306
+ @mixin base-normalize-image() {
307
+ /*
308
+ * 1. Removes border when inside 'a' element in IE6/7/8/9, FF3
309
+ * 2. Improves image quality when scaled in IE7
310
+ * code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/
311
+ */
312
+
313
+ img {
314
+ border: 0; /* 1 */
315
+ // legacy
316
+ @if $legacy-support-for-ie7 or $legacy-support-for-ie6 {
317
+ -ms-interpolation-mode: bicubic; /* 2 */
318
+ }
319
+ }
320
+ }
321
+
322
+ @mixin base-normalize-embed() {
323
+ /* =============================================================================
324
+ Embedded content
325
+ ========================================================================== */
326
+ @include base-normalize-image();
327
+
328
+ /*
329
+ * Corrects overflow displayed oddly in IE9
330
+ */
331
+
332
+ svg:not(:root) {
333
+ overflow: hidden;
334
+ }
335
+ }
336
+
337
+ @mixin base-normalize-figures() {
338
+ /* =============================================================================
339
+ Figures
340
+ ========================================================================== */
341
+
342
+ /*
343
+ * Addresses margin not present in IE6/7/8/9, S5, O11
344
+ */
345
+
346
+ figure {
347
+ margin: 0;
348
+ }
349
+ }
350
+
351
+ @mixin base-normalize-fieldset() {
352
+ /*
353
+ * Define consistent border, margin, and padding.
354
+ */
355
+
356
+ fieldset {
357
+ border: 1px solid #c0c0c0;
358
+ margin: 0 2px;
359
+ padding: 0.35em 0.625em 0.75em;
360
+ }
361
+ }
362
+
363
+ @mixin base-normalize-forms() {
364
+ /* =============================================================================
365
+ Forms
366
+ ========================================================================== */
367
+
368
+ /*
369
+ * Corrects margin displayed oddly in IE6/7
370
+ */
371
+
372
+ form {
373
+ margin: 0;
374
+ }
375
+
376
+ /*
377
+ * 1. Corrects color not being inherited in IE6/7/8/9
378
+ * 2. Corrects text not wrapping in FF3
379
+ * 3. Corrects alignment displayed oddly in IE6/7
380
+ */
381
+
382
+ legend {
383
+ border: 0; /* 1 */
384
+ padding: 0;
385
+ white-space: normal; /* 2 */
386
+ // legacy
387
+ @if $legacy-support-for-ie7 or $legacy-support-for-ie6 {
388
+ *margin-left: -7px; /* 3 */
389
+ }
390
+ }
391
+
392
+ /*
393
+ * 1. Corrects font family not being inherited in all browsers.
394
+ * 2. Corrects font size not being inherited in all browsers.
395
+ * 3. Addresses margins set differently in Firefox 4+, Safari 5, and Chrome
396
+ * 4. Improves appearance and consistency in all browsers
397
+ */
398
+
399
+ button,
400
+ input,
401
+ select,
402
+ textarea {
403
+ font-family: inherit; /* 1 */
404
+ font-size: 100%; /* 2 */
405
+ margin: 0; /* 3 */
406
+ vertical-align: baseline; /* 4 */
407
+ // legacy
408
+ @if $legacy-support-for-ie7 or $legacy-support-for-ie6 {
409
+ *vertical-align: middle; /* 4 */
410
+ }
411
+ }
412
+
413
+ /*
414
+ * Addresses FF3/4 setting line-height on 'input' using !important in the UA stylesheet
415
+ */
416
+
417
+ button,
418
+ input {
419
+ line-height: normal; /* 1 */
420
+ }
421
+
422
+ /*
423
+ * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
424
+ * and `video` controls.
425
+ * 2. Corrects inability to style clickable `input` types in iOS.
426
+ * 3. Improves usability and consistency of cursor style between image-type
427
+ * `input` and others.
428
+ * 4. Removes inner spacing in IE7 without affecting normal text inputs
429
+ */
430
+
431
+ button,
432
+ html input[type="button"], /* 1 */
433
+ input[type="reset"],
434
+ input[type="submit"] {
435
+ -webkit-appearance: button; /* 2 */
436
+ cursor: pointer; /* 3 */
437
+ // legacy
438
+ @if $legacy-support-for-ie7 or $legacy-support-for-ie6 {
439
+ *overflow: visible; /* 4 */
440
+ }
441
+ }
442
+
443
+ /*
444
+ * Re-set default cursor for disabled elements.
445
+ */
446
+
447
+ button[disabled],
448
+ input[disabled] {
449
+ cursor: default;
450
+ }
451
+
452
+ /*
453
+ * 1. Addresses box sizing set to `content-box` in IE 8/9.
454
+ * 2. Removes excess padding in IE 8/9.
455
+ * 3. Removes excess padding in IE7
456
+ Known issue: excess padding remains in IE6
457
+ */
458
+
459
+ input[type="checkbox"],
460
+ input[type="radio"] {
461
+ box-sizing: border-box; /* 1 */
462
+ padding: 0; /* 2 */
463
+ // legacy
464
+ @if $legacy-support-for-ie7 or $legacy-support-for-ie6 {
465
+ *height: 13px; /* 3 */
466
+ *width: 13px; /* 3 */
467
+ }
468
+ }
469
+
470
+ /*
471
+ * 1. Addresses `appearance` set to `searchfield` in Safari 5 and Chrome.
472
+ * 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome
473
+ * (include `-moz` to future-proof).
474
+ */
475
+
476
+ input[type="search"] {
477
+ -webkit-appearance: textfield; /* 1 */
478
+ -moz-box-sizing: content-box;
479
+ -webkit-box-sizing: content-box; /* 2 */
480
+ box-sizing: content-box;
481
+ }
482
+
483
+
484
+ /*
485
+ * Removes inner padding and search cancel button in Safari 5 and Chrome
486
+ * on OS X.
487
+ */
488
+
489
+ input[type="search"]::-webkit-search-cancel-button,
490
+ input[type="search"]::-webkit-search-decoration {
491
+ -webkit-appearance: none;
492
+ }
493
+
494
+
495
+ /*
496
+ * Removes inner padding and border in Firefox 4+.
497
+ */
498
+
499
+ button::-moz-focus-inner,
500
+ input::-moz-focus-inner {
501
+ border: 0;
502
+ padding: 0;
503
+ }
504
+
505
+ /*
506
+ * 1. Removes default vertical scrollbar in IE6/7/8/9
507
+ * 2. Improves readability and alignment in all browsers
508
+ */
509
+
510
+ textarea {
511
+ overflow: auto; /* 1 */
512
+ vertical-align: top; /* 2 */
513
+ }
514
+
515
+ }
516
+
517
+ @mixin base-normalize-ime() {
518
+ /* =============================================================================
519
+ IME mode
520
+ ========================================================================== */
521
+ input[data-ime-mode-disabled],
522
+ input[type=file] {
523
+ ime-mode: disabled !important;
524
+ }
525
+ }
526
+
527
+ @mixin base-normalize-table() {
528
+ /* ==========================================================================
529
+ Tables
530
+ ========================================================================== */
531
+
532
+ /*
533
+ * Remove most spacing between table cells.
534
+ */
535
+
536
+ table {
537
+ border-collapse: collapse;
538
+ border-spacing: 0;
539
+ }
540
+ }
541
+
542
+ // -------------------------
543
+ // base-normalize() provides the main entry point to incorporate the behaviors of normalize.css onto the page.
544
+ // @mixin base-normalize
545
+ // @param $exclude {List} the list of features to exclude from the reset
546
+ // @link http://github.com/necolas/normalize.css
547
+ @mixin base-normalize($exclude: ()) {
548
+ /*! normalize.css v2.0.1 | MIT License | git.io/normalize */
549
+ $exclude: -compass-list($exclude);
550
+ @if(not index($exclude, normalize-html5)) {
551
+ @include base-normalize-html5();
552
+ }
553
+ @if(not index($exclude, normalize-text-adjust)) {
554
+ @include base-normalize-text-adjust();
555
+ }
556
+ @if(not index($exclude, normalize-page)) {
557
+ @include base-normalize-page();
558
+ }
559
+ @if(not index($exclude, normalize-links)) {
560
+ @include base-normalize-links();
561
+ }
562
+ @if(not index($exclude, normalize-typography)) {
563
+ @include base-normalize-typography();
564
+ }
565
+ @if(not index($exclude, normalize-typography-core)) {
566
+ @include base-normalize-typogrpahy-core();
567
+ }
568
+ @if(not index($exclude, normalize-quotes)) {
569
+ @include base-normalize-quotes();
570
+ }
571
+ @if(not index($exclude, normalize-lists)) {
572
+ @include base-normalize-lists();
573
+ }
574
+ @if(not index($exclude, normalize-image)) {
575
+ @include base-normalize-image();
576
+ }
577
+ @if(not index($exclude, normalize-embeds)) {
578
+ @include base-normalize-embed();
579
+ }
580
+ @if(not index($exclude, normalize-figures)) {
581
+ @include base-normalize-figures();
582
+ }
583
+ @if(not index($exclude, normalize-forms)) {
584
+ @include base-normalize-forms();
585
+ }
586
+ @if(not index($exclude, normalize-fieldset)) {
587
+ @include base-normalize-fieldset();
588
+ }
589
+ @if(not index($exclude, normalize-tables)) {
590
+ @include base-normalize-table();
591
+ }
592
+ @if(not index($exclude, normalize-ime)) {
593
+ @include base-normalize-ime();
594
+ }
595
+ }