archetype 0.0.1.pre.7 → 0.0.1.pre.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/archetype/sass_extensions/functions/lists.rb +2 -2
- data/lib/archetype/version.rb +1 -1
- data/stylesheets/archetype/_base.scss +7 -2
- data/stylesheets/archetype/_config.scss +9 -1
- data/stylesheets/archetype/_hacks.scss +51 -17
- data/stylesheets/archetype/_ui.scss +16 -5
- data/stylesheets/archetype/base/_h5bp.scss +12 -12
- data/stylesheets/archetype/base/_normalize.scss +178 -139
- data/stylesheets/archetype/grid/_grid.scss +13 -13
- data/stylesheets/archetype/styleguide/components/_buttons.scss +1 -0
- data/stylesheets/archetype/util/_debug.scss +4 -4
- data/stylesheets/archetype/util/_lists.scss +1 -1
- data/stylesheets/archetype/util/_misc.scss +1 -1
- data/stylesheets/archetype/util/_rtl.scss +1 -1
- data/stylesheets/archetype/util/_spacing.scss +6 -6
- data/stylesheets/archetype/util/_styles.scss +44 -113
- data/stylesheets/archetype/util/_targeting.scss +4 -5
- data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders-s7889ccc8c1.png +0 -0
- data/test/fixtures/stylesheets/archetype/{expected → saved}/b.css +0 -0
- data/test/fixtures/stylesheets/archetype/{expected → saved}/base.css +0 -0
- data/test/fixtures/stylesheets/archetype/saved/hacks/ie_pseudo.css +11 -0
- data/test/fixtures/stylesheets/archetype/{expected → saved}/hacks/transparent_focusable.css +0 -0
- data/test/fixtures/stylesheets/archetype/{expected → saved}/locale.css +0 -0
- data/test/fixtures/stylesheets/archetype/source/utilities/custom_output_styler.scss +3 -2
- metadata +21 -68
- data/test/fixtures/stylesheets/archetype/expected/hacks/ie_pseudo.css +0 -11
- data/test/fixtures/stylesheets/archetype/expected/styleguide/alerts.css +0 -675
- data/test/fixtures/stylesheets/archetype/expected/styleguide/buttons.css +0 -2119
- 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/fallback_styles.css +0 -9
- 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/styleguide/nested_styleguides.css +0 -24
- data/test/fixtures/stylesheets/archetype/expected/styleguide/selective_state.css +0 -177
- data/test/fixtures/stylesheets/archetype/expected/ui/glyph_icon.css +0 -127
- data/test/fixtures/stylesheets/archetype/expected/ui/hide_element.css +0 -8
- data/test/fixtures/stylesheets/archetype/expected/ui/stroke.css +0 -17
- data/test/fixtures/stylesheets/archetype/expected/ui/triangle.css +0 -35
- 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/expected/utilities/if-set.css +0 -9
- data/test/fixtures/stylesheets/archetype/expected/utilities/spacing/horizontal-spacing.css +0 -29
- data/test/fixtures/stylesheets/archetype/expected/utilities/spacing/vertical-spacing.css +0 -29
- data/test/fixtures/stylesheets/archetype/expected/utilities/styles/filter.css +0 -11
- data/test/fixtures/stylesheets/archetype/expected/utilities/styles/font-family.css +0 -16
- data/test/fixtures/stylesheets/archetype/expected/utilities/styles/z-index.css +0 -15
- data/test/fixtures/stylesheets/archetype/expected/utilities/targeting/target-browser.css +0 -105
- data/test/fixtures/stylesheets/archetype/expected/utilities/targeting/target-os.css +0 -55
@@ -68,7 +68,7 @@
|
|
68
68
|
// @param $left {Number} the number of units to dent left
|
69
69
|
// @param $right {Number} the number of units to dent right
|
70
70
|
// @param $direction {String} [in|out] the direction to dent
|
71
|
-
// @param $abuse {
|
71
|
+
// @param $abuse {Boolean} @see _getUnit
|
72
72
|
// @return $dent {List} list of dents
|
73
73
|
@function _gridDent($list: false, $left: 0, $right: 0, $direction: in, $abuse: false) {
|
74
74
|
$factor: if($direction == out, -1, 1) * $CONFIG_GRID_SPACING_FACTOR;
|
@@ -92,7 +92,7 @@
|
|
92
92
|
// @param $list {List} list of indents
|
93
93
|
// @param $left {Number} the number of units to indent left
|
94
94
|
// @param $right {Number} the number of units to indent right
|
95
|
-
// @param $abuse {
|
95
|
+
// @param $abuse {Boolean} @see _getUnit
|
96
96
|
// @return {List} list of indents
|
97
97
|
@function grid-indent($list: false, $left: 0, $right: 0, $abuse: false) {
|
98
98
|
@return _gridDent($list, $left, $right, $direction: in, $abuse: $abuse);
|
@@ -103,7 +103,7 @@
|
|
103
103
|
// @param $list {List} list of outdents
|
104
104
|
// @param $left {Number} the number of units to outdent left
|
105
105
|
// @param $right {Number} the number of units to outdent right
|
106
|
-
// @param $abuse {
|
106
|
+
// @param $abuse {Boolean} @see _getUnit
|
107
107
|
// @return {List} list of outdents
|
108
108
|
@function grid-outdent($list: false, $left: 0, $right: 0, $abuse: false) {
|
109
109
|
@return _gridDent($list, $left, $right, $direction: out, $abuse: $abuse);
|
@@ -217,7 +217,7 @@
|
|
217
217
|
|
218
218
|
// this lets rows clear the floated containers
|
219
219
|
// @mixin grid-row
|
220
|
-
// @param $debug {
|
220
|
+
// @param $debug {Boolean} use debug stylings
|
221
221
|
@mixin grid-row($debug: false) {
|
222
222
|
@include grid-block(true);
|
223
223
|
@include debug-hover-box(rgb(255, 0, 255), $if: ($debug or $CONFIG_GRID_DEBUG));
|
@@ -225,7 +225,7 @@
|
|
225
225
|
|
226
226
|
// output the block methods
|
227
227
|
// @mixin grid-block
|
228
|
-
// @param $row {
|
228
|
+
// @param $row {Boolean} is this block a row
|
229
229
|
@mixin grid-block($row: false) {
|
230
230
|
// FLOAT
|
231
231
|
@if($CONFIG_GRID_ALIGN_METHOD == float){
|
@@ -257,7 +257,7 @@
|
|
257
257
|
//text-space-collapse: collapse;
|
258
258
|
}
|
259
259
|
@else {
|
260
|
-
// if reading direction is
|
260
|
+
// if reading direction is different from the grid direction,
|
261
261
|
// reset the reading direction of the inner container
|
262
262
|
@if(reading-direction() != $CONFIG_GRID_DIRECTION) {
|
263
263
|
direction: reading-direction();
|
@@ -283,7 +283,7 @@
|
|
283
283
|
border-spacing: $CONFIG_GRID_GUTTER 0;
|
284
284
|
}
|
285
285
|
@else {
|
286
|
-
// if reading direction is
|
286
|
+
// if reading direction is different from the grid direction,
|
287
287
|
// reset the reading direction of the inner container
|
288
288
|
@if(reading-direction() != $CONFIG_GRID_DIRECTION) {
|
289
289
|
direction: reading-direction();
|
@@ -302,7 +302,7 @@
|
|
302
302
|
// @mixin grid-canvas
|
303
303
|
// @param $columns {Number} the number or fraction of columns to span, if fraction, must specify $of
|
304
304
|
// @param $of {Number} the total number of columns spanned, only use with fractional $columns
|
305
|
-
// @param $debug {
|
305
|
+
// @param $debug {Boolean} use debug stylings
|
306
306
|
@mixin grid-canvas($columns: false, $of: false, $debug: false) {
|
307
307
|
@include grid($columns: $columns, $of: $of, $debug: $debug, $canvas: true);
|
308
308
|
}
|
@@ -310,15 +310,15 @@
|
|
310
310
|
// the main grid mixin
|
311
311
|
// @mixin grid
|
312
312
|
// @param $columns {Number} the number or fraction of columns to span, if fraction, must specify $of
|
313
|
-
// @param $first {
|
313
|
+
// @param $first {Boolean} is this the first grid block of a row
|
314
314
|
// @param $of {Number} the total number of columns spanned, only use with fractional $columns
|
315
315
|
// @param $indent {List} the grid indents @see grid-indent
|
316
316
|
// @param $outdent {List} the grid outdents @see grid-outdent
|
317
317
|
// @param $offset {List} the grid offsets @see grid-offset, grid-push, grid-pull
|
318
|
-
// @param $canvas {
|
319
|
-
// @param $row {
|
320
|
-
// @param $center {
|
321
|
-
// @param $debug {
|
318
|
+
// @param $canvas {Boolean} treat this grid block as a canvas; a canvas is a non-floated, centered grid-block
|
319
|
+
// @param $row {Boolean} @see grid-row
|
320
|
+
// @param $center {Boolean} whether or not to center the grid block
|
321
|
+
// @param $debug {Boolean} use debug stylings
|
322
322
|
@mixin grid($columns: false, $first: false, $of: false, $indent: false, $outdent: false, $offset: false, $offset-method: $CONFIG_GRID_OFFSET_METHOD, $canvas: false, $row: false, $center: false, $debug: false) {
|
323
323
|
@if($row) {
|
324
324
|
@include grid-row($debug: $debug);
|
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
// check if debug is enabled
|
4
4
|
// @function is-debug-enabled
|
5
|
-
// @param $if {
|
6
|
-
// @return {
|
5
|
+
// @param $if {Boolean} optional override for $CONFIG_DEBUG
|
6
|
+
// @return {Boolean} whether or not debug is enabled
|
7
7
|
@function is-debug-enabled($if: nil) {
|
8
8
|
// debug is only available in DEV environments, so check that first
|
9
9
|
// then check if the debug flag/override is truthy
|
@@ -13,7 +13,7 @@
|
|
13
13
|
// a debug helper, print out a message
|
14
14
|
// @mixin debug-message
|
15
15
|
// @param $message {String} the message to output
|
16
|
-
// @param $if {
|
16
|
+
// @param $if {Boolean} override $CONFIG_DEBUG
|
17
17
|
@mixin debug-message($message, $if: nil) {
|
18
18
|
@if(is-debug-enabled($if)) {
|
19
19
|
@if archetype-version('sass >= 3.2') {
|
@@ -29,7 +29,7 @@
|
|
29
29
|
// @mixin debug-hover-box
|
30
30
|
// @param $color {String} the color to draw the border
|
31
31
|
// @param $opacity {Number}
|
32
|
-
// @param $if {
|
32
|
+
// @param $if {Boolean} override $CONFIG_DEBUG
|
33
33
|
@mixin debug-hover-box($color: rgb(0, 255, 255), $opacity: 0.9, $if: nil) {
|
34
34
|
@if(is-debug-enabled($if)) {
|
35
35
|
&:hover {
|
@@ -5,7 +5,7 @@
|
|
5
5
|
// @param $list {List} the list to remove from
|
6
6
|
// @param $idx {Number} the index to remove
|
7
7
|
// @param $separator {String} the separator to use [auto|comma|space]
|
8
|
-
// @return $new-list {
|
8
|
+
// @return $new-list {Boolean} the list with removed index
|
9
9
|
@function list-remove($list: (), $idx: false, $separator: auto) {
|
10
10
|
@return list-replace($list: $list, $idx: $idx, $value: nil, $separator: $separator);
|
11
11
|
}
|
@@ -20,7 +20,7 @@ $REGISTRY_DO_ONCE: () !default;
|
|
20
20
|
// a function to prevent routines from executing multiple times
|
21
21
|
// @function do-once
|
22
22
|
// @param $name {String} name of the identifier
|
23
|
-
// @return {
|
23
|
+
// @return {Boolean} true if the first time invoked, false otherwise
|
24
24
|
@function do-once($name) {
|
25
25
|
@if index($REGISTRY_DO_ONCE, $name) {
|
26
26
|
@return false;
|
@@ -5,7 +5,7 @@
|
|
5
5
|
// @param $value {List|String} [*|left|right] the value to augment
|
6
6
|
// @param $method {String} [border-radius|background]
|
7
7
|
// @param $force {String} [ltr|rtl] allows you to ignore reading-direction()
|
8
|
-
// @return {
|
8
|
+
// @return {Boolean|List|String} the augmented value
|
9
9
|
@function rtl($value: false, $method: false, $force: false) {
|
10
10
|
$dir: if($force, $force, reading-direction());
|
11
11
|
@if($value == false) {
|
@@ -5,7 +5,7 @@
|
|
5
5
|
// @private
|
6
6
|
// @param $unit {Number} unit of measurement
|
7
7
|
// @param $direction {String} [horizontal|vertical] spacing
|
8
|
-
// @param $abuse {
|
8
|
+
// @param $abuse {Boolean} @see _getUnit
|
9
9
|
// @return {String} the calculated spacing
|
10
10
|
@function _spacing($unit: nil, $direction: horizontal, $abuse: false) {
|
11
11
|
@if $unit == nil {
|
@@ -19,7 +19,7 @@
|
|
19
19
|
// horizonatl spacing calculations
|
20
20
|
// @function horizontal-spacing
|
21
21
|
// @param $unit {Number} unit of measurement
|
22
|
-
// @param $abuse {
|
22
|
+
// @param $abuse {Boolean} @see _getUnit
|
23
23
|
// @return {String} the calculated horizontal spacing
|
24
24
|
@function horizontal-spacing($unit, $abuse: false) {
|
25
25
|
@return _spacing($unit, $abuse: $abuse);
|
@@ -28,7 +28,7 @@
|
|
28
28
|
// vertical spacing calculations
|
29
29
|
// @function vertical-spacing
|
30
30
|
// @param $unit {Number} unit of measurement
|
31
|
-
// @param $abuse {
|
31
|
+
// @param $abuse {Boolean} @see _getUnit
|
32
32
|
// @return {String} the calculated vertical spacing
|
33
33
|
@function vertical-spacing($unit, $abuse: false) {
|
34
34
|
@return _spacing($unit, $direction: vertical, $abuse: $abuse);
|
@@ -40,7 +40,7 @@
|
|
40
40
|
// @param $top {Number} the units to offset from the top
|
41
41
|
// @param $bottom {Number} the units to offset from the bottom
|
42
42
|
// @param $method {String} [margin|padding] offset method
|
43
|
-
// @param $abuse {
|
43
|
+
// @param $abuse {Boolean} @see _getUnit
|
44
44
|
@mixin vertical-spacing($list: false, $top: nil, $bottom: nil, $method: false, $abuse: false) {
|
45
45
|
$list: get-collection($list, ($top $bottom), $min: 2);
|
46
46
|
@include _spacing($list, vertical, $method: $method, $abuse: $abuse);
|
@@ -51,7 +51,7 @@
|
|
51
51
|
// @param $left {Number} the units to offset from the left
|
52
52
|
// @param $right {Number} the units to offset from the right
|
53
53
|
// @param $method {String} [margin|padding] offset method
|
54
|
-
// @param $abuse {
|
54
|
+
// @param $abuse {Boolean} @see _getUnit
|
55
55
|
@mixin horizontal-spacing($list: false, $left: nil, $right: nil, $method: false, $abuse: false) {
|
56
56
|
$list: get-collection($list, ($left $right), $min: 2);
|
57
57
|
@include _spacing($list, $method: $method, $abuse: $abuse);
|
@@ -62,7 +62,7 @@
|
|
62
62
|
// @private
|
63
63
|
// @param $units {List} the list of units e.g. (1) => $left:1 $right:1; (1 0) => $left:1 $right:0;
|
64
64
|
// @param $method {String} [margin|padding] offset method
|
65
|
-
// @param $abuse {
|
65
|
+
// @param $abuse {Boolean} @see _getUnit
|
66
66
|
@mixin _spacing($units, $direction: horizontal, $method: false, $abuse: false) {
|
67
67
|
@if(not $method) {
|
68
68
|
$method: $CONFIG_SPACING_METHOD;
|
@@ -10,7 +10,6 @@
|
|
10
10
|
// @param $value {*} the CSS value to output
|
11
11
|
@mixin _outputStyle($property, $value: nil) {
|
12
12
|
@if($value != nil) {
|
13
|
-
// !!DO NOT COPY TO ARCHETYPE - this mixin is specific to _round_button.scss
|
14
13
|
@if($property == round-button-ie-support) {
|
15
14
|
@include round-button-ie-support($value)
|
16
15
|
}
|
@@ -43,9 +42,9 @@
|
|
43
42
|
// @param $property {String} the CSS property to output
|
44
43
|
// @param $value {*} the CSS value to output
|
45
44
|
@mixin output-style($property, $value: nil) {
|
46
|
-
|
45
|
+
|
46
|
+
@if($property != nil and length(-compass-list($value)) > 0 and first-value-of(-compass-list($value)) != nil and not index($CONFIG_DISABLED_CSS, $property)) {
|
47
47
|
// for mixins, we need to do some custom work
|
48
|
-
// has-custom-output-styler: copy & pasted from latest github repo 10/3/2013
|
49
48
|
// check to see if we have a custom output styler (pre)
|
50
49
|
@if has-custom-output-styler($property, $value, pre) == true {
|
51
50
|
@include custom-output-styler($property, $value, $method: pre);
|
@@ -90,29 +89,14 @@
|
|
90
89
|
@else if($property == stretch) { @include stretch(); }
|
91
90
|
// appearance
|
92
91
|
@else if($property == appearance) { @include appearance($value); }
|
93
|
-
//
|
94
|
-
@else if($property ==
|
95
|
-
|
96
|
-
@else if($property ==
|
97
|
-
|
98
|
-
@else if($property == padding-left) { @include padding-left($value); }
|
99
|
-
@else if($property == padding-right) { @include padding-right($value); }
|
100
|
-
@else if($property == border-width) { @include border-width($value); }
|
101
|
-
@else if($property == border-left-width) { @include border-left-width($value); }
|
102
|
-
@else if($property == border-right-width) { @include border-right-width($value); }
|
103
|
-
@else if($property == border-color) { @include border-color($value); }
|
104
|
-
@else if($property == border-left-color) { @include border-left-color($value); }
|
105
|
-
@else if($property == border-right-color) { @include border-right-color($value); }
|
106
|
-
@else if($property == border-style) { @include border-style($value); }
|
107
|
-
@else if($property == border-left-style) { @include border-left-style($value); }
|
108
|
-
@else if($property == border-right-style) { @include border-right-style($value); }
|
109
|
-
@else if($property == clear) { @include clear($value); }
|
110
|
-
@else if($property == text-align) { @include text-align($value); }
|
111
|
-
@else if($property == background-position) { @include background-position($value); }
|
112
|
-
@else if($property == left) { @include left($value); }
|
113
|
-
@else if($property == right) { @include right($value); }
|
114
|
-
@else if($property == glyph-icon) { @include glyph-icon(nth($value, 1), nth($value, 2), nth($value, 3), nth($value, 4), nth($value, 5)); }
|
92
|
+
// unhide-element
|
93
|
+
@else if($property == unhide-element) { @include unhide-element(); }
|
94
|
+
// ellipsis
|
95
|
+
@else if($property == ellipsis) { @include ellipsis(); }
|
96
|
+
// scale
|
115
97
|
@else if($property == scale) { @include scale($value); }
|
98
|
+
@else if($property == glyph-icon) { @include glyph-icon(nth($value, 1), nth($value, 2), nth($value, 3), nth($value, 4), nth($value, 5)); }
|
99
|
+
@else if($property == extend) { @extend #{$value}; }
|
116
100
|
// animations
|
117
101
|
@else if($property == animation) {
|
118
102
|
@if archetype-version('compass >= 0.13') {
|
@@ -182,7 +166,6 @@
|
|
182
166
|
}
|
183
167
|
//ellipsis
|
184
168
|
@else if($property == ellipsis) { @include ellipsis(); }
|
185
|
-
// has-custom-output-styler: copy & pasted from latest github repo 10/3/2013
|
186
169
|
// check to see if we have a custom output styler (post)
|
187
170
|
@else if has-custom-output-styler($property, $value, post) == true {
|
188
171
|
@include custom-output-styler($property, $value, $method: post);
|
@@ -195,7 +178,7 @@
|
|
195
178
|
// convert a list of key-value pairs into CSS rules
|
196
179
|
// @mixin to-styles
|
197
180
|
// @param $list {List} a key-value paired list of ($property $value)
|
198
|
-
// @param $states {
|
181
|
+
// @param $states {Boolean|List} if true, output all states; if false, output no states; if a list, output only the states in the list
|
199
182
|
// @param $exclude {List} a list of styles to exclude from output
|
200
183
|
@mixin to-styles($list: (), $states: true, $selectors: true, $exclude: ()) {
|
201
184
|
$exclude: -compass-list($exclude);
|
@@ -206,100 +189,37 @@
|
|
206
189
|
$property: nth($item, 1);
|
207
190
|
$value: nth($item, 2);
|
208
191
|
@if(not index($exclude, $property)) {
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
}
|
221
|
-
// deal with the states
|
222
|
-
@if length($states-data) > 0 {
|
223
|
-
@each $state in $states-data {
|
224
|
-
$value: nth($state, 2);
|
225
|
-
$state: first-value-of($state);
|
226
|
-
@if(index(-compass-list($states), $state) or $states == true) {
|
227
|
-
#{_getStateSelector($state)} {
|
228
|
-
@include _toStyles2($value, true, true, $exclude);
|
192
|
+
// deal with the states
|
193
|
+
@if($property == states and $states != false and length($value) > 0) {
|
194
|
+
@each $state in $value {
|
195
|
+
$val: nth($state, 2);
|
196
|
+
$state: first-value-of($state);
|
197
|
+
@if(index(-compass-list($states), $state) or $states == true) {
|
198
|
+
#{_getStateSelector($state)} {
|
199
|
+
@include to-styles($val, true, true, $exclude);
|
200
|
+
}
|
201
|
+
}
|
202
|
+
}
|
229
203
|
}
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
204
|
+
// deal with the nested selectors
|
205
|
+
@else if($property == selectors and $selectors != false and length($value) > 0) {
|
206
|
+
@each $selector in $value {
|
207
|
+
@if(index(-compass-list($selectors), $selector) or $selectors == true) {
|
208
|
+
#{_getSelectorSelector($selector)} {
|
209
|
+
@include to-styles(nth($selector, 2), true, true, $exclude);
|
210
|
+
}
|
211
|
+
}
|
212
|
+
}
|
239
213
|
}
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
}
|
214
|
+
// otherwise, just output it
|
215
|
+
@else if($selectors == true and $states == true ) {
|
216
|
+
@include _outputStyle($property, unquote($value));
|
244
217
|
|
245
|
-
// this is identical to to-styles, but we need to avoid Sass' recursion check :(
|
246
|
-
@mixin _toStyles2($list: (), $states: true, $selectors: true, $exclude: ()) {
|
247
|
-
$exclude: -compass-list($exclude);
|
248
|
-
$states-data: ();
|
249
|
-
$selectors-data: ();
|
250
|
-
@each $item in $list {
|
251
|
-
@if(length($item) > 1) {
|
252
|
-
$property: nth($item, 1);
|
253
|
-
$value: nth($item, 2);
|
254
|
-
@if(not index($exclude, $property)) {
|
255
|
-
@if($property == states and $states != false) {
|
256
|
-
$states-data: $value;
|
257
|
-
}
|
258
|
-
@else if($property == selectors and $selectors != false) {
|
259
|
-
$selectors-data: $value;
|
260
|
-
}
|
261
|
-
@else if($selectors == true and $states == true) {
|
262
|
-
@include _outputStyle($property, $value);
|
263
|
-
}
|
264
|
-
}
|
265
|
-
}
|
266
|
-
}
|
267
|
-
// deal with the states
|
268
|
-
@if length($states-data) > 0 {
|
269
|
-
@each $state in $states-data {
|
270
|
-
$value: nth($state, 2);
|
271
|
-
$state: first-value-of($state);
|
272
|
-
@if(index(-compass-list($states), $state) or $states == true) {
|
273
|
-
#{_getStateSelector($state)} {
|
274
|
-
@include _toStyles_final($value, $exclude);
|
275
|
-
}
|
276
|
-
}
|
277
|
-
}
|
278
|
-
}
|
279
|
-
// deal with the nested selectors
|
280
|
-
@if length($selectors-data) > 0 {
|
281
|
-
@each $selector in $selectors-data {
|
282
|
-
@if(index(-compass-list($selectors), $selector) or $selectors == true) {
|
283
|
-
#{first-value-of($selector)} {
|
284
|
-
@include _toStyles_final(nth($selector, 2), $exclude);
|
285
218
|
}
|
286
219
|
}
|
287
220
|
}
|
288
221
|
}
|
289
222
|
}
|
290
|
-
// this is a dumbed down version of to-styles. this is the final step and won't go any deeper
|
291
|
-
@mixin _toStyles_final($list: (), $exclude: ()) {
|
292
|
-
$exclude: -compass-list($exclude);
|
293
|
-
@each $item in $list {
|
294
|
-
@if(length($item) > 1) {
|
295
|
-
$property: nth($item, 1);
|
296
|
-
$value: nth($item, 2);
|
297
|
-
@if(not index($exclude, $property)) {
|
298
|
-
@include _outputStyle($property, $value);
|
299
|
-
}
|
300
|
-
}
|
301
|
-
}
|
302
|
-
}
|
303
223
|
|
304
224
|
// helper function to compute the selector for various states
|
305
225
|
// @function _getStateSelector
|
@@ -314,6 +234,17 @@
|
|
314
234
|
@return $selector;
|
315
235
|
}
|
316
236
|
|
237
|
+
@function _getSelectorSelector($selector) {
|
238
|
+
$selector: first-value-of(-compass-list($selector));
|
239
|
+
@if $selector == $CORE_GLYPH_SELECTOR_VAR {
|
240
|
+
$selector: $archetype-glyph-selector;
|
241
|
+
}
|
242
|
+
@elseif $selector == $CORE_GLYPH_SELECTOR_VAR {
|
243
|
+
$selector: $archetype-pseudo-selector;
|
244
|
+
}
|
245
|
+
@return $selector;
|
246
|
+
}
|
247
|
+
|
317
248
|
// mixin for outputting filters in legacy IE
|
318
249
|
// @mixin ie-filter
|
319
250
|
// @param $value {String|List} a set of filters to output, sans `progid:DXImageTransform.Microsoft` prefix
|
@@ -5,11 +5,10 @@
|
|
5
5
|
@if $vendor != ie { @return true; }
|
6
6
|
$compass-not-legacy-ie-version: 9; // the version if IE that Compass starts considering `legacy`
|
7
7
|
$min-ie-legacy-support: 999;
|
8
|
-
$
|
9
|
-
@if($legacy-support-for-
|
10
|
-
@if($legacy-support-for-
|
11
|
-
@
|
12
|
-
@return if($comparator == lte, $version >= $min-ie-legacy-support, index($supported-legacy-ie, $version));
|
8
|
+
@if($legacy-support-for-ie8) { $min-ie-legacy-support: 8; }
|
9
|
+
@if($legacy-support-for-ie7) { $min-ie-legacy-support: 7; }
|
10
|
+
@if($legacy-support-for-ie6) { $min-ie-legacy-support: 6; }
|
11
|
+
@return ($version >= $min-ie-legacy-support);
|
13
12
|
}
|
14
13
|
|
15
14
|
// given a list of browsers and versions, this will consolidate them into a
|
Binary file
|
File without changes
|
File without changes
|
@@ -0,0 +1,11 @@
|
|
1
|
+
.before {
|
2
|
+
*zoom: expression(this.runtimeStyle.zoom="1",(function(t){setTimeout(function(){t.el=document.createElement("x-archetype"), t.el.style.cssText="color: red; background: green;", t.insertBefore(t.el,t.childNodes[0]||null)})}(this)));
|
3
|
+
}
|
4
|
+
|
5
|
+
.after-content {
|
6
|
+
*zoom: expression(this.runtimeStyle.zoom="1",(function(t){setTimeout(function(){t.el=document.createElement("x-archetype"), t.el.innerHTML="➽", t.appendChild(t.el)})}(this)));
|
7
|
+
}
|
8
|
+
|
9
|
+
.before-style-content {
|
10
|
+
*zoom: expression(this.runtimeStyle.zoom="1",(function(t){setTimeout(function(){t.el=document.createElement("x-archetype"), t.el.innerHTML="testing ➽if this works", t.el.style.cssText="color: red; background: green;", t.insertBefore(t.el,t.childNodes[0]||null)})}(this)));
|
11
|
+
}
|