archetype 0.0.1.pre.10 → 0.0.1.pre.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/lib/archetype.rb +0 -4
  3. data/lib/archetype/functions/hash.rb +12 -28
  4. data/lib/archetype/functions/helpers.rb +13 -46
  5. data/lib/archetype/functions/styleguide_memoizer.rb +1 -9
  6. data/lib/archetype/sass_extensions/functions/lists.rb +42 -36
  7. data/lib/archetype/sass_extensions/functions/locale.rb +16 -32
  8. data/lib/archetype/sass_extensions/functions/styleguide.rb +39 -121
  9. data/lib/archetype/sass_extensions/functions/ui.rb +2 -3
  10. data/lib/archetype/sass_extensions/functions/version.rb +6 -11
  11. data/lib/archetype/sass_extensions/monkey_patches.rb +1 -1
  12. data/lib/archetype/version.rb +1 -1
  13. data/stylesheets/archetype/_base.scss +2 -7
  14. data/stylesheets/archetype/_config.scss +1 -8
  15. data/stylesheets/archetype/_hacks.scss +17 -51
  16. data/stylesheets/archetype/_ui.scss +5 -16
  17. data/stylesheets/archetype/base/_h5bp.scss +12 -12
  18. data/stylesheets/archetype/base/_normalize.scss +139 -178
  19. data/stylesheets/archetype/grid/_grid.scss +13 -13
  20. data/stylesheets/archetype/styleguide/components/_buttons.scss +0 -1
  21. data/stylesheets/archetype/util/_debug.scss +4 -4
  22. data/stylesheets/archetype/util/_lists.scss +1 -1
  23. data/stylesheets/archetype/util/_misc.scss +1 -1
  24. data/stylesheets/archetype/util/_rtl.scss +1 -1
  25. data/stylesheets/archetype/util/_spacing.scss +6 -6
  26. data/stylesheets/archetype/util/_styles.scss +10 -27
  27. data/stylesheets/archetype/util/_targeting.scss +1 -1
  28. data/test/fixtures/stylesheets/archetype/config.rb +0 -2
  29. data/test/fixtures/stylesheets/archetype/saved/styleguide/buttons.css +2027 -0
  30. data/test/fixtures/stylesheets/archetype/saved/styleguide/fallback_styles.css +9 -0
  31. data/test/fixtures/stylesheets/archetype/source/styleguide/buttons.scss +1 -5
  32. data/test/fixtures/stylesheets/archetype/source/styleguide/fallback_styles.scss +2 -1
  33. data/test/fixtures/stylesheets/archetype/source/styleguide/nested_styleguides.scss +1 -1
  34. data/test/fixtures/stylesheets/archetype/source/styleguide/selective_state.scss +1 -1
  35. data/test/fixtures/stylesheets/archetype/source/ui/glyph_icon.scss +0 -30
  36. data/test/fixtures/stylesheets/archetype/source/utilities/custom_output_styler.scss +3 -4
  37. data/test/fixtures/stylesheets/archetype/source/utilities/targeting/target-browser.scss +1 -8
  38. data/test/helpers/test_case.rb +2 -2
  39. data/test/integrations/archetype_test.rb +1 -3
  40. data/test/units/sass_extensions_test.rb +25 -18
  41. metadata +6 -29
  42. data/lib/archetype/actions/help.rb +0 -16
  43. data/lib/archetype/actions/theme.rb +0 -73
  44. data/lib/archetype/executor.rb +0 -27
  45. data/test/fixtures/stylesheets/archetype/saved/base.css +0 -349
  46. data/test/fixtures/stylesheets/archetype/saved/hacks/transparent_focusable.css +0 -4
  47. data/test/fixtures/stylesheets/archetype/saved/locale.css +0 -23
  48. data/test/fixtures/stylesheets/archetype/source/base.scss +0 -3
  49. data/test/fixtures/stylesheets/archetype/source/hacks/transparent_focusable.scss +0 -5
  50. data/test/fixtures/stylesheets/archetype/source/locale.scss +0 -43
  51. data/test/fixtures/stylesheets/archetype/source/styleguide/alerts.scss +0 -21
  52. data/test/fixtures/stylesheets/archetype/source/styleguide/drop.scss +0 -101
  53. data/test/fixtures/stylesheets/archetype/source/styleguide/extend.scss +0 -24
  54. data/test/fixtures/stylesheets/archetype/source/styleguide/invalid_structures.scss +0 -85
  55. data/test/fixtures/stylesheets/archetype/source/styleguide/multi_value.scss +0 -18
  56. data/test/fixtures/stylesheets/archetype/source/utilities/associative.scss +0 -24
@@ -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,24 +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
- content $CONTENT_PLACEHOLDER
17
- )),
18
- nil
19
- ), $CONFIG_THEME);
20
- }
21
-
22
- .extend-styleguide-test {
23
- @include styleguide(extend-styleguide-test);
24
- }
@@ -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
- }