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,17 @@
1
+ // ==========
2
+ // BUTTON TOOLBAR
3
+ // ==========
4
+ $STYLEGUIDE_BUTTON_TOOLBARS_ID: button-toolbar !default;
5
+ $STYLEGUIDE_BUTTON_TOOLBARS: () !default;
6
+
7
+ @if not styleguide-component-exists($STYLEGUIDE_BUTTON_TOOLBARS_ID, $CONFIG_THEME) {
8
+ $a-blackhole: styleguide-add-component($STYLEGUIDE_BUTTON_TOOLBARS_ID, $STYLEGUIDE_BUTTON_TOOLBARS, (
9
+ (default, (
10
+ line-height 1,
11
+ inline-block true,
12
+ vertical-align middle,
13
+ clearfix legacy-pie-clearfix
14
+ )),
15
+ nil
16
+ ), $CONFIG_THEME);
17
+ }
@@ -0,0 +1,338 @@
1
+ // ==========
2
+ // BUTTONS
3
+ // ==========
4
+ $STYLEGUIDE_BUTTONS_ID: button !default;
5
+ $STYLEGUIDE_BUTTONS: () !default;
6
+
7
+ @if not styleguide-component-exists($STYLEGUIDE_BUTTONS_ID, $CONFIG_THEME) {
8
+ $a-blackhole: styleguide-add-component($STYLEGUIDE_BUTTONS_ID, $STYLEGUIDE_BUTTONS, (
9
+ (default, (
10
+ // these are common between all buttons
11
+ font-weight bold,
12
+ border-width $CONFIG_DIM_GENERIC_BORDER,
13
+ border-style solid,
14
+ cursor pointer,
15
+ margin 0,
16
+ overflow visible,
17
+ text-decoration (none !important),
18
+ width auto,
19
+ text-shadow $CONFIG_SHADOW_BUTTON_TEXT,
20
+ // sizing
21
+ border-radius $CONFIG_DIM_BUTTON_RADIUS,
22
+ padding _styleguideGetButtonPadding(medium),
23
+ // we set the size intentionally two pixels large and use box-sizing to adjust it
24
+ // this makes IE6/7 behave properly and other browsers adjust correctly
25
+ height (_styleguideGetButtonHeight(medium) + (2*$CONFIG_DIM_GENERIC_BORDER)),
26
+ line-height _styleguideGetButtonHeight(medium),
27
+ box-sizing border-box,
28
+ font-size nth($CONFIG_FONT_BUTTON_MEDIUM, 1),
29
+ // palette
30
+ color $CONFIG_COLOR_BUTTON_PRIMARY,
31
+ background-color $CONFIG_COLOR_BG_BUTTON_PRIMARY,
32
+ border-color $CONFIG_COLOR_BORDER_BUTTON_PRIMARY,
33
+ filter-gradient $CONFIG_GRADIENT_BUTTON_PRIMARY_IE,
34
+ background-image $CONFIG_GRADIENT_BUTTON_PRIMARY,
35
+ white-space nowrap,
36
+ // alignment
37
+ inline-block true, // this will use the inline-block() mixin
38
+ vertical-align middle,
39
+ // states
40
+ (states, (
41
+ (hover, (
42
+ background-color $CONFIG_COLOR_BG_BUTTON_PRIMARY_HOVER,
43
+ filter-gradient $CONFIG_GRADIENT_BUTTON_PRIMARY_HOVER_IE,
44
+ background-image $CONFIG_GRADIENT_BUTTON_PRIMARY_HOVER,
45
+ box-shadow $CONFIG_SHADOW_BUTTON_HOVER
46
+ )),
47
+ (active, (
48
+ box-shadow $CONFIG_SHADOW_BUTTON_ACTIVE,
49
+ nil
50
+ )),
51
+ (disabled, (
52
+ background-color $CONFIG_COLOR_BG_BUTTON_PRIMARY_HOVER,
53
+ filter-gradient $CONFIG_GRADIENT_BUTTON_PRIMARY_HOVER_IE,
54
+ background-image $CONFIG_GRADIENT_BUTTON_PRIMARY_HOVER,
55
+ box-shadow none,
56
+ cursor default,
57
+ opacity $CONFIG_OPACITY_BUTTON_DISABLED
58
+ ))
59
+ ))
60
+ )),
61
+ // IMPORTANCE
62
+ (primary, (
63
+ // inherits from default
64
+ nil
65
+ )),
66
+ (secondary, (
67
+ text-shadow $CONFIG_SHADOW_BUTTON_TEXT_INVERTED,
68
+ color $CONFIG_COLOR_BUTTON_SECONDARY,
69
+ background-color $CONFIG_COLOR_BG_BUTTON_SECONDARY,
70
+ border-color $CONFIG_COLOR_BORDER_BUTTON_SECONDARY,
71
+ filter-gradient $CONFIG_GRADIENT_BUTTON_SECONDARY_IE,
72
+ background-image $CONFIG_GRADIENT_BUTTON_SECONDARY,
73
+ (states, (
74
+ (hover, (
75
+ background-color $CONFIG_COLOR_BG_BUTTON_SECONDARY_HOVER,
76
+ filter-gradient $CONFIG_GRADIENT_BUTTON_SECONDARY_HOVER_IE,
77
+ background-image $CONFIG_GRADIENT_BUTTON_SECONDARY_HOVER
78
+ )),
79
+ (disabled, (
80
+ background-color $CONFIG_COLOR_BG_BUTTON_SECONDARY_HOVER,
81
+ filter-gradient $CONFIG_GRADIENT_BUTTON_SECONDARY_HOVER_IE,
82
+ background-image $CONFIG_GRADIENT_BUTTON_SECONDARY_HOVER
83
+ ))
84
+ ))
85
+ )),
86
+ (spotlight, (
87
+ text-shadow $CONFIG_SHADOW_BUTTON_TEXT_INVERTED,
88
+ background-color $CONFIG_COLOR_BG_BUTTON_SPOTLIGHT,
89
+ border-color $CONFIG_COLOR_BORDER_BUTTON_SPOTLIGHT,
90
+ color $CONFIG_COLOR_BUTTON_SPOTLIGHT,
91
+ filter-gradient $CONFIG_GRADIENT_BUTTON_SPOTLIGHT_IE,
92
+ background-image $CONFIG_GRADIENT_BUTTON_SPOTLIGHT,
93
+ (states, (
94
+ (hover, (
95
+ background-color $CONFIG_COLOR_BG_BUTTON_SPOTLIGHT_HOVER,
96
+ filter-gradient $CONFIG_GRADIENT_BUTTON_SPOTLIGHT_HOVER_IE,
97
+ background-image $CONFIG_GRADIENT_BUTTON_SPOTLIGHT_HOVER
98
+ )),
99
+ (disabled, (
100
+ background-color $CONFIG_COLOR_BG_BUTTON_SPOTLIGHT_HOVER,
101
+ filter-gradient $CONFIG_GRADIENT_BUTTON_SPOTLIGHT_HOVER_IE,
102
+ background-image $CONFIG_GRADIENT_BUTTON_SPOTLIGHT_HOVER
103
+ ))
104
+ ))
105
+ )),
106
+ // CONTEXTS
107
+ // in a dark context
108
+ (in-dark, (
109
+ border-color $CONFIG_COLOR_BORDER_BUTTON_DARK,
110
+ nil
111
+ )),
112
+ // IMPORTANCE in CONTEXTS
113
+ ((primary in-dark), (
114
+ (states, (
115
+ (hover, (
116
+ background-color $CONFIG_COLOR_BG_BUTTON_PRIMARY_DARK_HOVER,
117
+ filter-gradient $CONFIG_GRADIENT_BUTTON_PRIMARY_DARK_HOVER_IE,
118
+ background-image $CONFIG_GRADIENT_BUTTON_PRIMARY_DARK_HOVER
119
+ )),
120
+ nil
121
+ )),
122
+ nil
123
+ )),
124
+ ((secondary in-dark), (
125
+ (states, (
126
+ (hover, (
127
+ background-color $CONFIG_COLOR_BG_BUTTON_SECONDARY_DARK_HOVER,
128
+ filter-gradient $CONFIG_GRADIENT_BUTTON_SECONDARY_DARK_HOVER_IE,
129
+ background-image $CONFIG_GRADIENT_BUTTON_SECONDARY_DARK_HOVER
130
+ )),
131
+ nil
132
+ )),
133
+ nil
134
+ )),
135
+ ((spotlight in-dark), (
136
+ (states, (
137
+ (hover, (
138
+ background-color $CONFIG_COLOR_BG_BUTTON_SPOTLIGHT_DARK_HOVER,
139
+ filter-gradient $CONFIG_GRADIENT_BUTTON_SPOTLIGHT_DARK_HOVER_IE,
140
+ background-image $CONFIG_GRADIENT_BUTTON_SPOTLIGHT_DARK_HOVER
141
+ )),
142
+ nil
143
+ )),
144
+ nil
145
+ )),
146
+ // in the punchcut context (inherit from in-dark)
147
+ (primary in-punchcut, (
148
+ inherit (primary in-dark),
149
+ nil
150
+ )),
151
+ (secondary in-punchcut, (
152
+ inherit (secondary in-dark),
153
+ nil
154
+ )),
155
+ (spotlight in-punchcut, (
156
+ inherit (spotlight in-dark),
157
+ nil
158
+ )),
159
+ // in the bristol context (inherit from in-dark)
160
+ (primary in-bristol, (
161
+ inherit (primary in-dark),
162
+ nil
163
+ )),
164
+ (secondary in-bristol, (
165
+ inherit (secondary in-dark),
166
+ nil
167
+ )),
168
+ (spotlight in-bristol, (
169
+ inherit (spotlight in-dark),
170
+ nil
171
+ )),
172
+ // BUTTON TOOLBARS
173
+ (in-button-toolbar, (
174
+ margin-right $CONFIG_DIM_BUTTON_SPACING_OUTER,
175
+ float left,
176
+ display block,
177
+ inline-block nil
178
+ )),
179
+ (small in-button-toolbar, (
180
+ margin-right $CONFIG_DIM_BUTTON_SPACING_OUTER_NARROW,
181
+ nil
182
+ )),
183
+ (last in-button-toolbar, (
184
+ margin-right nil,
185
+ nil
186
+ )),
187
+ (right aligned in-button-toolbar, (
188
+ float right,
189
+ margin-right nil,
190
+ margin-left $CONFIG_DIM_BUTTON_SPACING_OUTER
191
+ )),
192
+ (right aligned small in-button-toolbar, (
193
+ margin-left $CONFIG_DIM_BUTTON_SPACING_OUTER_NARROW,
194
+ nil
195
+ )),
196
+ (right aligned last in-button-toolbar, (
197
+ margin-left nil,
198
+ nil
199
+ )),
200
+ // BUTTON GROUPS
201
+ (in-button-group, (
202
+ border-radius 0,
203
+ float left,
204
+ border-left-width 0,
205
+ display block,
206
+ inline-block nil
207
+ )),
208
+ (last in-button-group, (
209
+ border-radius (0 $CONFIG_DIM_BUTTON_RADIUS $CONFIG_DIM_BUTTON_RADIUS 0),
210
+ nil
211
+ )),
212
+ // fix the inner borders in a button group in a dark context
213
+ (in-button-group in-dark, (
214
+ border-right-color $CONFIG_COLOR_BORDER_BUTTON_PRIMARY,
215
+ nil
216
+ )),
217
+ (secondary in-button-group in-dark, (
218
+ border-right-color $CONFIG_COLOR_BORDER_BUTTON_SECONDARY,
219
+ nil
220
+ )),
221
+ (spotlight in-button-group in-dark, (
222
+ border-right-color $CONFIG_COLOR_BORDER_BUTTON_SPOTLIGHT,
223
+ nil
224
+ )),
225
+ // restore the dark border for the last one
226
+ (last in-button-group in-dark, (
227
+ border-right-color $CONFIG_COLOR_BORDER_BUTTON_DARK,
228
+ nil
229
+ )),
230
+ (in-button-group in-punchcut, (
231
+ inherit (in-button-group in-dark),
232
+ nil
233
+ )),
234
+ (secondary in-button-group in-punchcut, (
235
+ inherit (secondary in-button-group in-dark),
236
+ nil
237
+ )),
238
+ (spotlight in-button-group in-punchcut, (
239
+ inherit (spotlight in-button-group in-dark),
240
+ nil
241
+ )),
242
+ (last in-button-group in-punchcut, (
243
+ inherit (last in-button-group in-dark),
244
+ nil
245
+ )),
246
+ (in-button-group in-bristol, (
247
+ inherit (in-button-group in-dark),
248
+ nil
249
+ )),
250
+ (secondary in-button-group in-bristol, (
251
+ inherit (secondary in-button-group in-dark),
252
+ nil
253
+ )),
254
+ (spotlight in-button-group in-bristol, (
255
+ inherit (spotlight in-button-group in-dark),
256
+ nil
257
+ )),
258
+ (last in-button-group in-bristol, (
259
+ inherit (last in-button-group in-dark),
260
+ nil
261
+ )),
262
+ // need to add here for inheritance order to preserve the first button appearance
263
+ (first in-button-group, (
264
+ border-radius ($CONFIG_DIM_BUTTON_RADIUS 0 0 $CONFIG_DIM_BUTTON_RADIUS),
265
+ // restore the left-border for the first button
266
+ border-left-width nil
267
+ )),
268
+ // SIZES
269
+ (large, (
270
+ font-size nth($CONFIG_FONT_BUTTON_LARGE, 1),
271
+ padding _styleguideGetButtonPadding(large),
272
+ height (_styleguideGetButtonHeight(large) + (2*$CONFIG_DIM_GENERIC_BORDER)),
273
+ line-height _styleguideGetButtonHeight(large)
274
+ )),
275
+ (medium, (
276
+ // inherits from default
277
+ nil
278
+ )),
279
+ (small, (
280
+ font-size nth($CONFIG_FONT_BUTTON_SMALL, 1),
281
+ padding _styleguideGetButtonPadding(small),
282
+ height (_styleguideGetButtonHeight(small) + (2*$CONFIG_DIM_GENERIC_BORDER)),
283
+ line-height _styleguideGetButtonHeight(small)
284
+ )),
285
+ // narrow variants
286
+ (narrow, (
287
+ padding _styleguideGetButtonPadding(medium, narrow),
288
+ nil
289
+ )),
290
+ (narrow large, (
291
+ padding _styleguideGetButtonPadding(large, narrow),
292
+ nil
293
+ )),
294
+ (narrow small, (
295
+ padding _styleguideGetButtonPadding(small, narrow),
296
+ nil
297
+ )),
298
+ (indicator, (
299
+ hide-text true,
300
+ border 0,
301
+ color $CONFIG_COLOR_BUTTON_INDICATOR, // Added so IE 6/7 hide the text
302
+ width nth($CONFIG_DIM_BUTTON_INDICATOR_SMALL, 1),
303
+ height nth-cyclic($CONFIG_DIM_BUTTON_INDICATOR_SMALL, 2),
304
+ font-size 0,
305
+ line-height 0,
306
+ overflow hidden,
307
+ padding 0, // override browser defaults,
308
+ margin (0 horizontal-spacing(0.4, $abuse: true)),
309
+ text-shadow nil,
310
+ border-radius $CONFIG_DIM_BUTTON_INDICATOR_SMALL_RADIUS,
311
+ background-color $CONFIG_COLOR_BUTTON_INDICATOR,
312
+ filter-gradient nil,
313
+ background-image nil,
314
+ (states, (
315
+ (hover, (
316
+ background-color nil,
317
+ filter-gradient nil,
318
+ background-image nil,
319
+ box-shadow nil
320
+ )),
321
+ (active, (
322
+ inherit (hover),
323
+ nil
324
+ )),
325
+ (disabled, (
326
+ color nil,
327
+ background-color nil,
328
+ filter-gradient nil,
329
+ background-image nil
330
+ )),
331
+ (selected, (
332
+ inherit (disabled),
333
+ nil
334
+ ))
335
+ ))
336
+ ))
337
+ ), $CONFIG_THEME);
338
+ }
@@ -0,0 +1,15 @@
1
+ // ==========
2
+ // CANVAS
3
+ // ==========
4
+ $STYLEGUIDE_CANVAS_ID: canvas !default;
5
+ $STYLEGUIDE_CANVAS: () !default;
6
+
7
+ @if not styleguide-component-exists($STYLEGUIDE_CANVAS_ID, $CONFIG_THEME) {
8
+ $a-blackhole: styleguide-add-component($STYLEGUIDE_CANVAS_ID, $STYLEGUIDE_CANVAS, (
9
+ (default, (
10
+ background nth($CONFIG_TEXTURE_CANVAS, 1),
11
+ nil
12
+ )),
13
+ nil
14
+ ), $CONFIG_THEME);
15
+ }
@@ -0,0 +1,336 @@
1
+ // ==========
2
+ // CARETS
3
+ // ==========
4
+ $STYLEGUIDE_CARETS_ID: caret !default;
5
+ $STYLEGUIDE_CARETS: () !default;
6
+
7
+ @if not styleguide-component-exists($STYLEGUIDE_CARETS_ID, $CONFIG_THEME) {
8
+ $a-blackhole: styleguide-add-component($STYLEGUIDE_CARETS_ID, $STYLEGUIDE_CARETS, (
9
+ (default, (
10
+ inline-block true,
11
+ vertical-align middle,
12
+ // triangle... @see triangle() mixin
13
+ height 0,
14
+ width 0,
15
+ font-size 0,
16
+ line-height 0,
17
+ border-style dashed,
18
+ border-color transparent,
19
+ border-top-style solid,
20
+ border-width _styleguideCaretSize(medium),
21
+ border-top-color nth($CONFIG_COLOR_COPY, 1),
22
+ overflow hidden,
23
+ content $CONTENT_PLACEHOLDER
24
+ )),
25
+ (in-dark, (
26
+ border-top-color nth-cyclic($CONFIG_COLOR_COPY, 2),
27
+ nil
28
+ )),
29
+ (in-punchcut, (
30
+ inherit (in-dark),
31
+ nil
32
+ )),
33
+ (in-bristol, (
34
+ inherit (in-dark),
35
+ nil
36
+ )),
37
+ (in-tooltip, (
38
+ inherit (in-dark),
39
+ nil
40
+ )),
41
+ (in-button, (
42
+ border-top-color $CONFIG_COLOR_BUTTON_PRIMARY,
43
+ nil
44
+ )),
45
+ (in-button in-secondary, (
46
+ border-top-color $CONFIG_COLOR_BUTTON_SECONDARY,
47
+ nil
48
+ )),
49
+ (in-button in-spotlight, (
50
+ border-top-color $CONFIG_COLOR_BUTTON_SPOTLIGHT,
51
+ nil
52
+ )),
53
+ // SIZES
54
+ (large, (
55
+ border-width _styleguideCaretSize(large),
56
+ nil
57
+ )),
58
+ (small, (
59
+ border-width _styleguideCaretSize(small),
60
+ nil
61
+ )),
62
+ (in-button in-large, (
63
+ inherit (large),
64
+ nil
65
+ )),
66
+ (in-button in-small, (
67
+ inherit (small),
68
+ nil
69
+ )),
70
+ // upward caret
71
+ (north, (
72
+ border-top-color nil,
73
+ border-top-style nil,
74
+ border-bottom-style solid,
75
+ border-bottom-color nth($CONFIG_COLOR_COPY, 1),
76
+ border-width _styleguideCaretSize(medium, north)
77
+ )),
78
+ (north in-button, (
79
+ border-bottom-color $CONFIG_COLOR_BUTTON_PRIMARY,
80
+ nil
81
+ )),
82
+ (north in-button in-secondary, (
83
+ border-bottom-color $CONFIG_COLOR_BUTTON_SECONDARY,
84
+ nil
85
+ )),
86
+ (north in-button in-spotlight, (
87
+ border-bottom-color $CONFIG_COLOR_BUTTON_SPOTLIGHT,
88
+ nil
89
+ )),
90
+ // rightward caret
91
+ (east, (
92
+ border-top-color nil,
93
+ border-top-style nil,
94
+ border-left-style solid,
95
+ border-left-color nth($CONFIG_COLOR_COPY, 1),
96
+ border-width _styleguideCaretSize(medium, east)
97
+ )),
98
+ (east in-button, (
99
+ border-left-color $CONFIG_COLOR_BUTTON_PRIMARY,
100
+ nil
101
+ )),
102
+ (east in-button in-secondary, (
103
+ border-left-color $CONFIG_COLOR_BUTTON_SECONDARY,
104
+ nil
105
+ )),
106
+ (east in-button in-spotlight, (
107
+ border-left-color $CONFIG_COLOR_BUTTON_SPOTLIGHT,
108
+ nil
109
+ )),
110
+ // leftward caret
111
+ (west, (
112
+ border-top-color nil,
113
+ border-top-style nil,
114
+ border-right-style solid,
115
+ border-right-color nth($CONFIG_COLOR_COPY, 1),
116
+ border-width _styleguideCaretSize(medium, east)
117
+ )),
118
+ (west in-button, (
119
+ border-left-color $CONFIG_COLOR_BUTTON_PRIMARY,
120
+ nil
121
+ )),
122
+ (west in-button in-secondary, (
123
+ border-left-color $CONFIG_COLOR_BUTTON_SECONDARY,
124
+ nil
125
+ )),
126
+ (west in-button in-spotlight, (
127
+ border-left-color $CONFIG_COLOR_BUTTON_SPOTLIGHT,
128
+ nil
129
+ )),
130
+ // SIZES
131
+ (north in-button in-large, (
132
+ border-width _styleguideCaretSize(large, north),
133
+ nil
134
+ )),
135
+ (north in-button in-small, (
136
+ border-width _styleguideCaretSize(small, north),
137
+ nil
138
+ )),
139
+ (west in-button in-large, (
140
+ border-width _styleguideCaretSize(large, west),
141
+ nil
142
+ )),
143
+ (west in-button in-small, (
144
+ border-width _styleguideCaretSize(small, west),
145
+ nil
146
+ )),
147
+ (east in-button in-large, (
148
+ border-width _styleguideCaretSize(large, east),
149
+ nil
150
+ )),
151
+ (east in-button in-small, (
152
+ border-width _styleguideCaretSize(small, east),
153
+ nil
154
+ )),
155
+ // on hovercards
156
+ (on-hovercard, (
157
+ // remove unneeded styles
158
+ inline-block nil,
159
+ vertical-align nil,
160
+ height nil,
161
+ width nil,
162
+ font-size nil,
163
+ line-height nil,
164
+ border-style nil,
165
+ border-color nil,
166
+ border-top-style nil,
167
+ border-right-style nil,
168
+ border-bottom-style nil,
169
+ border-left-style nil,
170
+ border-width nil,
171
+ border-top-color nil,
172
+ border-right-color nil,
173
+ border-bottom-color nil,
174
+ border-left-color nil,
175
+ overflow nil,
176
+ // real styles
177
+ position absolute,
178
+ display block,
179
+ width nth($CONFIG_DIM_HOVERCARD_TIP, 1),
180
+ height nth-cyclic($CONFIG_DIM_HOVERCARD_TIP, 2),
181
+ margin-left -1/2*nth($CONFIG_DIM_HOVERCARD_TIP, 1),
182
+ background (transparent image-url($CONFIG_IMG_HOVERCARD_TIP) _styleguideGetTooltipTipBG(south) no-repeat),
183
+ top 100%,
184
+ left 50%
185
+ )),
186
+ (south-west on-hovercard, (
187
+ left $CONFIG_DIM_HOVERCARD_TIP_OFFSET,
188
+ margin-left nil
189
+ )),
190
+ (south-east on-hovercard, (
191
+ left nil,
192
+ right $CONFIG_DIM_HOVERCARD_TIP_OFFSET,
193
+ margin-left nil
194
+ )),
195
+ (north on-hovercard, (
196
+ background-position _styleguideGetTooltipTipBG(north),
197
+ top nil,
198
+ bottom 100%
199
+ )),
200
+ (north-west on-hovercard, (
201
+ inherit (north on-hovercard),
202
+ left $CONFIG_DIM_HOVERCARD_TIP_OFFSET,
203
+ margin-left nil
204
+ )),
205
+ (north-east on-hovercard, (
206
+ inherit (north on-hovercard),
207
+ left nil,
208
+ right $CONFIG_DIM_HOVERCARD_TIP_OFFSET,
209
+ margin-left nil
210
+ )),
211
+ (east on-hovercard, (
212
+ width nth-cyclic($CONFIG_DIM_HOVERCARD_TIP, 2),
213
+ height nth($CONFIG_DIM_HOVERCARD_TIP, 1),
214
+ margin-top -1/2*nth($CONFIG_DIM_HOVERCARD_TIP, 1),
215
+ margin-left nil,
216
+ background-position _styleguideGetTooltipTipBG(east),
217
+ top 50%,
218
+ left 100%
219
+ )),
220
+ (east-north on-hovercard, (
221
+ inherit (east on-hovercard),
222
+ top $CONFIG_DIM_HOVERCARD_TIP_OFFSET,
223
+ margin-top nil
224
+ )),
225
+ (east-south on-hovercard, (
226
+ inherit (east on-hovercard),
227
+ top nil,
228
+ bottom $CONFIG_DIM_HOVERCARD_TIP_OFFSET,
229
+ margin-top nil
230
+ )),
231
+ (west on-hovercard, (
232
+ width nth-cyclic($CONFIG_DIM_HOVERCARD_TIP, 2),
233
+ height nth($CONFIG_DIM_HOVERCARD_TIP, 1),
234
+ margin-top -1/2*nth($CONFIG_DIM_HOVERCARD_TIP, 1),
235
+ margin-left nil,
236
+ background-position _styleguideGetTooltipTipBG(west),
237
+ top 50%,
238
+ right 100%,
239
+ left nil
240
+ )),
241
+ (west-north on-hovercard, (
242
+ inherit (west on-hovercard),
243
+ top $CONFIG_DIM_HOVERCARD_TIP_OFFSET,
244
+ margin-top nil
245
+ )),
246
+ (west-south on-hovercard, (
247
+ inherit (west on-hovercard),
248
+ top nil,
249
+ bottom $CONFIG_DIM_HOVERCARD_TIP_OFFSET,
250
+ margin-top nil
251
+ )),
252
+ // on tooltips
253
+ (on-tooltip, (
254
+ position absolute,
255
+ margin-left -1*$CONFIG_DIM_TOOLTIP_TIP,
256
+ top 100%,
257
+ left 50%,
258
+ border-width _styleguideCaretSize(tooltip),
259
+ border-top-color nth($CONFIG_COLOR_BORDER_TOOLTIP, 1)
260
+ )),
261
+ (south-west on-tooltip, (
262
+ left $CONFIG_DIM_TOOLTIP_TIP_OFFSET,
263
+ margin-left nil
264
+ )),
265
+ (south-east on-tooltip, (
266
+ left nil,
267
+ right $CONFIG_DIM_TOOLTIP_TIP_OFFSET,
268
+ margin-left nil
269
+ )),
270
+ (north on-tooltip, (
271
+ border-width _styleguideCaretSize(tooltip, north),
272
+ border-top-color nil,
273
+ border-top-style nil,
274
+ border-bottom-style solid,
275
+ border-bottom-color nth($CONFIG_COLOR_BORDER_TOOLTIP, 1),
276
+ top nil,
277
+ bottom 100%
278
+ )),
279
+ (north-west on-tooltip, (
280
+ inherit (north on-tooltip),
281
+ left $CONFIG_DIM_TOOLTIP_TIP_OFFSET,
282
+ margin-left nil
283
+ )),
284
+ (north-east on-tooltip, (
285
+ inherit (north on-tooltip),
286
+ right $CONFIG_DIM_TOOLTIP_TIP_OFFSET,
287
+ left nil,
288
+ margin-left nil
289
+ )),
290
+ (east on-tooltip, (
291
+ border-width _styleguideCaretSize(tooltip, east),
292
+ border-top-color nil,
293
+ border-top-style nil,
294
+ border-left-style solid,
295
+ border-left-color nth($CONFIG_COLOR_BORDER_TOOLTIP, 1),
296
+ margin-left nil,
297
+ margin-top -1*$CONFIG_DIM_TOOLTIP_TIP,
298
+ top 50%,
299
+ left 100%
300
+ )),
301
+ (east-north on-tooltip, (
302
+ inherit (east on-tooltip),
303
+ top $CONFIG_DIM_TOOLTIP_TIP_OFFSET,
304
+ margin-top nil
305
+ )),
306
+ (east-south on-tooltip, (
307
+ inherit (east on-tooltip),
308
+ top nil,
309
+ bottom $CONFIG_DIM_TOOLTIP_TIP_OFFSET,
310
+ margin-top nil
311
+ )),
312
+ (west on-tooltip, (
313
+ border-width _styleguideCaretSize(tooltip, west),
314
+ border-top-color nil,
315
+ border-top-style nil,
316
+ border-right-style solid,
317
+ border-right-color nth($CONFIG_COLOR_BORDER_TOOLTIP, 1),
318
+ margin-left nil,
319
+ margin-top -1*$CONFIG_DIM_TOOLTIP_TIP,
320
+ top 50%,
321
+ right 100%,
322
+ left nil
323
+ )),
324
+ (west-north on-tooltip, (
325
+ inherit (west on-tooltip),
326
+ top $CONFIG_DIM_TOOLTIP_TIP_OFFSET,
327
+ margin-top nil
328
+ )),
329
+ (west-south on-tooltip, (
330
+ inherit (west on-tooltip),
331
+ top nil,
332
+ bottom $CONFIG_DIM_TOOLTIP_TIP_OFFSET,
333
+ margin-top nil
334
+ ))
335
+ ), $CONFIG_THEME);
336
+ }