archetype 0.0.1.pre.13 → 1.0.0.alpha.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (253) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +97 -24
  3. data/README.md +11 -5
  4. data/VERSION +1 -0
  5. data/lib/archetype.rb +30 -18
  6. data/lib/archetype/actions/migrate.rb +152 -0
  7. data/lib/archetype/actions/theme.rb +6 -7
  8. data/lib/archetype/executor.rb +21 -7
  9. data/lib/archetype/extensions.rb +57 -0
  10. data/lib/archetype/functions.rb +2 -3
  11. data/lib/archetype/functions/css.rb +70 -0
  12. data/lib/archetype/functions/css/constants.rb +247 -0
  13. data/lib/archetype/functions/css/helpers.rb +265 -0
  14. data/lib/archetype/functions/css/routers.rb +28 -0
  15. data/lib/archetype/functions/css/routers/animation.rb +55 -0
  16. data/lib/archetype/functions/css/routers/background.rb +38 -0
  17. data/lib/archetype/functions/css/routers/border.rb +151 -0
  18. data/lib/archetype/functions/css/routers/list.rb +63 -0
  19. data/lib/archetype/functions/css/routers/margin_padding.rb +40 -0
  20. data/lib/archetype/functions/css/routers/outline.rb +56 -0
  21. data/lib/archetype/functions/css/routers/overflow.rb +11 -0
  22. data/lib/archetype/functions/css/routers/target.rb +38 -0
  23. data/lib/archetype/functions/css/routers/transition.rb +48 -0
  24. data/lib/archetype/functions/css/shorthands.rb +43 -0
  25. data/lib/archetype/functions/css/shorthands/animation.rb +18 -0
  26. data/lib/archetype/functions/css/shorthands/background.rb +68 -0
  27. data/lib/archetype/functions/css/shorthands/border.rb +102 -0
  28. data/lib/archetype/functions/hash.rb +3 -149
  29. data/lib/archetype/functions/hash/extend.rb +74 -0
  30. data/lib/archetype/functions/hash/shim.rb +48 -0
  31. data/lib/archetype/functions/helpers.rb +231 -22
  32. data/lib/archetype/functions/styleguide_memoizer.rb +18 -1
  33. data/lib/archetype/sass_extensions.rb +1 -3
  34. data/lib/archetype/sass_extensions/functions.rb +15 -1
  35. data/lib/archetype/sass_extensions/functions/environment.rb +152 -1
  36. data/lib/archetype/sass_extensions/functions/lists.rb +95 -45
  37. data/lib/archetype/sass_extensions/functions/locale.rb +107 -28
  38. data/lib/archetype/sass_extensions/functions/numbers.rb +118 -4
  39. data/lib/archetype/sass_extensions/functions/strings.rb +53 -0
  40. data/lib/archetype/sass_extensions/functions/styleguide.rb +43 -375
  41. data/lib/archetype/sass_extensions/functions/styleguide/components.rb +25 -0
  42. data/lib/archetype/sass_extensions/functions/styleguide/constants.rb +27 -0
  43. data/lib/archetype/sass_extensions/functions/styleguide/grammar.rb +80 -0
  44. data/lib/archetype/sass_extensions/functions/styleguide/helpers.rb +36 -0
  45. data/lib/archetype/sass_extensions/functions/styleguide/resolve.rb +159 -0
  46. data/lib/archetype/sass_extensions/functions/styleguide/styles.rb +146 -0
  47. data/lib/archetype/sass_extensions/functions/styleguide/themes.rb +40 -0
  48. data/lib/archetype/sass_extensions/functions/ui.rb +7 -57
  49. data/lib/archetype/sass_extensions/functions/ui/glyphs.rb +118 -0
  50. data/lib/archetype/sass_extensions/functions/ui/scopes.rb +96 -0
  51. data/lib/archetype/sass_extensions/functions/util.rb +14 -0
  52. data/lib/archetype/sass_extensions/functions/util/debug.rb +22 -0
  53. data/lib/archetype/sass_extensions/functions/util/hacks.rb +44 -0
  54. data/lib/archetype/sass_extensions/functions/util/images.rb +132 -0
  55. data/lib/archetype/sass_extensions/functions/util/misc.rb +220 -0
  56. data/lib/archetype/sass_extensions/functions/util/spacing.rb +83 -0
  57. data/lib/archetype/sass_extensions/functions/version.rb +12 -17
  58. data/lib/archetype/version.rb +1 -1
  59. data/stylesheets/archetype/_config.scss +1 -389
  60. data/stylesheets/archetype/_core.scss +15 -0
  61. data/stylesheets/archetype/_hacks.scss +4 -120
  62. data/stylesheets/archetype/_init.scss +4 -22
  63. data/stylesheets/archetype/_required.scss +3 -0
  64. data/stylesheets/archetype/_reset.scss +3 -0
  65. data/stylesheets/archetype/_styleguide.scss +2 -6
  66. data/stylesheets/archetype/_ui.scss +2 -358
  67. data/stylesheets/archetype/_util.scss +3 -10
  68. data/stylesheets/archetype/config/_core.scss +14 -0
  69. data/stylesheets/archetype/config/_environment.scss +19 -0
  70. data/stylesheets/archetype/config/_formatting.scss +63 -0
  71. data/stylesheets/archetype/config/_glyphs.scss +252 -0
  72. data/stylesheets/archetype/config/_resets.scss +7 -0
  73. data/stylesheets/archetype/config/_resolution.scss +3 -0
  74. data/stylesheets/archetype/config/_spacing.scss +5 -0
  75. data/stylesheets/archetype/config/_targeting.scss +18 -0
  76. data/stylesheets/archetype/config/_theme.scss +3 -0
  77. data/stylesheets/archetype/config/_typography.scss +56 -0
  78. data/stylesheets/archetype/config/_units.scss +2 -0
  79. data/stylesheets/archetype/config/_vars.scss +10 -0
  80. data/stylesheets/archetype/hacks/_core.scss +4 -0
  81. data/stylesheets/archetype/hacks/_hacks.scss +160 -0
  82. data/stylesheets/archetype/hacks/_init.scss +2 -0
  83. data/stylesheets/archetype/styleguide/_core.scss +4 -0
  84. data/stylesheets/archetype/styleguide/_init.scss +1 -0
  85. data/stylesheets/archetype/styleguide/_styleguide.scss +41 -18
  86. data/stylesheets/archetype/ui/_accessibility.scss +41 -0
  87. data/stylesheets/archetype/ui/_breakpoints.scss +19 -0
  88. data/stylesheets/archetype/ui/_core.scss +10 -0
  89. data/stylesheets/archetype/ui/_elements.scss +98 -0
  90. data/stylesheets/archetype/ui/_glyphs.scss +244 -0
  91. data/stylesheets/archetype/ui/_init.scss +5 -0
  92. data/stylesheets/archetype/ui/_layout.scss +37 -0
  93. data/stylesheets/archetype/ui/_locale.scss +12 -0
  94. data/stylesheets/archetype/ui/_scopes.scss +42 -0
  95. data/stylesheets/archetype/util/_core.scss +8 -0
  96. data/stylesheets/archetype/util/_debug.scss +9 -21
  97. data/stylesheets/archetype/util/_init.scss +1 -0
  98. data/stylesheets/archetype/util/_misc.scss +21 -86
  99. data/stylesheets/archetype/util/_spacing.scss +9 -40
  100. data/stylesheets/archetype/util/_styles.scss +189 -178
  101. data/stylesheets/archetype/util/_targeting.scss +51 -68
  102. data/templates/example/manifest.rb +2 -2
  103. data/templates/example/screen.scss +0 -1
  104. data/templates/project/manifest.rb +3 -8
  105. metadata +93 -263
  106. data/bin/archetype +0 -3
  107. data/lib/archetype/sass_extensions/monkey_patches.rb +0 -3
  108. data/lib/archetype/sass_extensions/monkey_patches/handle_include_loop.rb +0 -13
  109. data/stylesheets/archetype/_base.scss +0 -54
  110. data/stylesheets/archetype/_grid.scss +0 -3
  111. data/stylesheets/archetype/base/_h5bp.scss +0 -307
  112. data/stylesheets/archetype/base/_hybrid.scss +0 -25
  113. data/stylesheets/archetype/base/_normalize.scss +0 -634
  114. data/stylesheets/archetype/base/_reset.scss +0 -72
  115. data/stylesheets/archetype/grid/_config.scss +0 -14
  116. data/stylesheets/archetype/grid/_grid.scss +0 -391
  117. data/stylesheets/archetype/styleguide/_components.scss +0 -25
  118. data/stylesheets/archetype/styleguide/_helpers.scss +0 -215
  119. data/stylesheets/archetype/styleguide/_primitives.scss +0 -10
  120. data/stylesheets/archetype/styleguide/components/_alerts.scss +0 -59
  121. data/stylesheets/archetype/styleguide/components/_annotations.scss +0 -27
  122. data/stylesheets/archetype/styleguide/components/_bristol.scss +0 -15
  123. data/stylesheets/archetype/styleguide/components/_button_groups.scss +0 -47
  124. data/stylesheets/archetype/styleguide/components/_button_toolbars.scss +0 -17
  125. data/stylesheets/archetype/styleguide/components/_buttons.scss +0 -339
  126. data/stylesheets/archetype/styleguide/components/_canvas.scss +0 -15
  127. data/stylesheets/archetype/styleguide/components/_carets.scss +0 -336
  128. data/stylesheets/archetype/styleguide/components/_closes.scss +0 -63
  129. data/stylesheets/archetype/styleguide/components/_container.scss +0 -27
  130. data/stylesheets/archetype/styleguide/components/_copy.scss +0 -85
  131. data/stylesheets/archetype/styleguide/components/_flyouts.scss +0 -52
  132. data/stylesheets/archetype/styleguide/components/_headings.scss +0 -33
  133. data/stylesheets/archetype/styleguide/components/_headlines.scss +0 -64
  134. data/stylesheets/archetype/styleguide/components/_hovercards.scss +0 -27
  135. data/stylesheets/archetype/styleguide/components/_icons.scss +0 -17
  136. data/stylesheets/archetype/styleguide/components/_identities.scss +0 -34
  137. data/stylesheets/archetype/styleguide/components/_links.scss +0 -68
  138. data/stylesheets/archetype/styleguide/components/_loaders.scss +0 -154
  139. data/stylesheets/archetype/styleguide/components/_menu_items.scss +0 -31
  140. data/stylesheets/archetype/styleguide/components/_module.scss +0 -15
  141. data/stylesheets/archetype/styleguide/components/_pullquotes.scss +0 -29
  142. data/stylesheets/archetype/styleguide/components/_punchcut.scss +0 -18
  143. data/stylesheets/archetype/styleguide/components/_tooltips.scss +0 -28
  144. data/stylesheets/archetype/styleguide/primitives/_animations.scss +0 -17
  145. data/stylesheets/archetype/styleguide/primitives/_dimensions.scss +0 -50
  146. data/stylesheets/archetype/styleguide/primitives/_glyphs.scss +0 -11
  147. data/stylesheets/archetype/styleguide/primitives/_misc.scss +0 -8
  148. data/stylesheets/archetype/styleguide/primitives/_palettes.scss +0 -94
  149. data/stylesheets/archetype/styleguide/primitives/_shadows.scss +0 -23
  150. data/stylesheets/archetype/styleguide/primitives/_sprites.scss +0 -46
  151. data/stylesheets/archetype/styleguide/primitives/_textures.scss +0 -10
  152. data/stylesheets/archetype/styleguide/primitives/_typography.scss +0 -56
  153. data/stylesheets/archetype/util/_lists.scss +0 -57
  154. data/stylesheets/archetype/util/_rtl.scss +0 -279
  155. data/stylesheets/archetype/util/_units.scss +0 -18
  156. data/templates/project/screen.scss +0 -1
  157. data/templates/project/vendor/archetype/animations/loaders/large/large.png +0 -0
  158. data/templates/project/vendor/archetype/animations/loaders/large/large_dark.png +0 -0
  159. data/templates/project/vendor/archetype/animations/loaders/large/large_dark_static.png +0 -0
  160. data/templates/project/vendor/archetype/animations/loaders/large/large_static.png +0 -0
  161. data/templates/project/vendor/archetype/animations/loaders/medium/medium.png +0 -0
  162. data/templates/project/vendor/archetype/animations/loaders/medium/medium_dark.png +0 -0
  163. data/templates/project/vendor/archetype/animations/loaders/medium/medium_dark_static.png +0 -0
  164. data/templates/project/vendor/archetype/animations/loaders/medium/medium_static.png +0 -0
  165. data/templates/project/vendor/archetype/animations/loaders/small/small.png +0 -0
  166. data/templates/project/vendor/archetype/animations/loaders/small/small_dark.png +0 -0
  167. data/templates/project/vendor/archetype/animations/loaders/small/small_dark_static.png +0 -0
  168. data/templates/project/vendor/archetype/animations/loaders/small/small_static.png +0 -0
  169. data/templates/project/vendor/archetype/fontawesome-webfont.eot +0 -0
  170. data/templates/project/vendor/archetype/fontawesome-webfont.svg +0 -255
  171. data/templates/project/vendor/archetype/fontawesome-webfont.ttf +0 -0
  172. data/templates/project/vendor/archetype/fontawesome-webfont.woff +0 -0
  173. data/test/fixtures/stylesheets/archetype/assets/fonts/fontawesome-webfont.eot +0 -0
  174. data/test/fixtures/stylesheets/archetype/assets/fonts/fontawesome-webfont.svg +0 -255
  175. data/test/fixtures/stylesheets/archetype/assets/fonts/fontawesome-webfont.ttf +0 -0
  176. data/test/fixtures/stylesheets/archetype/assets/fonts/fontawesome-webfont.woff +0 -0
  177. data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders-s7889ccc8c1.png +0 -0
  178. data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/large/large.png +0 -0
  179. data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/large/large_dark.png +0 -0
  180. data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/large/large_dark_static.png +0 -0
  181. data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/large/large_static.png +0 -0
  182. data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/medium/medium.png +0 -0
  183. data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/medium/medium_dark.png +0 -0
  184. data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/medium/medium_dark_static.png +0 -0
  185. data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/medium/medium_static.png +0 -0
  186. data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/small/small.png +0 -0
  187. data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/small/small_dark.png +0 -0
  188. data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/small/small_dark_static.png +0 -0
  189. data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/small/small_static.png +0 -0
  190. data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/sprites/hovercard_tip.png +0 -0
  191. data/test/fixtures/stylesheets/archetype/config.rb +0 -21
  192. data/test/fixtures/stylesheets/archetype/source/b.scss +0 -9
  193. data/test/fixtures/stylesheets/archetype/source/base.scss +0 -3
  194. data/test/fixtures/stylesheets/archetype/source/hacks/ie_pseudo.scss +0 -13
  195. data/test/fixtures/stylesheets/archetype/source/hacks/transparent_focusable.scss +0 -5
  196. data/test/fixtures/stylesheets/archetype/source/locale.scss +0 -43
  197. data/test/fixtures/stylesheets/archetype/source/styleguide/alerts.scss +0 -21
  198. data/test/fixtures/stylesheets/archetype/source/styleguide/buttons.scss +0 -18
  199. data/test/fixtures/stylesheets/archetype/source/styleguide/drop.scss +0 -101
  200. data/test/fixtures/stylesheets/archetype/source/styleguide/extend.scss +0 -24
  201. data/test/fixtures/stylesheets/archetype/source/styleguide/fallback_styles.scss +0 -23
  202. data/test/fixtures/stylesheets/archetype/source/styleguide/invalid_structures.scss +0 -85
  203. data/test/fixtures/stylesheets/archetype/source/styleguide/multi_value.scss +0 -18
  204. data/test/fixtures/stylesheets/archetype/source/styleguide/nested_styleguides.scss +0 -40
  205. data/test/fixtures/stylesheets/archetype/source/styleguide/selective_state.scss +0 -22
  206. data/test/fixtures/stylesheets/archetype/source/ui/glyph_icon.scss +0 -35
  207. data/test/fixtures/stylesheets/archetype/source/ui/hide_element.scss +0 -5
  208. data/test/fixtures/stylesheets/archetype/source/ui/stroke.scss +0 -13
  209. data/test/fixtures/stylesheets/archetype/source/ui/triangle.scss +0 -13
  210. data/test/fixtures/stylesheets/archetype/source/utilities/associative.scss +0 -24
  211. data/test/fixtures/stylesheets/archetype/source/utilities/custom_output_styler.scss +0 -22
  212. data/test/fixtures/stylesheets/archetype/source/utilities/if-set.scss +0 -16
  213. data/test/fixtures/stylesheets/archetype/source/utilities/spacing/horizontal-spacing.scss +0 -27
  214. data/test/fixtures/stylesheets/archetype/source/utilities/spacing/vertical-spacing.scss +0 -27
  215. data/test/fixtures/stylesheets/archetype/source/utilities/styles/filter.scss +0 -9
  216. data/test/fixtures/stylesheets/archetype/source/utilities/styles/font-family.scss +0 -9
  217. data/test/fixtures/stylesheets/archetype/source/utilities/styles/z-index.scss +0 -18
  218. data/test/fixtures/stylesheets/archetype/source/utilities/targeting/target-browser.scss +0 -77
  219. data/test/fixtures/stylesheets/archetype/source/utilities/targeting/target-os.scss +0 -42
  220. data/test/fixtures/stylesheets/archetype/tmp/b.css +0 -14
  221. data/test/fixtures/stylesheets/archetype/tmp/base.css +0 -349
  222. data/test/fixtures/stylesheets/archetype/tmp/hacks/ie_pseudo.css +0 -11
  223. data/test/fixtures/stylesheets/archetype/tmp/hacks/transparent_focusable.css +0 -4
  224. data/test/fixtures/stylesheets/archetype/tmp/locale.css +0 -23
  225. data/test/fixtures/stylesheets/archetype/tmp/styleguide/alerts.css +0 -711
  226. data/test/fixtures/stylesheets/archetype/tmp/styleguide/buttons.css +0 -2119
  227. data/test/fixtures/stylesheets/archetype/tmp/styleguide/drop.css +0 -63
  228. data/test/fixtures/stylesheets/archetype/tmp/styleguide/extend.css +0 -11
  229. data/test/fixtures/stylesheets/archetype/tmp/styleguide/fallback_styles.css +0 -10
  230. data/test/fixtures/stylesheets/archetype/tmp/styleguide/invalid_structures.css +0 -21
  231. data/test/fixtures/stylesheets/archetype/tmp/styleguide/multi_value.css +0 -13
  232. data/test/fixtures/stylesheets/archetype/tmp/styleguide/nested_styleguides.css +0 -28
  233. data/test/fixtures/stylesheets/archetype/tmp/styleguide/selective_state.css +0 -177
  234. data/test/fixtures/stylesheets/archetype/tmp/ui/glyph_icon.css +0 -127
  235. data/test/fixtures/stylesheets/archetype/tmp/ui/hide_element.css +0 -8
  236. data/test/fixtures/stylesheets/archetype/tmp/ui/stroke.css +0 -17
  237. data/test/fixtures/stylesheets/archetype/tmp/ui/triangle.css +0 -35
  238. data/test/fixtures/stylesheets/archetype/tmp/utilities/associative.css +0 -9
  239. data/test/fixtures/stylesheets/archetype/tmp/utilities/custom_output_styler.css +0 -8
  240. data/test/fixtures/stylesheets/archetype/tmp/utilities/if-set.css +0 -9
  241. data/test/fixtures/stylesheets/archetype/tmp/utilities/spacing/horizontal-spacing.css +0 -29
  242. data/test/fixtures/stylesheets/archetype/tmp/utilities/spacing/vertical-spacing.css +0 -29
  243. data/test/fixtures/stylesheets/archetype/tmp/utilities/styles/filter.css +0 -11
  244. data/test/fixtures/stylesheets/archetype/tmp/utilities/styles/font-family.css +0 -16
  245. data/test/fixtures/stylesheets/archetype/tmp/utilities/styles/z-index.css +0 -15
  246. data/test/fixtures/stylesheets/archetype/tmp/utilities/targeting/target-browser.css +0 -105
  247. data/test/fixtures/stylesheets/archetype/tmp/utilities/targeting/target-os.css +0 -55
  248. data/test/helpers/diff.rb +0 -49
  249. data/test/helpers/io.rb +0 -36
  250. data/test/helpers/test_case.rb +0 -62
  251. data/test/integrations/archetype_test.rb +0 -126
  252. data/test/test_helper.rb +0 -26
  253. data/test/units/sass_extensions_test.rb +0 -200
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d73c8fbdab53ce9a623ba9c8f8bfa25defd2dca3
4
- data.tar.gz: bde34dc53d79e37772e9c1397509ffcdfb778f43
3
+ metadata.gz: c6a2fb81e863d967312ecbecbc7f3c5448b59c62
4
+ data.tar.gz: 0b6e44d73cafd433970965a671a2fa0c43c405bc
5
5
  SHA512:
