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.
- checksums.yaml +7 -0
- data/CHANGELOG.md +88 -0
- data/LICENSE +16 -0
- data/README.md +87 -1
- data/VERSION.yml +6 -0
- data/lib/README.rdoc +4 -0
- data/lib/archetype.rb +45 -0
- data/lib/archetype/functions.rb +9 -0
- data/lib/archetype/functions/hash.rb +149 -0
- data/lib/archetype/functions/helpers.rb +125 -0
- data/lib/archetype/functions/styleguide_memoizer.rb +61 -0
- data/lib/archetype/sass_extensions.rb +6 -0
- data/lib/archetype/sass_extensions/functions.rb +14 -0
- data/lib/archetype/sass_extensions/functions/environment.rb +14 -0
- data/lib/archetype/sass_extensions/functions/lists.rb +284 -0
- data/lib/archetype/sass_extensions/functions/locale.rb +77 -0
- data/lib/archetype/sass_extensions/functions/numbers.rb +19 -0
- data/lib/archetype/sass_extensions/functions/styleguide.rb +406 -0
- data/lib/archetype/sass_extensions/functions/ui.rb +59 -0
- data/lib/archetype/sass_extensions/functions/version.rb +95 -0
- data/lib/archetype/version.rb +75 -0
- data/stylesheets/_archetype.scss +2 -0
- data/stylesheets/archetype/_base.scss +46 -0
- data/stylesheets/archetype/_config.scss +366 -0
- data/stylesheets/archetype/_grid.scss +3 -0
- data/stylesheets/archetype/_hacks.scss +72 -0
- data/stylesheets/archetype/_init.scss +23 -0
- data/stylesheets/archetype/_styleguide.scss +6 -0
- data/stylesheets/archetype/_ui.scss +326 -0
- data/stylesheets/archetype/_util.scss +12 -0
- data/stylesheets/archetype/base/_h5bp.scss +307 -0
- data/stylesheets/archetype/base/_hybrid.scss +25 -0
- data/stylesheets/archetype/base/_normalize.scss +595 -0
- data/stylesheets/archetype/base/_reset.scss +72 -0
- data/stylesheets/archetype/grid/_config.scss +14 -0
- data/stylesheets/archetype/grid/_grid.scss +391 -0
- data/stylesheets/archetype/styleguide/_components.scss +25 -0
- data/stylesheets/archetype/styleguide/_helpers.scss +215 -0
- data/stylesheets/archetype/styleguide/_primitives.scss +10 -0
- data/stylesheets/archetype/styleguide/_styleguide.scss +41 -0
- data/stylesheets/archetype/styleguide/components/_alerts.scss +59 -0
- data/stylesheets/archetype/styleguide/components/_annotations.scss +27 -0
- data/stylesheets/archetype/styleguide/components/_bristol.scss +15 -0
- data/stylesheets/archetype/styleguide/components/_button_groups.scss +47 -0
- data/stylesheets/archetype/styleguide/components/_button_toolbars.scss +17 -0
- data/stylesheets/archetype/styleguide/components/_buttons.scss +338 -0
- data/stylesheets/archetype/styleguide/components/_canvas.scss +15 -0
- data/stylesheets/archetype/styleguide/components/_carets.scss +336 -0
- data/stylesheets/archetype/styleguide/components/_closes.scss +63 -0
- data/stylesheets/archetype/styleguide/components/_container.scss +27 -0
- data/stylesheets/archetype/styleguide/components/_copy.scss +85 -0
- data/stylesheets/archetype/styleguide/components/_flyouts.scss +52 -0
- data/stylesheets/archetype/styleguide/components/_headings.scss +33 -0
- data/stylesheets/archetype/styleguide/components/_headlines.scss +63 -0
- data/stylesheets/archetype/styleguide/components/_hovercards.scss +27 -0
- data/stylesheets/archetype/styleguide/components/_icons.scss +17 -0
- data/stylesheets/archetype/styleguide/components/_identities.scss +34 -0
- data/stylesheets/archetype/styleguide/components/_links.scss +66 -0
- data/stylesheets/archetype/styleguide/components/_loaders.scss +154 -0
- data/stylesheets/archetype/styleguide/components/_menu_items.scss +31 -0
- data/stylesheets/archetype/styleguide/components/_module.scss +15 -0
- data/stylesheets/archetype/styleguide/components/_pullquotes.scss +29 -0
- data/stylesheets/archetype/styleguide/components/_punchcut.scss +18 -0
- data/stylesheets/archetype/styleguide/components/_tooltips.scss +28 -0
- data/stylesheets/archetype/styleguide/primitives/_animations.scss +17 -0
- data/stylesheets/archetype/styleguide/primitives/_dimensions.scss +50 -0
- data/stylesheets/archetype/styleguide/primitives/_glyphs.scss +11 -0
- data/stylesheets/archetype/styleguide/primitives/_misc.scss +8 -0
- data/stylesheets/archetype/styleguide/primitives/_palettes.scss +94 -0
- data/stylesheets/archetype/styleguide/primitives/_shadows.scss +23 -0
- data/stylesheets/archetype/styleguide/primitives/_sprites.scss +46 -0
- data/stylesheets/archetype/styleguide/primitives/_textures.scss +10 -0
- data/stylesheets/archetype/styleguide/primitives/_typography.scss +56 -0
- data/stylesheets/archetype/util/_debug.scss +40 -0
- data/stylesheets/archetype/util/_lists.scss +57 -0
- data/stylesheets/archetype/util/_misc.scss +108 -0
- data/stylesheets/archetype/util/_rtl.scss +279 -0
- data/stylesheets/archetype/util/_spacing.scss +78 -0
- data/stylesheets/archetype/util/_styles.scss +466 -0
- data/stylesheets/archetype/util/_targeting.scss +210 -0
- data/stylesheets/archetype/util/_units.scss +18 -0
- data/templates/example/index.html +40 -0
- data/templates/example/manifest.rb +13 -0
- data/templates/example/screen.scss +99 -0
- data/templates/example/vendor/archetype/animations/loaders/large/large.png +0 -0
- data/templates/example/vendor/archetype/animations/loaders/large/large_dark.png +0 -0
- data/templates/example/vendor/archetype/animations/loaders/large/large_dark_static.png +0 -0
- data/templates/example/vendor/archetype/animations/loaders/large/large_static.png +0 -0
- data/templates/example/vendor/archetype/animations/loaders/medium/medium.png +0 -0
- data/templates/example/vendor/archetype/animations/loaders/medium/medium_dark.png +0 -0
- data/templates/example/vendor/archetype/animations/loaders/medium/medium_dark_static.png +0 -0
- data/templates/example/vendor/archetype/animations/loaders/medium/medium_static.png +0 -0
- data/templates/example/vendor/archetype/animations/loaders/small/small.png +0 -0
- data/templates/example/vendor/archetype/animations/loaders/small/small_dark.png +0 -0
- data/templates/example/vendor/archetype/animations/loaders/small/small_dark_static.png +0 -0
- data/templates/example/vendor/archetype/animations/loaders/small/small_static.png +0 -0
- data/templates/example/vendor/archetype/fontawesome-webfont.eot +0 -0
- data/templates/example/vendor/archetype/fontawesome-webfont.svg +255 -0
- data/templates/example/vendor/archetype/fontawesome-webfont.ttf +0 -0
- data/templates/example/vendor/archetype/fontawesome-webfont.woff +0 -0
- data/templates/project/manifest.rb +9 -0
- data/templates/project/screen.scss +1 -0
- data/templates/project/vendor/archetype/animations/loaders/large/large.png +0 -0
- data/templates/project/vendor/archetype/animations/loaders/large/large_dark.png +0 -0
- data/templates/project/vendor/archetype/animations/loaders/large/large_dark_static.png +0 -0
- data/templates/project/vendor/archetype/animations/loaders/large/large_static.png +0 -0
- data/templates/project/vendor/archetype/animations/loaders/medium/medium.png +0 -0
- data/templates/project/vendor/archetype/animations/loaders/medium/medium_dark.png +0 -0
- data/templates/project/vendor/archetype/animations/loaders/medium/medium_dark_static.png +0 -0
- data/templates/project/vendor/archetype/animations/loaders/medium/medium_static.png +0 -0
- data/templates/project/vendor/archetype/animations/loaders/small/small.png +0 -0
- data/templates/project/vendor/archetype/animations/loaders/small/small_dark.png +0 -0
- data/templates/project/vendor/archetype/animations/loaders/small/small_dark_static.png +0 -0
- data/templates/project/vendor/archetype/animations/loaders/small/small_static.png +0 -0
- data/templates/project/vendor/archetype/fontawesome-webfont.eot +0 -0
- data/templates/project/vendor/archetype/fontawesome-webfont.svg +255 -0
- data/templates/project/vendor/archetype/fontawesome-webfont.ttf +0 -0
- data/templates/project/vendor/archetype/fontawesome-webfont.woff +0 -0
- data/test/fixtures/stylesheets/archetype/assets/fonts/fontawesome-webfont.eot +0 -0
- data/test/fixtures/stylesheets/archetype/assets/fonts/fontawesome-webfont.svg +255 -0
- data/test/fixtures/stylesheets/archetype/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/test/fixtures/stylesheets/archetype/assets/fonts/fontawesome-webfont.woff +0 -0
- data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/large/large.png +0 -0
- data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/large/large_dark.png +0 -0
- data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/large/large_dark_static.png +0 -0
- data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/large/large_static.png +0 -0
- data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/medium/medium.png +0 -0
- data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/medium/medium_dark.png +0 -0
- data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/medium/medium_dark_static.png +0 -0
- data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/medium/medium_static.png +0 -0
- data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/small/small.png +0 -0
- data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/small/small_dark.png +0 -0
- data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/small/small_dark_static.png +0 -0
- data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/small/small_static.png +0 -0
- data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/sprites/hovercard_tip.png +0 -0
- data/test/fixtures/stylesheets/archetype/config.rb +19 -0
- data/test/fixtures/stylesheets/archetype/expected/b.css +14 -0
- data/test/fixtures/stylesheets/archetype/expected/base.css +349 -0
- data/test/fixtures/stylesheets/archetype/expected/hacks/ie_pseudo.css +11 -0
- data/test/fixtures/stylesheets/archetype/expected/locale.css +23 -0
- data/test/fixtures/stylesheets/archetype/expected/styleguide/buttons.css +2091 -0
- data/test/fixtures/stylesheets/archetype/expected/styleguide/fallback_styles.css +9 -0
- data/test/fixtures/stylesheets/archetype/expected/styleguide/nested_styleguides.css +24 -0
- data/test/fixtures/stylesheets/archetype/expected/styleguide/selective_state.css +174 -0
- data/test/fixtures/stylesheets/archetype/expected/ui/glyph_icon.css +37 -0
- data/test/fixtures/stylesheets/archetype/expected/ui/hide_element.css +8 -0
- data/test/fixtures/stylesheets/archetype/expected/ui/stroke.css +17 -0
- data/test/fixtures/stylesheets/archetype/expected/ui/triangle.css +35 -0
- data/test/fixtures/stylesheets/archetype/expected/utilities/associative.css +9 -0
- data/test/fixtures/stylesheets/archetype/expected/utilities/if-set.css +9 -0
- data/test/fixtures/stylesheets/archetype/expected/utilities/spacing/horizontal-spacing.css +29 -0
- data/test/fixtures/stylesheets/archetype/expected/utilities/spacing/vertical-spacing.css +29 -0
- data/test/fixtures/stylesheets/archetype/expected/utilities/styles/filter.css +11 -0
- data/test/fixtures/stylesheets/archetype/expected/utilities/styles/font-family.css +16 -0
- data/test/fixtures/stylesheets/archetype/expected/utilities/styles/z-index.css +15 -0
- data/test/fixtures/stylesheets/archetype/expected/utilities/targeting/target-browser.css +100 -0
- data/test/fixtures/stylesheets/archetype/expected/utilities/targeting/target-os.css +55 -0
- data/test/fixtures/stylesheets/archetype/source/b.scss +9 -0
- data/test/fixtures/stylesheets/archetype/source/base.scss +3 -0
- data/test/fixtures/stylesheets/archetype/source/hacks/ie_pseudo.scss +13 -0
- data/test/fixtures/stylesheets/archetype/source/locale.scss +43 -0
- data/test/fixtures/stylesheets/archetype/source/styleguide/buttons.scss +18 -0
- data/test/fixtures/stylesheets/archetype/source/styleguide/fallback_styles.scss +22 -0
- data/test/fixtures/stylesheets/archetype/source/styleguide/nested_styleguides.scss +40 -0
- data/test/fixtures/stylesheets/archetype/source/styleguide/selective_state.scss +22 -0
- data/test/fixtures/stylesheets/archetype/source/ui/glyph_icon.scss +13 -0
- data/test/fixtures/stylesheets/archetype/source/ui/hide_element.scss +5 -0
- data/test/fixtures/stylesheets/archetype/source/ui/stroke.scss +13 -0
- data/test/fixtures/stylesheets/archetype/source/ui/triangle.scss +13 -0
- data/test/fixtures/stylesheets/archetype/source/utilities/associative.scss +24 -0
- data/test/fixtures/stylesheets/archetype/source/utilities/if-set.scss +16 -0
- data/test/fixtures/stylesheets/archetype/source/utilities/spacing/horizontal-spacing.scss +27 -0
- data/test/fixtures/stylesheets/archetype/source/utilities/spacing/vertical-spacing.scss +27 -0
- data/test/fixtures/stylesheets/archetype/source/utilities/styles/filter.scss +9 -0
- data/test/fixtures/stylesheets/archetype/source/utilities/styles/font-family.scss +9 -0
- data/test/fixtures/stylesheets/archetype/source/utilities/styles/z-index.scss +18 -0
- data/test/fixtures/stylesheets/archetype/source/utilities/targeting/target-browser.scss +70 -0
- data/test/fixtures/stylesheets/archetype/source/utilities/targeting/target-os.scss +42 -0
- data/test/helpers/diff.rb +49 -0
- data/test/helpers/io.rb +36 -0
- data/test/helpers/test_case.rb +62 -0
- data/test/integrations/archetype_test.rb +126 -0
- data/test/test_helper.rb +26 -0
- data/test/units/sass_extensions_test.rb +207 -0
- 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,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,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
|
+
}
|