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,100 @@
1
+ .target-ie-6 {
2
+ _vertical-align: -5px;
3
+ _background-position: 6px -2170px;
4
+ _overflow: hidden;
5
+ }
6
+
7
+ .target-ie-lte-7 {
8
+ *margin-top: 1px;
9
+ *padding: 0;
10
+ *width: 195px;
11
+ *font-size: 0.01em;
12
+ *height: 18px;
13
+ }
14
+
15
+ .ie.ie6 .target-ie-6-7, .ie.ie7 .target-ie-6-7 {
16
+ display: inline;
17
+ }
18
+ .ie.ie6 .target-ie-6-7, .ie.ie7 .target-ie-6-7 {
19
+ zoom: 1;
20
+ }
21
+ .ie.ie6 .target-ie-6-7, .ie.ie7 .target-ie-6-7 {
22
+ margin-left: 0;
23
+ }
24
+
25
+ .ie.ie7 .target-ie-7 {
26
+ vertical-align: -5px;
27
+ }
28
+ .ie.ie7 .target-ie-7 {
29
+ background-position: 6px -2170px;
30
+ }
31
+ .ie.ie7 .target-ie-7 {
32
+ overflow: hidden;
33
+ }
34
+
35
+ .ie.ie7 .target-ie-7-8, .ie.ie8 .target-ie-7-8 {
36
+ min-height: 250px !important;
37
+ height: auto !important;
38
+ height: 250px !important;
39
+ }
40
+
41
+ .ie.lte8 .target-ie-lte-8 {
42
+ filter: BasicImage(rotation=3);
43
+ }
44
+ .ie.lte8 .target-ie-lte-8 {
45
+ padding-bottom: 8px;
46
+ }
47
+ .ie.lte8 .target-ie-lte-8 {
48
+ line-height: 1.6;
49
+ }
50
+
51
+ .ie.ie8 .target-ie-8 {
52
+ margin-top: 2px;
53
+ }
54
+ .ie.ie8 .target-ie-8 {
55
+ min-height: 170px;
56
+ height: auto !important;
57
+ height: 170px;
58
+ }
59
+
60
+ .ie.lte9 .target-ie-lte-9 {
61
+ border-color: #111111;
62
+ }
63
+ .ie.lte9 .target-ie-lte-9 {
64
+ background: #2c2c2b;
65
+ }
66
+
67
+ .ie.ie7 .target-ie-7-8-9, .ie.ie8 .target-ie-7-8-9 {
68
+ width: 250px;
69
+ }
70
+
71
+ .ie .target-ie-9 {
72
+ right: -83px;
73
+ }
74
+ .ie .target-ie-9 {
75
+ top: 17px;
76
+ }
77
+
78
+ @media screen and (-webkit-min-device-pixel-ratio: 0) {
79
+ .target-webkit {
80
+ line-height: 16px;
81
+ }
82
+ }
83
+ @media screen and (-webkit-min-device-pixel-ratio: 0) {
84
+ .target-webkit {
85
+ padding-top: 10px;
86
+ }
87
+ }
88
+ @media screen and (-webkit-min-device-pixel-ratio: 0) {
89
+ .target-webkit {
90
+ width: 151px;
91
+ }
92
+ }
93
+
94
+ .target-firefox, .target-firefox x:-moz-any-link {
95
+ margin-top: 16px;
96
+ }
97
+
98
+ .target-opera, .target-opera x:-o-prefocus {
99
+ width: 82%;
100
+ }
@@ -0,0 +1,55 @@
1
+ .os-linux .target-linux {
2
+ top: -3px;
3
+ }
4
+ .os-linux .target-linux {
5
+ width: 300px;
6
+ }
7
+
8
+ .os-mac .target-apple {
9
+ top: -3px;
10
+ }
11
+ .os-mac .target-apple {
12
+ width: 300px;
13
+ }
14
+
15
+ .os-mac .target-mac {
16
+ top: -3px;
17
+ }
18
+ .os-mac .target-mac {
19
+ width: 300px;
20
+ }
21
+
22
+ .os-mac .target-osx {
23
+ top: -3px;
24
+ }
25
+ .os-mac .target-osx {
26
+ width: 300px;
27
+ }
28
+
29
+ .os-win .target-windows {
30
+ top: -3px;
31
+ }
32
+ .os-win .target-windows {
33
+ width: 300px;
34
+ }
35
+
36
+ .os-win .target-win {
37
+ top: -3px;
38
+ }
39
+ .os-win .target-win {
40
+ width: 300px;
41
+ }
42
+
43
+ .os-win .target-winxp {
44
+ top: -3px;
45
+ }
46
+ .os-win .target-winxp {
47
+ width: 300px;
48
+ }
49
+
50
+ .os-win .target-win7 {
51
+ top: -3px;
52
+ }
53
+ .os-win .target-win7 {
54
+ width: 300px;
55
+ }
@@ -0,0 +1,9 @@
1
+ @import "archetype";
2
+
3
+ a {
4
+ @include styleguide(headline);
5
+ }
6
+
7
+ b {
8
+ @include styleguide(muted xxlarge headline in a punchcut);
9
+ }
@@ -0,0 +1,3 @@
1
+ @import "archetype";
2
+
3
+ @include generate-loader-keyframes();
@@ -0,0 +1,13 @@
1
+ @import "archetype";
2
+
3
+ .before {
4
+ @include ie-pseudo-before('color: red; background: green;');
5
+ }
6
+
7
+ .after-content {
8
+ @include ie-pseudo-after($content: "\27BD");
9
+ }
10
+
11
+ .before-style-content {
12
+ @include ie-pseudo-before($styles: 'color: red; background: green;', $content: "testing \27BD if this works");
13
+ }
@@ -0,0 +1,43 @@
1
+ @import "archetype";
2
+
3
+ // test for a simple locale
4
+ .en_US {
5
+ @if(locale(en_US)) {
6
+ content: "en_US";
7
+ }
8
+ }
9
+
10
+ // test for a wildcard territory
11
+ .en_wild {
12
+ @if(locale(en_)) {
13
+ content: "en_*";
14
+ }
15
+ }
16
+
17
+ // test for a wildcard language
18
+ .wild_US {
19
+ @if(locale(_US)) {
20
+ content: "*_US";
21
+ }
22
+ }
23
+
24
+ // multiple locales, one valid
25
+ .one {
26
+ @if(locale(de_DE fr_FR pt_ en_US)) {
27
+ content: "one of de_DE fr_FR pt_ en_US";
28
+ }
29
+ }
30
+
31
+ // multiple locales, none valid
32
+ .not {
33
+ @if(not locale(ja_JP pt_BR _GB de_)) {
34
+ content: "not one of ja_JP pt_BR _GB de_";
35
+ }
36
+ }
37
+
38
+ // test that the lang() alias works
39
+ .lang {
40
+ @if(lang(en_US)) {
41
+ content: "en_US";
42
+ }
43
+ }
@@ -0,0 +1,18 @@
1
+ @import "archetype";
2
+
3
+ @each $context in container, bristol, punchcut {
4
+ .#{$context} {
5
+ @each $size in large, medium, small {
6
+ @each $type in primary, secondary, spotlight {
7
+ // normal buttons
8
+ .button.#{$size}.#{$type} {
9
+ @include styleguide($size $type button in a $context);
10
+ }
11
+ }
12
+ }
13
+ }
14
+ }
15
+
16
+ .test-exclude {
17
+ @include styleguide(small secondary button in a container, $exclude: width height border-radius padding font-size line-height cursor);
18
+ }
@@ -0,0 +1,22 @@
1
+ // this case verifies that you can define `fallback` css properties
2
+
3
+ @import "archetype";
4
+
5
+ @if not styleguide-component-exists(fallback-styleguide-test, $CONFIG_THEME) {
6
+ $a-blackhole: styleguide-add-component(fallback-styleguide-test, (), (
7
+ (default, (
8
+ background (transparent url(/some/img.png) repeat),
9
+ background rbga(255, 0, 0, 0.9),
10
+ white-space pre-wrap,
11
+ white-space -moz-pre-wrap,
12
+ white-space -pre-wrap,
13
+ white-space -o-pre-wrap,
14
+ something invalid,
15
+ something valid
16
+ )),
17
+ nil
18
+ ), $CONFIG_THEME);
19
+ }
20
+ .fallback-styleguide-test {
21
+ @include styleguide(fallback-styleguide-test);
22
+ }
@@ -0,0 +1,40 @@
1
+ // this case will test a couple of things, including
2
+ // - nested `styleguide` calls
3
+ // - nested selectors
4
+ // - nested `styleguide` calls in nested selectors
5
+
6
+ @import "archetype";
7
+
8
+ @if not styleguide-component-exists(nested-styleguide-test, $CONFIG_THEME) {
9
+ $a-blackhole: styleguide-add-component(nested-styleguide-test, (), (
10
+ (default, (
11
+ display block,
12
+ color red,
13
+ styleguide (muted link without an underline),
14
+ background green,
15
+ (states, (
16
+ (hover, (
17
+ styleguide module,
18
+ nil
19
+ )),
20
+ nil
21
+ )),
22
+ (selectors, (
23
+ ('h3', (
24
+ styleguide (large headline),
25
+ styleguide (link without an underline),
26
+ nil
27
+ )),
28
+ ('&:after', (
29
+ color red,
30
+ nil
31
+ ))
32
+ )),
33
+ nil
34
+ )),
35
+ nil
36
+ ), $CONFIG_THEME);
37
+ }
38
+ .nested-styleguide-test {
39
+ @include styleguide(nested-styleguide-test);
40
+ }
@@ -0,0 +1,22 @@
1
+ @import "archetype";
2
+
3
+ .simple-button {
4
+ &.disabled {
5
+ @include styleguide(small primary button, $state: disabled);
6
+ }
7
+ &.my-custom-hover {
8
+ @include styleguide(small primary button, $state: hover);
9
+ }
10
+ &.normal {
11
+ @include styleguide(small primary button, $state: false);
12
+ }
13
+ }
14
+
15
+ .anchor {
16
+ &.missing {
17
+ @include styleguide(link, $state: missing);
18
+ }
19
+ &.my-custom-hover {
20
+ @include styleguide(link, $state: hover);
21
+ }
22
+ }
@@ -0,0 +1,13 @@
1
+ @import "archetype";
2
+
3
+ .simple {
4
+ @include glyph-icon(caret-down);
5
+ }
6
+
7
+ .false {
8
+ @include glyph-icon(false, $placement: inline);
9
+ }
10
+
11
+ .size {
12
+ @include glyph-icon(caret-down, $size: 20px);
13
+ }
@@ -0,0 +1,5 @@
1
+ @import "archetype";
2
+
3
+ .hide-element {
4
+ @include hide-element();
5
+ }
@@ -0,0 +1,13 @@
1
+ @import "archetype";
2
+
3
+ .stroke {
4
+ @include glyph-stroke();
5
+ }
6
+
7
+ .stroke-fat {
8
+ @include glyph-stroke(10px);
9
+ }
10
+
11
+ .stroke-colorful {
12
+ @include glyph-stroke(10px, red);
13
+ }
@@ -0,0 +1,13 @@
1
+ @import "archetype";
2
+
3
+ .a {
4
+ @include triangle();
5
+ }
6
+
7
+ .b {
8
+ @include triangle(top, 10px, 5px, black);
9
+ }
10
+
11
+ .c {
12
+ @include triangle(left top, 10px, 5px, black);
13
+ }
@@ -0,0 +1,24 @@
1
+ @import "archetype";
2
+
3
+ $test: (
4
+ (one, (
5
+ '1',
6
+ '2',
7
+ '3'
8
+ )),
9
+ (two, (
10
+ '4',
11
+ '5',
12
+ '6'
13
+ ))
14
+ );
15
+
16
+ .test {
17
+ a: nth(associative($test, one), 1); // 1
18
+ b: nth(associative($test, one), 2); // 2
19
+ c: nth(associative($test, two), 2); // 5
20
+ d: nth(associative($test, two), 3); // 6
21
+ e: nth(associative($test, 'two'), 2); // 5
22
+ f: nth(associative($test, 'two'), 3); // 6
23
+ g: nth(associative($test, three), 1); // 1
24
+ }
@@ -0,0 +1,16 @@
1
+ @import "archetype";
2
+
3
+ a {
4
+ @include if-set(margin, 5px);
5
+ @include if-set(border, 1px solid #ccc);
6
+ }
7
+
8
+ b {
9
+ @include if-set(margin, 5px, $ignore: (10px 20px));
10
+ @include if-set(border, 1px solid #ccc, $ignore: (1px solid #ddd, 1px solid #eee));
11
+ }
12
+
13
+ c {
14
+ @include if-set(margin, 5px, $ignore: (5px 10px 20px));
15
+ @include if-set(border, 1px solid #ccc, $ignore: (1px solid #ccc, 1px solid #ddd, 1px solid #eee));
16
+ }
@@ -0,0 +1,27 @@
1
+ @import "archetype";
2
+
3
+ a {
4
+ @include horizontal-spacing(4);
5
+ @include horizontal-spacing(4, $method: margin);
6
+ }
7
+
8
+ b {
9
+ @include horizontal-spacing(nil 4);
10
+ @include horizontal-spacing(nil 4, $method: margin);
11
+ }
12
+
13
+ c {
14
+ @include horizontal-spacing(4 nil);
15
+ @include horizontal-spacing(4 nil, $method: margin);
16
+ }
17
+
18
+ d {
19
+ @include horizontal-spacing(nil 2.6);
20
+ @include horizontal-spacing(nil 2.6, $abuse: true);
21
+ @include horizontal-spacing(nil 2.6, $abuse: true, $method: margin);
22
+ }
23
+
24
+ e {
25
+ @include horizontal-spacing($left: 0, $right: 0);
26
+ @include horizontal-spacing($left: 0, $right: 0, $method: margin);
27
+ }