archetype 0.0.1.pre.3.90263a7 → 0.0.1.pre.3.811928f
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +1 -24
- data/LICENSE +1 -1
- data/README.md +1 -1
- data/VERSION.yml +1 -1
- data/lib/archetype.rb +0 -4
- data/lib/archetype/functions/hash.rb +12 -28
- data/lib/archetype/functions/helpers.rb +13 -56
- data/lib/archetype/functions/styleguide_memoizer.rb +1 -9
- data/lib/archetype/sass_extensions.rb +0 -1
- data/lib/archetype/sass_extensions/functions/lists.rb +40 -34
- data/lib/archetype/sass_extensions/functions/locale.rb +16 -32
- data/lib/archetype/sass_extensions/functions/styleguide.rb +37 -115
- data/lib/archetype/sass_extensions/functions/ui.rb +2 -3
- data/lib/archetype/sass_extensions/functions/version.rb +6 -11
- data/lib/archetype/version.rb +12 -19
- data/stylesheets/archetype/_base.scss +0 -3
- data/stylesheets/archetype/_config.scss +5 -22
- data/stylesheets/archetype/_hacks.scss +21 -62
- data/stylesheets/archetype/_ui.scss +11 -56
- data/stylesheets/archetype/base/_h5bp.scss +12 -12
- data/stylesheets/archetype/base/_normalize.scss +139 -178
- data/stylesheets/archetype/styleguide/_helpers.scss +4 -1
- data/stylesheets/archetype/styleguide/components/_alerts.scss +1 -1
- data/stylesheets/archetype/styleguide/components/_buttons.scss +6 -7
- data/stylesheets/archetype/styleguide/components/_closes.scss +2 -2
- data/stylesheets/archetype/util/_styles.scss +7 -45
- data/stylesheets/archetype/util/_targeting.scss +0 -2
- data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders-s7889ccc8c1.png +0 -0
- data/test/fixtures/stylesheets/archetype/config.rb +0 -2
- data/test/fixtures/stylesheets/archetype/expected/hacks/ie_pseudo.css +3 -3
- data/test/fixtures/stylesheets/archetype/expected/styleguide/buttons.css +18 -110
- data/test/fixtures/stylesheets/archetype/expected/styleguide/selective_state.css +0 -3
- data/test/fixtures/stylesheets/archetype/expected/ui/glyph_icon.css +2 -116
- data/test/fixtures/stylesheets/archetype/expected/utilities/targeting/target-browser.css +0 -5
- data/test/fixtures/stylesheets/archetype/source/styleguide/buttons.scss +1 -5
- data/test/fixtures/stylesheets/archetype/source/styleguide/fallback_styles.scss +1 -1
- data/test/fixtures/stylesheets/archetype/source/styleguide/nested_styleguides.scss +1 -1
- data/test/fixtures/stylesheets/archetype/source/styleguide/selective_state.scss +1 -1
- data/test/fixtures/stylesheets/archetype/source/ui/glyph_icon.scss +0 -30
- data/test/fixtures/stylesheets/archetype/source/utilities/targeting/target-browser.scss +1 -8
- data/test/helpers/test_case.rb +2 -2
- data/test/integrations/archetype_test.rb +1 -3
- data/test/units/sass_extensions_test.rb +25 -18
- metadata +23 -80
- checksums.yaml +0 -7
- data/bin/archetype +0 -3
- data/lib/archetype/actions/help.rb +0 -16
- data/lib/archetype/actions/theme.rb +0 -73
- data/lib/archetype/executor.rb +0 -27
- data/lib/archetype/sass_extensions/monkey_patches.rb +0 -3
- data/lib/archetype/sass_extensions/monkey_patches/handle_include_loop.rb +0 -41
- data/templates/_theme/_components.scss +0 -3
- data/templates/_theme/_config.scss +0 -1
- data/templates/_theme/_core.scss +0 -13
- data/templates/_theme/_helpers.scss +0 -1
- data/templates/_theme/_primitives.scss +0 -3
- data/templates/_theme/components/README +0 -1
- data/templates/_theme/primitives/README +0 -1
- data/test/fixtures/stylesheets/archetype/expected/base.css +0 -349
- data/test/fixtures/stylesheets/archetype/expected/hacks/transparent_focusable.css +0 -4
- data/test/fixtures/stylesheets/archetype/expected/locale.css +0 -23
- data/test/fixtures/stylesheets/archetype/expected/styleguide/alerts.css +0 -675
- data/test/fixtures/stylesheets/archetype/expected/styleguide/drop.css +0 -63
- data/test/fixtures/stylesheets/archetype/expected/styleguide/extend.css +0 -7
- data/test/fixtures/stylesheets/archetype/expected/styleguide/invalid_structures.css +0 -21
- data/test/fixtures/stylesheets/archetype/expected/styleguide/multi_value.css +0 -13
- data/test/fixtures/stylesheets/archetype/expected/utilities/associative.css +0 -9
- data/test/fixtures/stylesheets/archetype/expected/utilities/custom_output_styler.css +0 -8
- data/test/fixtures/stylesheets/archetype/source/base.scss +0 -3
- data/test/fixtures/stylesheets/archetype/source/hacks/transparent_focusable.scss +0 -5
- data/test/fixtures/stylesheets/archetype/source/locale.scss +0 -43
- data/test/fixtures/stylesheets/archetype/source/styleguide/alerts.scss +0 -21
- data/test/fixtures/stylesheets/archetype/source/styleguide/drop.scss +0 -101
- data/test/fixtures/stylesheets/archetype/source/styleguide/extend.scss +0 -23
- data/test/fixtures/stylesheets/archetype/source/styleguide/invalid_structures.scss +0 -85
- data/test/fixtures/stylesheets/archetype/source/styleguide/multi_value.scss +0 -18
- data/test/fixtures/stylesheets/archetype/source/utilities/associative.scss +0 -24
- data/test/fixtures/stylesheets/archetype/source/utilities/custom_output_styler.scss +0 -21
@@ -1,63 +0,0 @@
|
|
1
|
-
.dropping-styles-test {
|
2
|
-
/* should contain hover state and .test selector */
|
3
|
-
display: block;
|
4
|
-
color: red;
|
5
|
-
background: green;
|
6
|
-
}
|
7
|
-
.dropping-styles-test.hover, .dropping-styles-test:hover, .dropping-styles-test.focus, .dropping-styles-test:focus {
|
8
|
-
background: #eeeeee;
|
9
|
-
border: 2px solid red;
|
10
|
-
}
|
11
|
-
.dropping-styles-test.hover .test, .dropping-styles-test:hover .test, .dropping-styles-test.focus .test, .dropping-styles-test:focus .test {
|
12
|
-
padding: 100px;
|
13
|
-
margin: 20px;
|
14
|
-
}
|
15
|
-
.dropping-styles-test.parent {
|
16
|
-
/* should contain hover state and .test selector */
|
17
|
-
display: none;
|
18
|
-
color: black;
|
19
|
-
background: green;
|
20
|
-
}
|
21
|
-
.dropping-styles-test.parent.hover, .dropping-styles-test.parent:hover, .dropping-styles-test.parent.focus, .dropping-styles-test.parent:focus {
|
22
|
-
background: #eeeeee;
|
23
|
-
border: 2px solid red;
|
24
|
-
}
|
25
|
-
.dropping-styles-test.parent.hover .test, .dropping-styles-test.parent:hover .test, .dropping-styles-test.parent.focus .test, .dropping-styles-test.parent:focus .test {
|
26
|
-
padding: 100px;
|
27
|
-
margin: 20px;
|
28
|
-
}
|
29
|
-
.dropping-styles-test.heir {
|
30
|
-
/* should contain hover state and .test selector */
|
31
|
-
display: none;
|
32
|
-
color: black;
|
33
|
-
background: green;
|
34
|
-
}
|
35
|
-
.dropping-styles-test.heir.hover, .dropping-styles-test.heir:hover, .dropping-styles-test.heir.focus, .dropping-styles-test.heir:focus {
|
36
|
-
background: #eeeeee;
|
37
|
-
border: 2px solid red;
|
38
|
-
}
|
39
|
-
.dropping-styles-test.heir.hover .test, .dropping-styles-test.heir:hover .test, .dropping-styles-test.heir.focus .test, .dropping-styles-test.heir:focus .test {
|
40
|
-
padding: 100px;
|
41
|
-
margin: 20px;
|
42
|
-
}
|
43
|
-
.dropping-styles-test.dropped {
|
44
|
-
/* should only contain color:yellow */
|
45
|
-
color: yellow;
|
46
|
-
}
|
47
|
-
.dropping-styles-test.dropped2 {
|
48
|
-
/* should contain color:yellow, custom :hover, :active */
|
49
|
-
color: yellow;
|
50
|
-
}
|
51
|
-
.dropping-styles-test.dropped2.hover, .dropping-styles-test.dropped2:hover, .dropping-styles-test.dropped2.focus, .dropping-styles-test.dropped2:focus {
|
52
|
-
color: blue;
|
53
|
-
}
|
54
|
-
.dropping-styles-test.dropped2.active, .dropping-styles-test.dropped2:active {
|
55
|
-
color: green;
|
56
|
-
width: 100%;
|
57
|
-
}
|
58
|
-
.dropping-styles-test.dropped3 {
|
59
|
-
/* should only contain color:purple */
|
60
|
-
display: block;
|
61
|
-
color: purple;
|
62
|
-
background: green;
|
63
|
-
}
|
@@ -1,21 +0,0 @@
|
|
1
|
-
.test-missing-nil {
|
2
|
-
color: red;
|
3
|
-
}
|
4
|
-
|
5
|
-
.test-missing-nil-2 {
|
6
|
-
color: yellow;
|
7
|
-
}
|
8
|
-
|
9
|
-
.test-missing-nil-3 {
|
10
|
-
color: blue;
|
11
|
-
}
|
12
|
-
.test-missing-nil-3.hover, .test-missing-nil-3:hover, .test-missing-nil-3.focus, .test-missing-nil-3:focus {
|
13
|
-
color: black;
|
14
|
-
background: green;
|
15
|
-
font-weight: bold;
|
16
|
-
}
|
17
|
-
|
18
|
-
.test-missing-comma {
|
19
|
-
color: white;
|
20
|
-
background: green;
|
21
|
-
}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
.multi-value-styleguide-test {
|
2
|
-
color: gray;
|
3
|
-
color: rgba(0, 0, 0, 0.7);
|
4
|
-
background: white;
|
5
|
-
background: transparent;
|
6
|
-
*color: blue;
|
7
|
-
}
|
8
|
-
.ie.ie8 .multi-value-styleguide-test {
|
9
|
-
color: red;
|
10
|
-
}
|
11
|
-
.multi-value-styleguide-test, .multi-value-styleguide-test x:-moz-any-link {
|
12
|
-
color: pink;
|
13
|
-
}
|
@@ -1,43 +0,0 @@
|
|
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
|
-
}
|
@@ -1,21 +0,0 @@
|
|
1
|
-
@import "archetype";
|
2
|
-
|
3
|
-
@each $type in (error success notice yield) {
|
4
|
-
.alert.#{$type} {
|
5
|
-
@include styleguide($type alert);
|
6
|
-
.dismiss {
|
7
|
-
@include styleguide(close in a $type alert);
|
8
|
-
}
|
9
|
-
}
|
10
|
-
}
|
11
|
-
|
12
|
-
$CONFIG_GENERATED_TAG_INLINE: false;
|
13
|
-
|
14
|
-
@each $type in (error success notice yield) {
|
15
|
-
.alert.#{$type} {
|
16
|
-
@include styleguide($type alert);
|
17
|
-
.dismiss {
|
18
|
-
@include styleguide(close in a $type alert);
|
19
|
-
}
|
20
|
-
}
|
21
|
-
}
|
@@ -1,101 +0,0 @@
|
|
1
|
-
@import "archetype";
|
2
|
-
|
3
|
-
@if not styleguide-component-exists(dropping-styles-test, $CONFIG_THEME) {
|
4
|
-
$a-blackhole: styleguide-add-component(dropping-styles-test, (), (
|
5
|
-
(default, (
|
6
|
-
display block,
|
7
|
-
color red,
|
8
|
-
background green,
|
9
|
-
(states, (
|
10
|
-
(hover, (
|
11
|
-
styleguide module,
|
12
|
-
border (2px solid red),
|
13
|
-
(selectors, (
|
14
|
-
('.test', (
|
15
|
-
padding 100px,
|
16
|
-
margin 20px
|
17
|
-
)),
|
18
|
-
nil
|
19
|
-
))
|
20
|
-
)),
|
21
|
-
nil
|
22
|
-
))
|
23
|
-
)),
|
24
|
-
(parent, (
|
25
|
-
display none,
|
26
|
-
color black
|
27
|
-
)),
|
28
|
-
(heir, (
|
29
|
-
inherit (parent),
|
30
|
-
nil
|
31
|
-
)),
|
32
|
-
(dropped, (
|
33
|
-
drop true,
|
34
|
-
color yellow
|
35
|
-
)),
|
36
|
-
(dropped2, (
|
37
|
-
drop true,
|
38
|
-
color yellow,
|
39
|
-
(states, (
|
40
|
-
(hover, (
|
41
|
-
color blue,
|
42
|
-
nil
|
43
|
-
)),
|
44
|
-
(active, (
|
45
|
-
color green,
|
46
|
-
width 100%
|
47
|
-
)),
|
48
|
-
nil
|
49
|
-
))
|
50
|
-
)),
|
51
|
-
(dropped3, (
|
52
|
-
color purple,
|
53
|
-
(states, (
|
54
|
-
drop hover, // TODO: this is currently throwing an ambiguous warning, need to investigate
|
55
|
-
nil
|
56
|
-
)),
|
57
|
-
nil
|
58
|
-
)),
|
59
|
-
(dropped4, (
|
60
|
-
color purple,
|
61
|
-
(states, (
|
62
|
-
(hover, (
|
63
|
-
drop selectors,
|
64
|
-
nil
|
65
|
-
)),
|
66
|
-
nil
|
67
|
-
))
|
68
|
-
)),
|
69
|
-
nil
|
70
|
-
), $CONFIG_THEME);
|
71
|
-
}
|
72
|
-
|
73
|
-
.dropping-styles-test {
|
74
|
-
/* should contain hover state and .test selector */
|
75
|
-
@include styleguide(dropping-styles-test);
|
76
|
-
&.parent {
|
77
|
-
/* should contain hover state and .test selector */
|
78
|
-
@include styleguide(parent dropping-styles-test);
|
79
|
-
}
|
80
|
-
&.heir {
|
81
|
-
/* should contain hover state and .test selector */
|
82
|
-
@include styleguide(heir dropping-styles-test);
|
83
|
-
}
|
84
|
-
&.dropped {
|
85
|
-
/* should only contain color:yellow */
|
86
|
-
@include styleguide(dropped dropping-styles-test);
|
87
|
-
}
|
88
|
-
&.dropped2 {
|
89
|
-
/* should contain color:yellow, custom :hover, :active */
|
90
|
-
@include styleguide(dropped2 dropping-styles-test);
|
91
|
-
}
|
92
|
-
&.dropped3 {
|
93
|
-
/* should only contain color:purple */
|
94
|
-
@include styleguide(dropped3 dropping-styles-test);
|
95
|
-
}
|
96
|
-
// TODO fix this guy: drops nested multiple levels deep don't resolve yet :(
|
97
|
-
//&.dropped4 {
|
98
|
-
// /* should contain color:purple, :hover, but no `.test` selector */
|
99
|
-
// @include styleguide(dropped4 dropping-styles-test);
|
100
|
-
//}
|
101
|
-
}
|
@@ -1,23 +0,0 @@
|
|
1
|
-
@import "archetype";
|
2
|
-
|
3
|
-
.some-extend-class {
|
4
|
-
color: red;
|
5
|
-
}
|
6
|
-
|
7
|
-
%some-extend-placeholder {
|
8
|
-
background: green;
|
9
|
-
}
|
10
|
-
|
11
|
-
@if not styleguide-component-exists(extend-styleguide-test, $CONFIG_THEME) {
|
12
|
-
$a-blackhole: styleguide-add-component(extend-styleguide-test, (), (
|
13
|
-
(default, (
|
14
|
-
extend '.some-extend-class',
|
15
|
-
extend '%some-extend-placeholder'
|
16
|
-
)),
|
17
|
-
nil
|
18
|
-
), $CONFIG_THEME);
|
19
|
-
}
|
20
|
-
|
21
|
-
.extend-styleguide-test {
|
22
|
-
@include styleguide(extend-styleguide-test);
|
23
|
-
}
|
@@ -1,85 +0,0 @@
|
|
1
|
-
@import "archetype";
|
2
|
-
|
3
|
-
// this should throw a warning because we can't retrieve the key-value pairs for the top level
|
4
|
-
@if not styleguide-component-exists(test-missing-nil, $CONFIG_THEME) {
|
5
|
-
$a-blackhole: styleguide-add-component(test-missing-nil, (), (
|
6
|
-
(default, (
|
7
|
-
color red,
|
8
|
-
nil
|
9
|
-
))
|
10
|
-
// missing nil
|
11
|
-
), $CONFIG_THEME);
|
12
|
-
}
|
13
|
-
|
14
|
-
// this should still throw a warning because we can't retrieve the key-value pairs for the properties
|
15
|
-
@if not styleguide-component-exists(test-missing-nil-2, $CONFIG_THEME) {
|
16
|
-
$a-blackhole: styleguide-add-component(test-missing-nil-2, (), (
|
17
|
-
(default, (
|
18
|
-
color yellow
|
19
|
-
// missing nil
|
20
|
-
)),
|
21
|
-
nil
|
22
|
-
), $CONFIG_THEME);
|
23
|
-
}
|
24
|
-
|
25
|
-
// this should still throw a warning because we can't retrieve the key-value pairs for the properties
|
26
|
-
@if not styleguide-component-exists(test-missing-comma, $CONFIG_THEME) {
|
27
|
-
$a-blackhole: styleguide-add-component(test-missing-nil-3, (), (
|
28
|
-
(default, (
|
29
|
-
color blue,
|
30
|
-
(states, (
|
31
|
-
(hover, (
|
32
|
-
color black,
|
33
|
-
background green,
|
34
|
-
font-weight bold
|
35
|
-
))
|
36
|
-
))
|
37
|
-
)),
|
38
|
-
nil
|
39
|
-
), $CONFIG_THEME);
|
40
|
-
}
|
41
|
-
|
42
|
-
// this should throw a warning because we probably forgot a comma somewhere
|
43
|
-
@if not styleguide-component-exists(test-missing-comma, $CONFIG_THEME) {
|
44
|
-
$a-blackhole: styleguide-add-component(test-missing-comma, (), (
|
45
|
-
(default, (
|
46
|
-
color white,
|
47
|
-
background green // missing comma
|
48
|
-
(states, (
|
49
|
-
(hover, (
|
50
|
-
color black,
|
51
|
-
background green,
|
52
|
-
font-weight bold
|
53
|
-
)),
|
54
|
-
nil
|
55
|
-
))
|
56
|
-
)),
|
57
|
-
nil
|
58
|
-
), $CONFIG_THEME);
|
59
|
-
}
|
60
|
-
|
61
|
-
// this should throw a warning because we used an empty value for a property
|
62
|
-
@if not styleguide-component-exists(test-empty-value, $CONFIG_THEME) {
|
63
|
-
$a-blackhole: styleguide-add-component(test-empty-value, (), (
|
64
|
-
(default, (
|
65
|
-
color // this is ambiguous, but shouldn't cause an error
|
66
|
-
)),
|
67
|
-
nil
|
68
|
-
), $CONFIG_THEME);
|
69
|
-
}
|
70
|
-
|
71
|
-
.test-missing-nil {
|
72
|
-
@include styleguide(test-missing-nil);
|
73
|
-
}
|
74
|
-
.test-missing-nil-2 {
|
75
|
-
@include styleguide(test-missing-nil-2);
|
76
|
-
}
|
77
|
-
.test-missing-nil-3 {
|
78
|
-
@include styleguide(test-missing-nil-3);
|
79
|
-
}
|
80
|
-
.test-missing-comma {
|
81
|
-
@include styleguide(test-missing-comma);
|
82
|
-
}
|
83
|
-
.test-empty-value {
|
84
|
-
@include styleguide(test-empty-value);
|
85
|
-
}
|
@@ -1,18 +0,0 @@
|
|
1
|
-
@import "archetype";
|
2
|
-
|
3
|
-
@if not styleguide-component-exists(multi-value-styleguide-test, $CONFIG_THEME) {
|
4
|
-
$a-blackhole: styleguide-add-component(multi-value-styleguide-test, (), (
|
5
|
-
(default, (
|
6
|
-
color gray,
|
7
|
-
color rgba(0,0,0, 0.7),
|
8
|
-
background white,
|
9
|
-
background transparent,
|
10
|
-
target-browser (ie lte 7, color, blue),
|
11
|
-
target-browser (ie 8, color, red),
|
12
|
-
target-browser (firefox, color, pink)
|
13
|
-
))
|
14
|
-
), $CONFIG_THEME);
|
15
|
-
}
|
16
|
-
.multi-value-styleguide-test {
|
17
|
-
@include styleguide(multi-value-styleguide-test);
|
18
|
-
}
|
@@ -1,24 +0,0 @@
|
|
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
|
-
}
|