6
- metadata.gz: 367183d15630183a4e101f58b913a1c85028064a74b0cd269586157bf19818a39288ef0eaee64ffed617fe002653b3e245931fb9c94ca9f0bf3975c03fc3c22e
7
- data.tar.gz: 892fb1fa496f0d55ec61fefbeef8404d35df8458034b8f8b5dd5983f5d1793c019e7fccb4cb9179aea7b77f1e992bdccd302c83926c47570aeeee247fa3ab202
6
+ metadata.gz: fc1349d999e060d49b2e94e4bd8abfe527e9bd6fff4b3ecfcc7c29c24698cf651ceeece94496347a4a230764ad43d41e3eb4d8c02fb32e4f3d649e92a9ca4e19
7
+ data.tar.gz: 16adc0073b1fec35365d4c55edd05dc677ef49959266675955a4c0f67bf469804f62214626223bbc74ce93c858952139d40be3c2541c2cc2b4b28af45a9767c8
@@ -1,33 +1,106 @@
1
1
  # Changelog
2
2
 
3
- ## 0.0.1
3
+ ## 1.0.0.alpha.1 (unreleased)
4
4
 
5
- - initial public release
5
+ ### Resolved Issues:
6
+
7
+ - support Sass 3.3.0 and Compass 1.0.0
8
+ - `content` is no longer improperly quoted if not needed
9
+ - fix for IE7 `:before` glyphs not being positioned correctly
10
+ - fix for IE7 potentially crashing with `Operation Aborted` due to glyph injection
11
+
12
+ ### New Features:
13
+
14
+ - added `$CONFIG_STATE_BEM` and `$CONFIG_BEM_MODIFIER_SEPARATOR` to generate [BEM style state selectors](http://bem.info/method/)
15
+ - added `$CONFIG_BEM_ELEMENT_SEPARATOR` and `bem` mixin
16
+ - added `bem-selector` function to help compute the BEM style selector for a context
17
+ - added `str-replace` function for simple Sass::Script::Value::String replacements
18
+ - added `$CONFIG_THEME_EXCLUDE` takes a list of components that will be excluded (not registered)
19
+ - added `switch-locale` mixin to switch the interface locale
20
+ - styleguides now support registering maps
21
+ - `to-styles` now takes a map (but still supports a key-value paired list)
22
+ - improved debugging messages generated by `styleguide` and `styleguide-diff`
23
+ - `glyph-icons` mixin now supports multiple glyph libraries as well as multiple grid sizes via `$CONFIG_GLYPHS_LIBRARIES`
24
+ - `glyph-icons` mixin now supports multiple glyph icons on one element
25
+ - added `glyph-icons` function to help with retrieving glyph info (returned in a map for access)
26
+ - added `$CONFIG_GLYPHS_OUTPUT_FALLBACK` config
27
+ - added `archetype migrate` command line action to test for migration/back-compat issues
28
+ - improved locale functionality, including
29
+ - support for more complex formats. e.g. `sr_SP@Cyrillic`
30
+ - new methods to extract a piece of a locale: `locale-language`, `locale-territory`, `locale-modifier`
31
+ - added `derived-style` and `styleguide-derived-style` for extracting individual style rules from maps of styles or styleguide components
32
+ - improved memoizer scheme with option for `:aggressive` memoizing
33
+ - added `-archetype-list` to mimic the deprecated `-compass-list`
34
+ - added `$CONFIG_NAMESPACE` to allow namespacing global generated CSS (keyframes, font-face, etc)
35
+ - added `high-resolution` mixin for scoping high resolution (HiDPI / retina) code
36
+ - added `resolution-to-*` functions for converting between various resolution types (ratio, dppx, dpi, dpcm)
37
+ - `resolution_to_x`, `resolution-to-ratio`, `resolution-to-dppx`, `resolution-to-dpi`, `resolution-to-dpcm`
38
+ - added `to-fraction` function for converting a decimal number to a fractional representation (e.g. `1.5` -> `3/2`)
39
+ - added `list-join` function for joining a list into a string
40
+ - added `archetype-meta` function to retrieve values set on `$CONFIG_META` or `Compass.configuration.archetype_meta`
41
+ - added `register-breakpoint` and `get-breakpoint` functions for registering / retrieving breakpoint definitions
42
+ - added `breakpoint` mixin for creating breakpoint media queries
43
+ - added `switch-locale` function to assist switching locale states
44
+ - added helper functions for working with Archetype modules: `register-archetype-module`, `has-archetype-modules`, `require-archetype-modules`
45
+ - added `runtime-locale-value` for decorating a map so we can compute it's value respective to the locale at runtime (better support for `switch-locale`)
46
+ - e.g. `runtime-locale-value((default: a, en_US: b, ru_RU: c, ...))`
47
+ - added `get-runtime-locale-value` for selecting the value based on the current locale. this should be in conjunction with `runtime-locale-value`
48
+ - added `register-glyph-library`, `get-glyph-library`, and `get-all-glyph-libraries` functions for registering / retrieving glyph icon libraries
49
+ - added `before` and `after` mixins to ease the pain in styling `:before` and `:after` elements cross-browser
50
+ - allow `target-browser` and `target-os` to accept a map of property-value pairs
51
+
52
+ ### Major Changes:
53
+
54
+ - dropped support for older versions of Sass/Compass (sorry, can't pass up the new feature set)
55
+ - removed `gradient-with-deg` mixin
56
+ - removed `_isLegacySupported` function
57
+ - `inline-block` in styleguide component has changed syntax to take proper arguments
58
+ - dropped `gradient` from supported keywords in styleguide components (use `background-image` instead)
59
+ - `$CORE_STATE_MAPPINGS` and `$CONFIG_STATE_MAPPINGS` are now proper Sass maps
60
+ - `styleguide` function now has the same signature as the mixin and can take multiple definitions at once
61
+ - `styleguide-diff` now takes two `styleguide` results as params
62
+ - removed `testing` configuration, instead check for `defined?(ArchetypeTestHelpers)`
63
+ - removed `$CONFIG_GLYPHS_NAME`, `$CONFIG_GLYPHS_VERSION`, `$CONFIG_GLYPHS_SVG_ID`, `$CONFIG_GLYPHS_BASE_PATH`, `$CONFIG_GLYPHS_EOT`, `$CONFIG_GLYPHS_FILES`, `$CONFIG_GLYPHS_THRESHOLD`, `$CORE_GLYPHS_MAPPINGS`, `$CONFIG_GLYPHS_MAPPINGS` and instead merged these configs into `$CORE_GLYPHS_LIBRARIES` and `$CONFIG_GLYPHS_LIBRARIES`
64
+ - removed all RTL functions
65
+ - `styleguide-sprite*` and `styleguide-image*` functions have been replaced with private methods (`-archetype-sprite*`, `-archetype-image*`)
66
+ - ported many functions to ruby instead of defined as Sass user functions
67
+ - glyph icon mappings now take a map (optionally) of format `(char: characterCode, size: defaultSize)` (note that the previous list support is now deprecated)
68
+ - Archetype has now been split into smaller projects
69
+ - the core will provide the most widely used functions/mixins with much opinion on your generated CSS
70
+ - things that are more specialized, opinionated, or heavy-handed have been moved to extensions, these extensions currently include:
71
+ - `archetype-grid`
72
+ - `archetype-theme`
73
+ - `archetype-base`
74
+ - `archetype-base-h5bp`
75
+ - `archetype-base-normalize`
76
+ - `archetype-base-reset`
77
+ - `archetype-base-hybrid`
78
+ - the goal of this split is to provide consumers with the most useful and non-intrusive features upfront while still offering (via extension) the robustness we've already built
6
79
 
7
80
  ## 0.0.1.pre.3 (pre-released)
8
81
 
9
82
  ### New Features:
10
83
 
11
- - added `styleguide-component-exists()` method to check if a component/extension has already been registered in the theme
84
+ - added `styleguide-component-exists` method to check if a component/extension has already been registered in the theme
12
85
  - added `memoize` compiler configuration to allow enabling/disabling the internal styleguide memoizer
13
- - `glyph-icon()` can now take `false` as an icon name and not output anything
14
- - added `unstyled-button()` method to remove default styling from a `<button>` element
15
- - added `prefixed-tag()` method for consistency when generating tag names
86
+ - `glyph-icon` can now take `false` as an icon name and not output anything
87
+ - added `unstyled-button` method to remove default styling from a `<button>` element
88
+ - added `prefixed-tag` method for consistency when generating tag names
16
89
  - added Chinese font stacks
17
- - added wildcard support to `locale()` function (e.g. `locale(en_ ja_JP _DE)`)
18
- - added `transparent-focusable()` mixin for transparent background support in older IE
19
- - added ability to customize `output-style()` with `custom-output-styler()` mixin and `has-custom-output-styler()` function (NEEDS DOCUMENTATION)
20
- - added better support for targeting IE6/7 glyphs and `ie-pseudo()` generated elements (NEEDS DOCUMENTATION)
21
- - making `unique()` generated IDs genuinely unique
22
- - adding support for a `testing` config flag
23
- - adding support for `@extend` from a styleguide component
90
+ - added wildcard support to `locale` function (e.g. `locale(en_ ja_JP _DE)`)
91
+ - added `transparent-focusable` mixin for transparent background support in older IE
92
+ - added ability to customize `output-style` with `custom-output-styler` mixin and `has-custom-output-styler` function (NEEDS DOCUMENTATION)
93
+ - added better support for targeting IE6/7 glyphs and `ie-pseudo` generated elements (NEEDS DOCUMENTATION)
94
+ - made `unique` generated IDs genuinely unique
95
+ - added support for a `testing` config flag
96
+ - added support for `@extend` from a styleguide component
24
97
 
25
98
  ### Resolved Issues:
26
99
 
27
- - quotes on strings passed to `associative()` weren't being stripped correctly
100
+ - quotes on strings passed to `associative` weren't being stripped correctly
28
101
  - fixed some minor glyph issues
29
102
  - out-of-order CSS issues in Ruby 1.8.7 are fixed using `Hashery::OrderedHash`
30
- - fixed issue with `archetype-version()` incorrectly matching comparators
103
+ - fixed issue with `archetype-version` incorrectly matching comparators
31
104
 
32
105
  ### Tests:
33
106
 
@@ -45,10 +118,10 @@
45
118
  - added support for `drop` and `styleguide` keywords in components
46
119
  - `drop` allows you to drop previously defined styles within a component definition (e.g. if you need to remove defaults)
47
120
  - `styleguide` in a component definition will insert the derived styles from a styleguide() call. this allows you to share styles between components
48
- - added `styleguide-diff()` method
49
- - added `ie-pseudo()` methods to support dynamically generating pseudo :before and :after elements (using expressions)
50
- - added `stroke()` mixin to create a stroke line around text (or font icon)
51
- - added `hide-element()` mixin to hide elements from screen but keep them screen-reader accessible
121
+ - added `styleguide-diff` method
122
+ - added `ie-pseudo` methods to support dynamically generating pseudo :before and :after elements (using expressions)
123
+ - added `stroke` mixin to create a stroke line around text (or font icon)
124
+ - added `hide-element` mixin to hide elements from screen but keep them screen-reader accessible
52
125
  - added basic support for fallback CSS values (e.g. border: red; border: rgba(255,0,0, 0.8);)
53
126
  - added `$CONFIG_STATE_MAPPINGS` to simplify the mapping between state names and selectors
54
127
 
@@ -56,13 +129,13 @@
56
129
 
57
130
  - loading spinners now use CSS3 animations and require some integration work
58
131
  - updated default vertical/horizontal spacing to 5px
59
- - `list-extend()` is now `associative-merge()`
132
+ - `list-extend` is now `associative-merge`
60
133
 
61
134
  ### Resolved Issues:
62
135
 
63
136
  - nested inheritance would get corrupted (due to a volatile context being passed along)
64
137
  - `$exclude` in `to-styles` wasn't taking a list of keys cleanly
65
- - `font-family()` and `lang()` weren't respecting locale aliases
138
+ - `font-family` and `lang` weren't respecting locale aliases
66
139
  - fixed thread safety issues
67
140
 
68
141
  ### Documentation:
@@ -75,15 +148,15 @@
75
148
 
76
149
  ### New Features:
77
150
 
78
- - `styleguide-add-component()`, `styleguide-extend-component()`, and `styleguide()` now take a `$theme` parameter
151
+ - `styleguide-add-component`, `styleguide-extend-component`, and `styleguide` now take a `$theme` parameter
79
152
  - `$CONFIG_THEME` can change the global theme
80
153
  - `$CONFIG_STYLEGUIDE_DISABLE_SPRITES` will prevent styleguide sprites from being generated if set to `true`
81
154
  - theme components are cached
82
- - `styleguide()` calls are memoized
155
+ - `styleguide` calls are memoized
83
156
 
84
157
  ### Major Changes:
85
158
 
86
- - `filter()` mixin is now `ie-filter()` to prevent conflicts with Compass' `filter()` mixin
159
+ - `filter` mixin is now `ie-filter` to prevent conflicts with Compass' `filter` mixin
87
160
  - Compass overrides are no longer loaded as Archetype core
88
161
 
89
162
  ### Resolved Issues:
data/README.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # Archetype
2
2
 
3
- [![Build Status](https://travis-ci.org/linkedin/archetype.png)](https://travis-ci.org/linkedin/archetype) [![Gem Version](https://badge.fury.io/rb/archetype.png)](http://badge.fury.io/rb/archetype)
3
+ [![Build Status](https://api.travis-ci.org/linkedin/archetype.svg)](https://travis-ci.org/linkedin/archetype) [![Gem Version](https://badge.fury.io/rb/archetype.svg)](http://badge.fury.io/rb/archetype)
4
+ [![Dependency Status](https://gemnasium.com/eoneill/archetype.svg)](https://gemnasium.com/eoneill/archetype)
4
5
 
5
- Archetype is a UI pattern and component library for quickly iterating on and maintaining scalable web interfaces.
6
+ Archetype is a Compass/Sass based framework for authoring configurable, composable UI components and patterns.
7
+ The natural language syntax that Archetype provides allows your designers and developers to discuss UI compositions using the same vocabulary.
6
8
 
7
9
  ## Resources
8
10
 
@@ -15,11 +17,15 @@ Archetype is a UI pattern and component library for quickly iterating on and mai
15
17
  - [Discussion](https://github.com/eoneill/archetype/issues)
16
18
  - [Archetype configuration](http://www.archetypecss.com/documentation/configuration/)
17
19
 
20
+ ## Developing Archetype
21
+
22
+ If you're looking to contribute to Archetype, check out the [CONTRIBUTING](CONTRIBUTING.md) article.
23
+
18
24
  ## Installation
19
25
 
20
26
  ### Install the gem
21
27
 
22
- ```bash
28
+ ```sh
23
29
  [sudo] gem install archetype --pre
24
30
  ```
25
31
 
@@ -27,7 +33,7 @@ Instead of installing the gem directly via the command line, we recommend using
27
33
 
28
34
  ### Creating a new project with Archetype
29
35
 
30
- ```bash
36
+ ```sh
31
37
  compass create ~/workspace/your-project -r archetype --using archetype
32
38
  ```
33
39
 
@@ -82,6 +88,6 @@ This project couldn't have been made possible without the amazing work by the fo
82
88
 
83
89
  - Dave Gandy for his awesome work on [FontAwesome](http://fortawesome.github.com/Font-Awesome/)
84
90
  - Chris Eppstein and other contributors of [Compass](http://compass-style.org/) for building an amazing framework, and for some great scaffolding code we've _borrowed_
85
- - Nathan Weizenbaum and contributors for [making CSS fun again](http://sass-lang.com/)
91
+ - Hampton Catlin, Nathan Weizenbaum, Chris Eppstein and contributors for [making CSS fun again](http://sass-lang.com/)
86
92
  - Nicolas Gallagher and Jonathan Neal for some [Normalize.css](https://github.com/necolas/normalize.css) greatness
87
93
  - Nicolas Gallagher, Jonathan Neal, Kroc Camen, Paul Irish, and others for [HTML5 Boilerplate](http://html5boilerplate.com/)
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.0.alpha.1
@@ -4,26 +4,27 @@ require 'compass'
4
4
  # Initialize Archetype and register it as a Compass extension
5
5
  #
6
6
  module Archetype
7
- # extension info
8
- @archetype = {}
9
- @archetype[:name] = 'archetype'
10
- @archetype[:path] = File.expand_path(File.join(File.dirname(__FILE__), ".."))
11
- # register the extension
12
- def self.register
13
- Compass::Frameworks.register(@archetype[:name], :path => @archetype[:path])
14
- end
7
+ NAME = 'archetype'
8
+
9
+ # info
10
+ @archetype = {
11
+ :name => NAME,
12
+ :path => File.expand_path(File.join(File.dirname(__FILE__), ".."))
13
+ }
14
+
15
15
  # initialize Archetype
16
16
  def self.init
17
- # register it
18
- self.register
19
- # setup configs
17
+ ## register it
18
+ register
19
+
20
+ ## setup configs
20
21
  # locale
21
22
  Compass::Configuration.add_configuration_property(:locale, "the user locale") do
22
23
  'en_US'
23
24
  end
24
- # reading direction (ltr|rtl)
25
- Compass::Configuration.add_configuration_property(:reading, "the user interface reading direction") do
26
- 'ltr'
25
+ # locale_aliases
26
+ Compass::Configuration.add_configuration_property(:locale_aliases, "a mapping of locale name aliases") do
27
+ {}
27
28
  end
28
29
  # environment
29
30
  Compass::Configuration.add_configuration_property(:environment, "current environment") do
@@ -33,17 +34,28 @@ module Archetype
33
34
  Compass::Configuration.add_configuration_property(:memoize, "should the memoizer be used to improve compilation speed") do
34
35
  not (Compass.configuration.environment || :development).to_s.include?('dev')
35
36
  end
36
- # testing (for running unit tests)
37
- Compass::Configuration.add_configuration_property(:testing, "is this a testing environment") do
38
- ENV['CI']
37
+ # meta
38
+ Compass::Configuration.add_configuration_property(:archetype_meta, "any meta data you want made available to the environment") do
39
+ {}
39
40
  end
40
41
  end
42
+
43
+ def self.name
44
+ NAME
45
+ end
46
+
47
+ private
48
+
49
+ ## register as a Compass extension
50
+ def self.register
51
+ Compass::Frameworks.register(NAME, :path => @archetype[:path]);
52
+ end
41
53
  end
42
54
 
43
55
  # init
44
56
  Archetype.init
45
57
 
46
58
  # load dependencies
47
- %w(functions sass_extensions).each do |lib|
59
+ %w(extensions functions sass_extensions).each do |lib|
48
60
  require "archetype/#{lib}"
49
61
  end
@@ -0,0 +1,152 @@
1
+ description = "Check a set of files for migration and back-compat issues"
2
+ if @description.nil?
3
+ DELIMITER = "\n "
4
+ DATA = {
5
+ '1.0.0.alpha.1' => {
6
+ :notice => %q{Archetype now requires Sass 3.3+ and Compass 0.13+},
7
+ :tests => {
8
+ :sacss => [
9
+ {
10
+ :pattern => /(gradient[_-]with[_-]deg|[_-]isLegacySupported)/m,
11
+ :message => 'mixin or function `$1` has been removed'
12
+ },
13
+ {
14
+ :pattern => /(?:\@include\s+|\+)(wrapper[_-]rtl|(?:padding|margin)(?:[_-](?:top|right|bottom|left))?|border(?:[_-](?:top|right|bottom|left))?[_-](?:width|color|style)|clear|float|text[_-]align|left|right|background[_-]position)\s*\(([^\)]*)/m,
15
+ :message => 'the RTL mixin `$1` has been deprecated, just use `$1: $2`'
16
+ },
17
+ {
18
+ :pattern => /(?:\@include\s+|\+)wrapper[_-]rtl/m,
19
+ :message => 'the RTL mixin `wrapper-rtl` has been deprecated'
20
+ },
21
+ {
22
+ :pattern => /[\:\s\(\{](rtl|reading[_-]direction)\s*\(/m,
23
+ :message => 'the RTL function `$1()` has been deprecated'
24
+ },
25
+ {
26
+ :pattern => /(?:styleguide[_-](?:add|extend)[_-]component)[^\;]*(inline-block)(?:\s+|\:)true/m,
27
+ :message => '`inline-block` has changed syntax within a styleguide component'
28
+ },
29
+ {
30
+ :pattern => /(?:styleguide[_-](?:add|extend)[_-]component)[^\;]*\s+\(?(gradient)(?:\s|\:)/m,
31
+ :message => 'use `background-image` instead of `$1` within your styleguide component'
32
+ },
33
+ {
34
+ :pattern => /(\$CONFIG_(?:STATE_MAPPINGS|BROWSER_VENDORS_HACK|OS_VENDORS_CLASS|SAFE_FONTS|LOADERS))\s*\:\s*\(\s*[^\:]+\s*\)(?: \!default)?\;/m,
35
+ :message => '`$1` is now a map structure instead of lists'
36
+ },
37
+ {
38
+ :pattern => /(?:(?:nth(?:-cyclic)?|associative)\s*\(\s*)(\$CONFIG_(?:STATE_MAPPINGS|BROWSER_VENDORS_HACK|OS_VENDORS_CLASS|SAFE_FONTS|LOADERS))/m,
39
+ :message => '`$1` is now a map structure instead of lists'
40
+ },
41
+ {
42
+ :pattern => /(\$CONFIG_GLYPHS_(?:NAME|VERSION|SVG_ID|BASE_PATH|EOT|FILES|THRESHOLD|MAPPINGS))/m,
43
+ :message => '`$1` is deprecated, use `register-glyph-library()` instead'
44
+ },
45
+ {
46
+ :pattern => /(\$CONFIG_GRID_DIRECTION)/m,
47
+ :message => '`$1` is deprecated'
48
+ },
49
+ {
50
+ :pattern => /(styleguide[_-]((?:sprite|image)(?:[_-][a-z]+)?))/m,
51
+ :message => '`$1` has been replaced with `-archetype-$2`'
52
+ },
53
+ {
54
+ :pattern => /(\$CONFIG_(?:KEYFRAMES|GLYPHS)_AUTO)/m,
55
+ :message => '`$1` has been deprecated, use `$CONFIG_RESET_AUTO` instead'
56
+ }
57
+ ],
58
+ :rb => [],
59
+ :scss => [],
60
+ :sass => []
61
+ }
62
+ }
63
+ }
64
+
65
+ options = {
66
+ :from => ''
67
+ }
68
+ OptionParser.new do |opts|
69
+ opts.banner = description
70
+ opts.define_head "Usage: #{Archetype.name} migrate [path] [options]"
71
+ opts.separator ""
72
+ opts.separator "Example usage:"
73
+ opts.separator " archetype migrate /path/to/scss/ --from=0.0.1.alpha"
74
+
75
+ opts.on('-f', '--from VERSION', 'Archetype version migrating from') do |v|
76
+ options[:from] = v
77
+ end
78
+
79
+ opts.on('-h', '--help', 'shows this help message') do
80
+ puts opts
81
+ exit
82
+ end
83
+
84
+ if not @help.nil?
85
+ puts opts
86
+ exit
87
+ end
88
+ end.parse!
89
+
90
+ base = ARGV[1] || '.'
91
+ count = 0
92
+ files = {}
93
+ DATA.each do |version, obj|
94
+ if version > options[:from]
95
+ messages = []
96
+ messages << obj[:notice] if not obj[:notice].nil?
97
+ obj[:tests].each do |category, tests|
98
+ if not tests.nil? and not tests.empty?
99
+ ext = case category
100
+ when :rb
101
+ '.rb'
102
+ when :sass
103
+ '.sass'
104
+ when :scss
105
+ '.scss'
106
+ when :all
107
+ ''
108
+ else
109
+ '.s[ac]ss'
110
+ end
111
+
112
+ Dir.glob(File.join(base, '**', "*#{ext}")) do |file|
113
+ contents = files[file]
114
+ message = []
115
+
116
+ tests.each do |test|
117
+ if contents.nil?
118
+ contents = ''
119
+ File.readlines(file).select do |line|
120
+ # strip off the comments and push it onto the contents
121
+ contents << line.gsub(/\s*((\/\/.*)|(\/\*(?!\*\/)?\*\/))/, '')
122
+ end
123
+ # cache the contents so we don't have to read it in again
124
+ files[file] = contents
125
+ end
126
+
127
+ if contents =~ test[:pattern]
128
+ contents.scan(test[:pattern]).each do |match|
129
+ message << test[:message].gsub(/\$1/, match[0] || '').gsub(/\$2/, match[1] || '')
130
+ count += 1
131
+ end
132
+ end
133
+
134
+ end
135
+
136
+ messages << "#{file}:#{DELIMITER}#{message.join(DELIMITER)}" unless message.empty?
137
+ end
138
+ end
139
+ end
140
+ puts "#{'='*20}\nv#{version}\n#{'-'*20}\n#{messages.join("\n\n")}" unless messages.empty?
141
+ end
142
+ end
143
+
144
+ if count > 0
145
+ puts "\n#{count} backward compatibility issue#{count > 1 ? 's' : ''} found!"
146
+ else
147
+ puts "\neverything else looks good!"
148
+ end
149
+ exit
150
+ else
151
+ @description = description
152
+ end