compass 0.13.alpha.4 → 0.13.alpha.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.markdown +2 -3
- data/Rakefile +91 -5
- data/VERSION.yml +1 -1
- data/examples/compass/images/emblem-a043c4f148.png +0 -0
- data/examples/compass/images/flag-03c3b29b35.png +0 -0
- data/examples/compass/images/flag-21cfbfbfc8.png +0 -0
- data/examples/css3/extensions/fancy-fonts/templates/project/Prociono.otf +0 -0
- data/features/command_line.feature +2 -6
- data/features/step_definitions/command_line_steps.rb +1 -0
- data/frameworks/compass/stylesheets/compass/_css3.scss +0 -1
- data/frameworks/compass/stylesheets/compass/_support.scss +353 -35
- data/frameworks/compass/stylesheets/compass/css3/_animation.scss +49 -48
- data/frameworks/compass/stylesheets/compass/css3/_appearance.scss +4 -8
- data/frameworks/compass/stylesheets/compass/css3/_background-clip.scss +15 -19
- data/frameworks/compass/stylesheets/compass/css3/_background-origin.scss +17 -19
- data/frameworks/compass/stylesheets/compass/css3/_background-size.scss +4 -8
- data/frameworks/compass/stylesheets/compass/css3/_border-radius.scss +37 -39
- data/frameworks/compass/stylesheets/compass/css3/_box-shadow.scss +45 -20
- data/frameworks/compass/stylesheets/compass/css3/_box-sizing.scss +6 -8
- data/frameworks/compass/stylesheets/compass/css3/_box.scss +12 -13
- data/frameworks/compass/stylesheets/compass/css3/_columns.scss +46 -26
- data/frameworks/compass/stylesheets/compass/css3/_deprecated-support.scss +272 -0
- data/frameworks/compass/stylesheets/compass/css3/_filter.scss +17 -10
- data/frameworks/compass/stylesheets/compass/css3/_flexbox.scss +134 -281
- data/frameworks/compass/stylesheets/compass/css3/_font-face.scss +5 -5
- data/frameworks/compass/stylesheets/compass/css3/_hyphenation.scss +14 -11
- data/frameworks/compass/stylesheets/compass/css3/_images.scss +77 -67
- data/frameworks/compass/stylesheets/compass/css3/_inline-block.scss +15 -6
- data/frameworks/compass/stylesheets/compass/css3/_opacity.scss +6 -2
- data/frameworks/compass/stylesheets/compass/css3/_pie.scss +1 -73
- data/frameworks/compass/stylesheets/compass/css3/_regions.scss +7 -6
- data/frameworks/compass/stylesheets/compass/css3/_selection.scss +45 -17
- data/frameworks/compass/stylesheets/compass/css3/_shared.scss +4 -261
- data/frameworks/compass/stylesheets/compass/css3/_text-shadow.scss +1 -1
- data/frameworks/compass/stylesheets/compass/css3/_transform.scss +24 -32
- data/frameworks/compass/stylesheets/compass/css3/_transition.scss +102 -152
- data/frameworks/compass/stylesheets/compass/css3/_user-interface.scss +42 -27
- data/frameworks/compass/stylesheets/compass/typography/_vertical_rhythm.scss +2 -1
- data/frameworks/compass/stylesheets/compass/typography/links/_hover-link.scss +1 -1
- data/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss +2 -2
- data/frameworks/compass/stylesheets/compass/typography/lists/_inline-list.scss +1 -1
- data/frameworks/compass/stylesheets/compass/typography/text/_ellipsis.scss +1 -1
- data/frameworks/compass/stylesheets/compass/utilities/_sass.scss +2 -0
- data/frameworks/compass/stylesheets/compass/utilities/color/_brightness.scss +12 -0
- data/frameworks/compass/stylesheets/compass/utilities/color/_contrast.scss +36 -12
- data/frameworks/compass/stylesheets/compass/utilities/general/_float.scss +6 -2
- data/frameworks/compass/stylesheets/compass/utilities/general/_hacks.scss +23 -4
- data/frameworks/compass/stylesheets/compass/utilities/general/_min.scss +1 -1
- data/frameworks/compass/stylesheets/compass/utilities/sass/_lists.scss +16 -0
- data/frameworks/compass/stylesheets/compass/utilities/sass/_maps.scss +19 -0
- data/frameworks/compass/stylesheets/compass/utilities/sprites/_base.scss +25 -18
- data/frameworks/compass/stylesheets/compass/utilities/sprites/_sprite-img.scss +3 -1
- data/frameworks/compass/stylesheets/compass/utilities/tables/_borders.scss +3 -3
- data/lib/compass.rb +1 -1
- data/lib/compass/browser_support.rb +1 -1
- data/lib/compass/caniuse.rb +247 -0
- data/lib/compass/configuration/adapters.rb +7 -1
- data/lib/compass/sass_extensions/functions.rb +5 -0
- data/lib/compass/sass_extensions/functions/constants.rb +2 -2
- data/lib/compass/sass_extensions/functions/cross_browser_support.rb +176 -1
- data/lib/compass/sass_extensions/functions/display.rb +24 -19
- data/lib/compass/sass_extensions/functions/env.rb +37 -8
- data/lib/compass/sass_extensions/functions/gradient_support.rb +10 -13
- data/lib/compass/sass_extensions/functions/math.rb +31 -13
- data/lib/compass/sass_extensions/functions/sprites.rb +48 -25
- data/lib/compass/sass_extensions/monkey_patches/browser_support.rb +42 -13
- data/lib/compass/sass_extensions/sprites/image.rb +14 -4
- data/lib/compass/sass_extensions/sprites/image_methods.rb +19 -3
- data/lib/compass/sprite_importer/content.erb +8 -7
- data/lib/compass/watcher/project_watcher.rb +75 -42
- data/lib/compass/watcher/watch.rb +35 -17
- data/test/fixtures/sprites/public/images/focus/ten-by-ten.png +0 -0
- data/test/fixtures/sprites/public/images/focus/ten-by-ten_active.png +0 -0
- data/test/fixtures/sprites/public/images/focus/ten-by-ten_focus.png +0 -0
- data/test/fixtures/sprites/public/images/focus/ten-by-ten_hover.png +0 -0
- data/test/fixtures/sprites/public/images/focus/ten-by-ten_target.png +0 -0
- data/test/fixtures/stylesheets/compass/config.rb +1 -0
- data/test/fixtures/stylesheets/compass/css/animation-with-legacy-ie.css +1 -9
- data/test/fixtures/stylesheets/compass/css/animation.css +1 -9
- data/test/fixtures/stylesheets/compass/css/appearance.css +3 -0
- data/test/fixtures/stylesheets/compass/css/background-clip.css +4 -8
- data/test/fixtures/stylesheets/compass/css/background-origin.css +4 -8
- data/test/fixtures/stylesheets/compass/css/background-size.css +3 -10
- data/test/fixtures/stylesheets/compass/css/border_radius.css +3 -3
- data/test/fixtures/stylesheets/compass/css/{box-sizeing.css → box-sizing.css} +2 -2
- data/test/fixtures/stylesheets/compass/css/box_shadow.css +15 -5
- data/test/fixtures/stylesheets/compass/css/brightness.css +14 -0
- data/test/fixtures/stylesheets/compass/css/browser-support.css +306 -0
- data/test/fixtures/stylesheets/compass/css/color.css +18 -0
- data/test/fixtures/stylesheets/compass/css/columns.css +27 -18
- data/test/fixtures/stylesheets/compass/css/filters.css +6 -6
- data/test/fixtures/stylesheets/compass/css/flexbox.css +84 -111
- data/test/fixtures/stylesheets/compass/css/fonts.css +1 -1
- data/test/fixtures/stylesheets/compass/css/gradients.css +53 -53
- data/test/fixtures/stylesheets/compass/css/grid_background.css +11 -11
- data/test/fixtures/stylesheets/compass/css/hyphenation.css +2 -4
- data/test/fixtures/stylesheets/compass/css/lists.css +6 -12
- data/test/fixtures/stylesheets/compass/css/regions.css +2 -2
- data/test/fixtures/stylesheets/compass/css/selection.css +41 -4
- data/test/fixtures/stylesheets/compass/css/sprites_with_explicit_separator.css +16 -0
- data/test/fixtures/stylesheets/compass/css/support.css +62 -0
- data/test/fixtures/stylesheets/compass/css/transform.css +64 -136
- data/test/fixtures/stylesheets/compass/css/transition.css +27 -45
- data/test/fixtures/stylesheets/compass/css/typography/links/hover-link.css +4 -0
- data/test/fixtures/stylesheets/compass/css/user-interface.css +34 -7
- data/test/fixtures/stylesheets/compass/css/utilities.css +7 -7
- data/test/fixtures/stylesheets/compass/css/vertical_rhythm.css +6 -9
- data/test/fixtures/stylesheets/compass/images/flag_states-sc42d7bf926.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag_states/foo.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag_states/foo_active.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag_states/foo_focus.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag_states/foo_hover.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag_states/foo_target.png +0 -0
- data/test/fixtures/stylesheets/compass/sass/animation-with-legacy-ie.scss +1 -3
- data/test/fixtures/stylesheets/compass/sass/appearance.scss +5 -0
- data/test/fixtures/stylesheets/compass/sass/background-clip.scss +0 -5
- data/test/fixtures/stylesheets/compass/sass/background-origin.scss +0 -5
- data/test/fixtures/stylesheets/compass/sass/background-size.scss +0 -5
- data/test/fixtures/stylesheets/compass/sass/{box-sizeing.scss → box-sizing.scss} +1 -1
- data/test/fixtures/stylesheets/compass/sass/box_shadow.scss +2 -0
- data/test/fixtures/stylesheets/compass/sass/brightness.scss +12 -0
- data/test/fixtures/stylesheets/compass/sass/browser-support.scss +30 -0
- data/test/fixtures/stylesheets/compass/sass/color.scss +22 -0
- data/test/fixtures/stylesheets/compass/sass/filters.scss +1 -0
- data/test/fixtures/stylesheets/compass/sass/flexbox.scss +84 -40
- data/test/fixtures/stylesheets/compass/sass/gradients.sass +3 -2
- data/test/fixtures/stylesheets/compass/sass/selection.scss +29 -4
- data/test/fixtures/stylesheets/compass/sass/sprites_with_explicit_separator.scss +7 -0
- data/test/fixtures/stylesheets/compass/sass/support.scss +137 -0
- data/test/fixtures/stylesheets/compass/sass/transition.scss +0 -3
- data/test/fixtures/stylesheets/compass/sass/typography/links/hover-link.scss +3 -0
- data/test/fixtures/stylesheets/compass/sass/user-interface.scss +16 -5
- data/test/fixtures/stylesheets/compass/sass/utilities.scss +4 -4
- data/test/fixtures/stylesheets/envtest/css/env.css +4 -4
- data/test/fixtures/stylesheets/envtest/tmp/env.css +4 -4
- data/test/integrations/sprites_test.rb +30 -1
- data/test/test_helper.rb +2 -2
- data/test/units/caniuse_test.rb +115 -0
- data/test/units/command_line_test.rb +1 -0
- data/test/units/sass_extensions_test.rb +5 -0
- data/test/units/sprites/image_test.rb +12 -0
- data/test/units/sprites/sprite_map_test.rb +11 -0
- data/test/units/watcher/project_watcher_test.rb +26 -18
- metadata +96 -42
- data/examples/compass/src/pie.scss +0 -110
- data/frameworks/compass/stylesheets/compass/css3/_transform-legacy.scss +0 -87
- data/frameworks/compass/templates/pie/LICENSE +0 -12
- data/frameworks/compass/templates/pie/LICENSE-APACHE2.txt +0 -13
- data/frameworks/compass/templates/pie/LICENSE-GPL2.txt +0 -278
- data/frameworks/compass/templates/pie/PIE.htc +0 -96
- data/frameworks/compass/templates/pie/manifest.rb +0 -39
- data/frameworks/compass/templates/pie/pie.scss +0 -74
- data/lib/compass/sass_extensions/functions/utility.rb +0 -10
- data/test/fixtures/stylesheets/compass/css/pie.css +0 -23
- data/test/fixtures/stylesheets/compass/sass/pie.scss +0 -47
@@ -1,10 +1,9 @@
|
|
1
1
|
// Filter
|
2
|
+
@import "compass/support";
|
2
3
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
// representing in order: -moz, -webkit, -ms, -o, -khtml
|
7
|
-
$filter-support: -moz, -webkit, not -ms, not -o, not -khtml;
|
4
|
+
// The prefixed support threshold for css filter effects.
|
5
|
+
// Defaults to the $graceful-usage-threshold.
|
6
|
+
$filter-support-threshold: $graceful-usage-threshold !default;
|
8
7
|
|
9
8
|
|
10
9
|
// Provides cross-browser support for the upcoming (?) css3 filter property.
|
@@ -12,12 +11,16 @@ $filter-support: -moz, -webkit, not -ms, not -o, not -khtml;
|
|
12
11
|
// The filter argument should adhere to the standard css3 syntax
|
13
12
|
// for the filter property.
|
14
13
|
@mixin filter($filters) {
|
15
|
-
@include
|
14
|
+
@include prefixed-properties(css-filters, $filter-support-threshold,(
|
15
|
+
filter: $filters
|
16
|
+
));
|
16
17
|
}
|
17
18
|
|
18
19
|
// @private Apply filter-margins
|
19
20
|
@mixin apply-filter-margin($position, $width) {
|
20
|
-
@include
|
21
|
+
@include prefixed-properties(css-filters, $filter-support-threshold,(
|
22
|
+
filter-margin-#{$position}: $width
|
23
|
+
));
|
21
24
|
}
|
22
25
|
|
23
26
|
// filter-margin-top
|
@@ -34,10 +37,14 @@ $filter-support: -moz, -webkit, not -ms, not -o, not -khtml;
|
|
34
37
|
|
35
38
|
// filter-margin
|
36
39
|
@mixin filter-margin($widths) {
|
37
|
-
@include
|
40
|
+
@include prefixed-properties(css-filters, $filter-support-threshold,(
|
41
|
+
filter-margin: $widths
|
42
|
+
));
|
38
43
|
}
|
39
44
|
|
40
45
|
// color-interpolation-filters (auto | sRGB | linearRGB )
|
41
46
|
@mixin color-interpolation-filters($value) {
|
42
|
-
@include
|
43
|
-
|
47
|
+
@include prefixed-properties(css-filters, $filter-support-threshold,(
|
48
|
+
color-interpolation-filters: $value
|
49
|
+
));
|
50
|
+
}
|
@@ -1,294 +1,147 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
//
|
4
|
-
//
|
5
|
-
//
|
6
|
-
//
|
7
|
-
//
|
8
|
-
//
|
9
|
-
|
10
|
-
//
|
11
|
-
|
12
|
-
//
|
13
|
-
//
|
14
|
-
//
|
15
|
-
//
|
16
|
-
//
|
17
|
-
//
|
18
|
-
//
|
19
|
-
//
|
20
|
-
|
21
|
-
|
22
|
-
//
|
23
|
-
//
|
24
|
-
//
|
25
|
-
//
|
26
|
-
|
27
|
-
|
28
|
-
//
|
29
|
-
|
30
|
-
//
|
31
|
-
//
|
32
|
-
//
|
33
|
-
|
34
|
-
|
35
|
-
//
|
36
|
-
|
37
|
-
//
|
38
|
-
//
|
39
|
-
//
|
40
|
-
//
|
41
|
-
//
|
42
|
-
|
43
|
-
|
44
|
-
//
|
45
|
-
//
|
46
|
-
|
47
|
-
|
48
|
-
//
|
49
|
-
//
|
50
|
-
//
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
1
|
+
// There are two ways to use the flexbox module.
|
2
|
+
// If you're using the final version of the spec,
|
3
|
+
// you can use the property mixins as elsewhere in
|
4
|
+
// the css3 module.
|
5
|
+
//
|
6
|
+
// You can also use the flexbox prefixing mixin `flexbox`.
|
7
|
+
// This mixin takes an optional `$version` argument which
|
8
|
+
// allows you to specify which spec version the properties
|
9
|
+
// are using so that they will be prefixed correctly.
|
10
|
+
//
|
11
|
+
// Example:
|
12
|
+
//
|
13
|
+
// .flex-column {
|
14
|
+
// /* For flexbox spec v1 */
|
15
|
+
// @include flexbox((
|
16
|
+
// display: box,
|
17
|
+
// box-orient: vertical,
|
18
|
+
// ), $version: 1);
|
19
|
+
//
|
20
|
+
// /* For flexbox spec v2 */
|
21
|
+
// @include flexbox((
|
22
|
+
// display: flexbox,
|
23
|
+
// flex-direction: column,
|
24
|
+
// ), $version: 2);
|
25
|
+
//
|
26
|
+
// /* Latest Spec */
|
27
|
+
// @include flexbox((
|
28
|
+
// display: flex,
|
29
|
+
// flex-direction: column,
|
30
|
+
// ));
|
31
|
+
// }
|
32
|
+
//
|
33
|
+
// Which compiles to:
|
34
|
+
//
|
35
|
+
// .flex-row {
|
36
|
+
// /* For flexbox spec v1 */
|
37
|
+
// display: -moz-box;
|
38
|
+
// -moz-box-orient: vertical;
|
39
|
+
// display: -webkit-box;
|
40
|
+
// -webkit-box-orient: vertical;
|
41
|
+
//
|
42
|
+
// /* For flexbox spec v2 */
|
43
|
+
// display: -ms-flexbox;
|
44
|
+
// -ms-flex-direction: column;
|
45
|
+
//
|
46
|
+
// /* Latest Spec */
|
47
|
+
// display: -webkit-flex;
|
48
|
+
// -webkit-flex-direction: column;
|
49
|
+
// display: flex;
|
50
|
+
// flex-direction: column;
|
51
|
+
// }
|
52
|
+
|
53
|
+
@import "compass/support";
|
54
|
+
|
55
|
+
$flexbox-support-threshold: $critical-usage-threshold !default;
|
56
|
+
|
57
|
+
|
58
|
+
// @private
|
59
|
+
$flexbox-capability-options: (
|
60
|
+
(full-support: true),
|
61
|
+
(partial-support: true, spec-versions: 3)
|
62
|
+
);
|
63
|
+
|
64
|
+
@mixin flexbox($properties, $version: null) {
|
65
|
+
$capability-options: $flexbox-capability-options;
|
66
|
+
@if $version {
|
67
|
+
$capability-options: (partial-support: true, spec-versions: $version);
|
68
|
+
}
|
69
|
+
|
70
|
+
@include with-each-prefix(flexbox, $flexbox-support-threshold, $capability-options) {
|
71
|
+
// Don't output unprefixed versions when the spec version is not the final version
|
72
|
+
@if $version and $current-prefix or not $version or $version == 3 {
|
73
|
+
@each $prop, $value in $properties {
|
74
|
+
@if $prop == display {
|
75
|
+
display: prefix-identifier($value);
|
76
|
+
} @else {
|
77
|
+
@include prefix-prop($prop, $value);
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
|
+
}
|
82
|
+
}
|
83
|
+
|
84
|
+
@mixin display-flex {
|
85
|
+
@include flexbox((display: flex));
|
86
|
+
}
|
87
|
+
|
88
|
+
// Values: row | row-reverse | column | column-reverse
|
89
|
+
@mixin flex-direction($direction) {
|
90
|
+
@include flexbox((flex-direction: $direction));
|
91
|
+
}
|
92
|
+
|
93
|
+
// Values: nowrap | wrap | wrap-reverse
|
94
|
+
@mixin flex-wrap($wrap) {
|
95
|
+
@include flexbox((flex-wrap: $wrap));
|
96
|
+
}
|
97
|
+
|
98
|
+
// Shorthand for flex-direction and flex-wrap.
|
99
|
+
@mixin flex-flow($flow) {
|
100
|
+
@include flexbox((flex-flow: $flow));
|
101
|
+
}
|
102
|
+
|
103
|
+
// Accepts an integer
|
104
|
+
@mixin order($order) {
|
105
|
+
@include flexbox((order: $order));
|
106
|
+
}
|
107
|
+
|
108
|
+
// Shorthand for flex-grow, flex-shrink and optionally flex-basis.
|
109
|
+
// Space separated, in that order.
|
110
|
+
@mixin flex($flex) {
|
111
|
+
@include flexbox((flex: $flex));
|
112
|
+
}
|
113
|
+
|
114
|
+
// Accepts a number.
|
115
|
+
@mixin flex-grow($flex-grow) {
|
116
|
+
@include flexbox((flex-grow: $flex-grow));
|
71
117
|
}
|
72
118
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
$common: append($common, nth($flex-support, $i) or nth($flexbox-support, $i), comma);
|
77
|
-
}
|
78
|
-
@return $common;
|
119
|
+
// Accepts a number.
|
120
|
+
@mixin flex-shrink($flex-shrink) {
|
121
|
+
@include flexbox((flex-shrink: $flex-shrink));
|
79
122
|
}
|
80
123
|
|
81
|
-
//
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
// $type: flex | inline-flex
|
86
|
-
@mixin display-flex($type: flex, $wrap: $flex-wrap-required, $legacy: $flex-legacy-enabled) {
|
87
|
-
@if $legacy and not $wrap {
|
88
|
-
@include legacy-display-flex($type);
|
89
|
-
}
|
90
|
-
|
91
|
-
@include experimental-value(display, flex-translate-value($type, flexbox), $flexbox-support...);
|
92
|
-
|
93
|
-
// if `$wrap` is true, then we need to suppress official support as generated by the `experimental()`
|
94
|
-
// mixin so that we can insert it inside an `@supports` block
|
95
|
-
$flex-support-standard: true;
|
96
|
-
$flex-support-list: $flex-support;
|
97
|
-
@if length($flex-support) > 5 {
|
98
|
-
$flex-support-standard: nth($flex-support, 6);
|
99
|
-
// a `slice()` function would really be handy here...
|
100
|
-
$flex-support-list: nth($flex-support, 1), nth($flex-support, 2), nth($flex-support, 3), nth($flex-support, 4), nth($flex-support, 5);
|
101
|
-
}
|
102
|
-
$flex-support-list: append($flex-support-list, if($wrap, false, $flex-support-standard));
|
103
|
-
@include experimental-value(display, $type, $flex-support-list...);
|
104
|
-
|
105
|
-
@if $wrap and $flex-support-standard {
|
106
|
-
@supports (flex-wrap: wrap) {
|
107
|
-
display: $type;
|
108
|
-
}
|
109
|
-
}
|
124
|
+
// Accepts any legal value for the width property.
|
125
|
+
@mixin flex-basis($flex-basis) {
|
126
|
+
@include flexbox((flex-basis: $flex-basis));
|
110
127
|
}
|
111
128
|
|
112
|
-
|
113
|
-
|
129
|
+
// Legal values: flex-start | flex-end | center | space-between | space-around
|
130
|
+
@mixin justify-content($justify-content) {
|
131
|
+
@include flexbox((justify-content: $justify-content));
|
114
132
|
}
|
115
133
|
|
116
|
-
//
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
// $value: <'flex-direction'> || <'flex-wrap'>
|
121
|
-
@mixin flex-flow($value: row nowrap, $wrap: $flex-wrap-required, $legacy: $flex-legacy-enabled) {
|
122
|
-
@if $legacy and not $wrap {
|
123
|
-
@include legacy-flex-flow($value);
|
124
|
-
}
|
125
|
-
|
126
|
-
@include experimental(flex-flow, $value, flex-support-either()...);
|
127
|
-
}
|
128
|
-
|
129
|
-
@mixin legacy-flex-flow($value: row nowrap) {
|
130
|
-
@if length($value) > 1 { // @box version doesn't have a shorthand
|
131
|
-
@include legacy-flex-direction(nth($value, 1));
|
132
|
-
@include legacy-flex-wrap(nth($value, 2));
|
133
|
-
} @else {
|
134
|
-
$value: unquote($value);
|
135
|
-
@if $value == row or $value == row-reverse or $value == column or $value == column-reverse {
|
136
|
-
@include legacy-flex-direction($value);
|
137
|
-
} @else {
|
138
|
-
@include legacy-flex-wrap($value);
|
139
|
-
}
|
140
|
-
}
|
141
|
-
}
|
142
|
-
|
143
|
-
// ----------------------------------------------------------------------
|
144
|
-
|
145
|
-
// $value: row | row-reverse | column | column-reverse
|
146
|
-
@mixin flex-direction($value: row, $wrap: $flex-wrap-required, $legacy: $flex-legacy-enabled) {
|
147
|
-
@if $legacy and not $wrap {
|
148
|
-
@include legacy-flex-direction($value);
|
149
|
-
}
|
150
|
-
|
151
|
-
@include experimental(flex-direction, $value, flex-support-either()...);
|
152
|
-
}
|
153
|
-
|
154
|
-
@mixin legacy-flex-direction($value: row) {
|
155
|
-
$value: unquote($value);
|
156
|
-
@include experimental(box-orient, if($value == row or $value == row-reverse, horizontal, vertical), $box-support...);
|
157
|
-
@include experimental(box-direction, if($value == row-reverse or $value == column-reverse, reverse, normal), $box-support...);
|
158
|
-
}
|
159
|
-
|
160
|
-
// ----------------------------------------------------------------------
|
161
|
-
|
162
|
-
// $value: nowrap | wrap | wrap-reverse
|
163
|
-
@mixin flex-wrap($value: nowrap, $wrap: $flex-wrap-required, $legacy: $flex-legacy-enabled) {
|
164
|
-
@if $legacy and not $wrap {
|
165
|
-
@include legacy-flex-wrap($value);
|
166
|
-
}
|
167
|
-
|
168
|
-
@include experimental(flex-wrap, $value, flex-support-either()...);
|
169
|
-
}
|
170
|
-
|
171
|
-
@mixin legacy-flex-wrap($value: nowrap) {
|
172
|
-
// NOTE: @box has no equivalent of wrap-reverse
|
173
|
-
@include experimental(box-lines, if($value == nowrap, single, multiple), $box-support...);
|
174
|
-
}
|
175
|
-
|
176
|
-
// ----------------------------------------------------------------------
|
177
|
-
|
178
|
-
// Distributing extra space along the "main axis"
|
179
|
-
// $value: flex-start | flex-end | center | space-between | space-around
|
180
|
-
@mixin justify-content($value: flex-start, $wrap: $flex-wrap-required, $legacy: $flex-legacy-enabled) {
|
181
|
-
@if $legacy and not $wrap {
|
182
|
-
@include legacy-justify-content($value);
|
183
|
-
}
|
184
|
-
|
185
|
-
@include experimental(flex-pack, flex-translate-value($value, flexbox), $flexbox-support...);
|
186
|
-
@include experimental(justify-content, $value, $flex-support...);
|
134
|
+
// Legal values: flex-start | flex-end | center | baseline | stretch
|
135
|
+
@mixin align-items($align-items) {
|
136
|
+
@include flexbox((align-items: $align-items));
|
187
137
|
}
|
188
138
|
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
// ----------------------------------------------------------------------
|
194
|
-
|
195
|
-
// Distributing extra space along the "cross axis"
|
196
|
-
// $value: flex-start | flex-end | center | space-between | space-around | stretch
|
197
|
-
@mixin align-content($value: flex-start, $wrap: $flex-wrap-required, $legacy: $flex-legacy-enabled) {
|
198
|
-
@if $legacy and not $wrap {
|
199
|
-
@include legacy-align-content($value);
|
200
|
-
}
|
201
|
-
|
202
|
-
@include experimental(flex-line-pack, flex-translate-value($value, flexbox), $flexbox-support...);
|
203
|
-
@include experimental(align-content, $value, $flex-support...);
|
204
|
-
}
|
205
|
-
|
206
|
-
@mixin legacy-align-content($value: flex-start) {
|
207
|
-
@include experimental(box-align, flex-translate-value($value, box), $box-support...);
|
208
|
-
}
|
209
|
-
|
210
|
-
// ----------------------------------------------------------------------
|
211
|
-
|
212
|
-
// Align items along the "cross axis"
|
213
|
-
// $value: flex-start | flex-end | center | baseline | stretch
|
214
|
-
@mixin align-items($value: stretch) { // the flex container
|
215
|
-
// There is no @box version of this property
|
216
|
-
@include experimental(flex-align, flex-translate-value($value, flexbox), $flexbox-support...);
|
217
|
-
@include experimental(align-items, $value, $flex-support...);
|
218
|
-
}
|
219
|
-
|
220
|
-
// ====================================================================================================
|
221
|
-
// | Flex Item Properties
|
222
|
-
// ====================================================================================================
|
223
|
-
|
224
|
-
// $value: none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]
|
225
|
-
@mixin flex($value: 0 1 auto, $wrap: $flex-wrap-required, $legacy: $flex-legacy-enabled) {
|
226
|
-
$value: unquote($value);
|
227
|
-
@if $legacy and unitless(nth($value, 1)) {
|
228
|
-
// @box version does not have a shorthand, see `legacy-flex-grow`
|
229
|
-
@include legacy-flex-grow(nth($value, 1));
|
230
|
-
}
|
231
|
-
|
232
|
-
@include experimental(flex, $value, flex-support-either()...);
|
233
|
-
}
|
234
|
-
|
235
|
-
// ----------------------------------------------------------------------
|
236
|
-
|
237
|
-
// $value: Integer
|
238
|
-
@mixin flex-grow($value: 0, $wrap: $flex-wrap-required, $legacy: $flex-legacy-enabled) {
|
239
|
-
@if $legacy and not $wrap {
|
240
|
-
@include legacy-flex-grow($value);
|
241
|
-
}
|
242
|
-
|
243
|
-
// There is no @flexbox version of this property
|
244
|
-
@include experimental(flex-grow, $value, $flex-support...);
|
245
|
-
}
|
246
|
-
|
247
|
-
@mixin legacy-flex-grow($value: 0) {
|
248
|
-
@include experimental(box-flex, $value, $box-support...);
|
249
|
-
}
|
250
|
-
|
251
|
-
// ----------------------------------------------------------------------
|
252
|
-
|
253
|
-
// $value: Integer
|
254
|
-
@mixin flex-shrink($value: 1) {
|
255
|
-
// There is no @box version of this property
|
256
|
-
// There is no @flexbox version of this property
|
257
|
-
@include experimental(flex-shrink, $value, $flex-support...);
|
258
|
-
}
|
259
|
-
|
260
|
-
// ----------------------------------------------------------------------
|
261
|
-
|
262
|
-
// $value: united number (eg: 100px)
|
263
|
-
@mixin flex-basis($value: auto) {
|
264
|
-
// There is no @box version of this property
|
265
|
-
// There is no @flexbox version of this property
|
266
|
-
@include experimental(flex-basis, $value, $flex-support...);
|
267
|
-
}
|
268
|
-
|
269
|
-
// ----------------------------------------------------------------------
|
270
|
-
|
271
|
-
// Align items along the "cross axis" -- overrides `align-items` value on individual items
|
272
|
-
// $value: auto | flex-start | flex-end | center | baseline | stretch
|
273
|
-
@mixin align-self($value: auto) { // children of flex containers
|
274
|
-
// There is no @box version of this property
|
275
|
-
@include experimental(flex-item-align, flex-translate-value($value, flexbox), $flexbox-support...);
|
276
|
-
@include experimental(align-self, $value, $flex-support...);
|
277
|
-
}
|
278
|
-
|
279
|
-
// ----------------------------------------------------------------------
|
280
|
-
|
281
|
-
// $value: Integer
|
282
|
-
@mixin order($value: 0, $wrap: $flex-wrap-required, $legacy: $flex-legacy-enabled) {
|
283
|
-
@if $legacy and not $wrap {
|
284
|
-
@include legacy-order($value);
|
285
|
-
}
|
286
|
-
|
287
|
-
@include experimental(flex-order, $value, $flexbox-support...);
|
288
|
-
@include experimental(order, $value, $flex-support...);
|
139
|
+
// Legal values: auto | flex-start | flex-end | center | baseline | stretch
|
140
|
+
@mixin align-self($align-self) {
|
141
|
+
@include flexbox((align-self: $align-self));
|
289
142
|
}
|
290
143
|
|
291
|
-
|
292
|
-
|
293
|
-
|
144
|
+
// Legal values: flex-start | flex-end | center | space-between | space-around | stretch
|
145
|
+
@mixin align-content($align-content) {
|
146
|
+
@include flexbox((align-content: $align-content));
|
294
147
|
}
|