gem_2345 0.1.1 → 0.1.2
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.
- data/lib/gem_2345/import-once.rb +28 -0
- data/lib/gem_2345/import-once/activate.rb +20 -0
- data/lib/gem_2345/import-once/engine.rb +36 -0
- data/lib/gem_2345/import-once/importer.rb +81 -0
- data/lib/gem_2345/import-once/version.rb +5 -0
- data/lib/gem_2345/version.rb +1 -1
- data/stylesheets/_compass.scss +3 -0
- data/stylesheets/_lemonade.scss +38 -0
- data/stylesheets/compass/_configuration.scss +54 -0
- data/stylesheets/compass/_css3.scss +21 -0
- data/stylesheets/compass/_layout.scss +3 -0
- data/stylesheets/compass/_reset-legacy.scss +3 -0
- data/stylesheets/compass/_reset.scss +3 -0
- data/stylesheets/compass/_support.scss +447 -0
- data/stylesheets/compass/_typography.scss +4 -0
- data/stylesheets/compass/_utilities.scss +9 -0
- data/stylesheets/compass/css3/_animation.scss +122 -0
- data/stylesheets/compass/css3/_appearance.scss +17 -0
- data/stylesheets/compass/css3/_background-clip.scss +35 -0
- data/stylesheets/compass/css3/_background-origin.scss +37 -0
- data/stylesheets/compass/css3/_background-size.scss +19 -0
- data/stylesheets/compass/css3/_border-radius.scss +107 -0
- data/stylesheets/compass/css3/_box-shadow.scss +88 -0
- data/stylesheets/compass/css3/_box-sizing.scss +21 -0
- data/stylesheets/compass/css3/_box.scss +85 -0
- data/stylesheets/compass/css3/_columns.scss +212 -0
- data/stylesheets/compass/css3/_deprecated-support.scss +272 -0
- data/stylesheets/compass/css3/_filter.scss +50 -0
- data/stylesheets/compass/css3/_flexbox.scss +156 -0
- data/stylesheets/compass/css3/_font-face.scss +48 -0
- data/stylesheets/compass/css3/_hyphenation.scss +71 -0
- data/stylesheets/compass/css3/_images.scss +152 -0
- data/stylesheets/compass/css3/_inline-block.scss +31 -0
- data/stylesheets/compass/css3/_opacity.scss +27 -0
- data/stylesheets/compass/css3/_pie.scss +1 -0
- data/stylesheets/compass/css3/_regions.scss +27 -0
- data/stylesheets/compass/css3/_selection.scss +59 -0
- data/stylesheets/compass/css3/_shared.scss +5 -0
- data/stylesheets/compass/css3/_text-shadow.scss +82 -0
- data/stylesheets/compass/css3/_transform.scss +590 -0
- data/stylesheets/compass/css3/_transition.scss +190 -0
- data/stylesheets/compass/css3/_user-interface.scss +71 -0
- data/stylesheets/compass/layout/_grid-background.scss +178 -0
- data/stylesheets/compass/layout/_sticky-footer.scss +23 -0
- data/stylesheets/compass/layout/_stretching.scss +24 -0
- data/stylesheets/compass/reset/_utilities-legacy.scss +135 -0
- data/stylesheets/compass/reset/_utilities.scss +142 -0
- data/stylesheets/compass/typography/_links.scss +3 -0
- data/stylesheets/compass/typography/_lists.scss +4 -0
- data/stylesheets/compass/typography/_text.scss +4 -0
- data/stylesheets/compass/typography/_units.scss +183 -0
- data/stylesheets/compass/typography/_vertical_rhythm.scss +300 -0
- data/stylesheets/compass/typography/links/_hover-link.scss +5 -0
- data/stylesheets/compass/typography/links/_link-colors.scss +28 -0
- data/stylesheets/compass/typography/links/_unstyled-link.scss +7 -0
- data/stylesheets/compass/typography/lists/_bullets.scss +34 -0
- data/stylesheets/compass/typography/lists/_horizontal-list.scss +63 -0
- data/stylesheets/compass/typography/lists/_inline-block-list.scss +50 -0
- data/stylesheets/compass/typography/lists/_inline-list.scss +47 -0
- data/stylesheets/compass/typography/text/_ellipsis.scss +25 -0
- data/stylesheets/compass/typography/text/_force-wrap.scss +12 -0
- data/stylesheets/compass/typography/text/_nowrap.scss +2 -0
- data/stylesheets/compass/typography/text/_replacement.scss +74 -0
- data/stylesheets/compass/utilities/_color.scss +1 -0
- data/stylesheets/compass/utilities/_general.scss +6 -0
- data/stylesheets/compass/utilities/_links.scss +5 -0
- data/stylesheets/compass/utilities/_lists.scss +6 -0
- data/stylesheets/compass/utilities/_print.scss +17 -0
- data/stylesheets/compass/utilities/_sass.scss +2 -0
- data/stylesheets/compass/utilities/_sprites.scss +2 -0
- data/stylesheets/compass/utilities/_tables.scss +3 -0
- data/stylesheets/compass/utilities/_text.scss +5 -0
- data/stylesheets/compass/utilities/color/_brightness.scss +20 -0
- data/stylesheets/compass/utilities/color/_contrast.scss +52 -0
- data/stylesheets/compass/utilities/general/_clearfix.scss +44 -0
- data/stylesheets/compass/utilities/general/_float.scss +38 -0
- data/stylesheets/compass/utilities/general/_hacks.scss +65 -0
- data/stylesheets/compass/utilities/general/_min.scss +16 -0
- data/stylesheets/compass/utilities/general/_reset.scss +2 -0
- data/stylesheets/compass/utilities/general/_tabs.scss +1 -0
- data/stylesheets/compass/utilities/general/_tag-cloud.scss +18 -0
- data/stylesheets/compass/utilities/links/_hover-link.scss +3 -0
- data/stylesheets/compass/utilities/links/_link-colors.scss +3 -0
- data/stylesheets/compass/utilities/links/_unstyled-link.scss +3 -0
- data/stylesheets/compass/utilities/lists/_bullets.scss +3 -0
- data/stylesheets/compass/utilities/lists/_horizontal-list.scss +3 -0
- data/stylesheets/compass/utilities/lists/_inline-block-list.scss +3 -0
- data/stylesheets/compass/utilities/lists/_inline-list.scss +3 -0
- data/stylesheets/compass/utilities/sass/_lists.scss +16 -0
- data/stylesheets/compass/utilities/sass/_maps.scss +19 -0
- data/stylesheets/compass/utilities/sprites/_base.scss +92 -0
- data/stylesheets/compass/utilities/sprites/_sprite-img.scss +81 -0
- data/stylesheets/compass/utilities/tables/_alternating-rows-and-columns.scss +22 -0
- data/stylesheets/compass/utilities/tables/_borders.scss +38 -0
- data/stylesheets/compass/utilities/tables/_scaffolding.scss +9 -0
- data/stylesheets/compass/utilities/text/_ellipsis.scss +3 -0
- data/stylesheets/compass/utilities/text/_nowrap.scss +3 -0
- data/stylesheets/compass/utilities/text/_replacement.scss +3 -0
- data/templates/ellipsis/ellipsis.sass +9 -0
- data/templates/ellipsis/manifest.rb +27 -0
- data/templates/ellipsis/xml/ellipsis.xml +14 -0
- data/templates/extension/manifest.rb +26 -0
- data/templates/extension/stylesheets/main.sass +1 -0
- data/templates/extension/templates/project/manifest.rb +2 -0
- data/templates/extension/templates/project/screen.sass +2 -0
- data/templates/project/USAGE.markdown +32 -0
- data/templates/project/ie.sass +6 -0
- data/templates/project/manifest.rb +4 -0
- data/templates/project/print.sass +6 -0
- data/templates/project/screen.sass +7 -0
- metadata +113 -10
- data/.gitignore +0 -14
- data/Gemfile +0 -4
- data/LICENSE.txt +0 -22
- data/README.md +0 -31
- data/Rakefile +0 -9
- data/gem_2345.gemspec +0 -25
@@ -0,0 +1,21 @@
|
|
1
|
+
// Box Sizing
|
2
|
+
|
3
|
+
@import "compass/support";
|
4
|
+
|
5
|
+
// The prefixed support threshold for box-sizing.
|
6
|
+
// Defaults to the $graceful-usage-threshold.
|
7
|
+
$box-sizing-support-threshold: $critical-usage-threshold !default;
|
8
|
+
|
9
|
+
// The default box-sizing model when no argument is provided to the box-sizing mixin: [ content-box | border-box | padding-box ]
|
10
|
+
//
|
11
|
+
// The browser default is content-box, compass defaults to border-box.
|
12
|
+
$default-box-sizing: border-box !default;
|
13
|
+
|
14
|
+
|
15
|
+
// Change the box model for Mozilla, Webkit, IE8 and the future
|
16
|
+
//
|
17
|
+
// $box-model: [ content-box | border-box | padding-box ]
|
18
|
+
@mixin box-sizing($box-model: $default-box-sizing) {
|
19
|
+
$box-model: unquote($box-model);
|
20
|
+
@include prefixed-properties(css3-boxsizing, $box-sizing-support-threshold, (box-sizing: $box-model));
|
21
|
+
}
|
@@ -0,0 +1,85 @@
|
|
1
|
+
// Flexible Box
|
2
|
+
@import "deprecated-support";
|
3
|
+
|
4
|
+
@warn "The compass/css3/box module is DEPRECATED and will be removed in the next release. Please use compass/css3/flexbox instead.";
|
5
|
+
|
6
|
+
// @private css3-feature-support variables must always include a list of five boolean values
|
7
|
+
$legacy-box-support: -moz, -webkit, not -o, -ms, not -khtml;
|
8
|
+
|
9
|
+
// Default box orientation, assuming that the user wants something less block-like
|
10
|
+
$default-box-orient : horizontal !default;
|
11
|
+
|
12
|
+
// Default box-align
|
13
|
+
$default-box-align : stretch !default;
|
14
|
+
|
15
|
+
// Default box flex
|
16
|
+
$default-box-flex : 0 !default;
|
17
|
+
|
18
|
+
// Default flex group
|
19
|
+
$default-box-flex-group : 1 !default;
|
20
|
+
|
21
|
+
// Box direction default value
|
22
|
+
$default-box-direction : normal !default;
|
23
|
+
|
24
|
+
// Default ordinal group
|
25
|
+
$default-box-ordinal-group : 1 !default;
|
26
|
+
|
27
|
+
// Default box lines
|
28
|
+
$default-box-lines : single !default;
|
29
|
+
|
30
|
+
// Default box pack
|
31
|
+
$default-box-pack : start !default;
|
32
|
+
|
33
|
+
|
34
|
+
// Apply 'display:box;' to an element.
|
35
|
+
// - must be used for any of the other flexbox mixins to work properly
|
36
|
+
@mixin display-box {
|
37
|
+
@include experimental-value(display, box, $legacy-box-support...);
|
38
|
+
}
|
39
|
+
|
40
|
+
// Box orientation [ horizontal | vertical | inline-axis | block-axis | inherit ]
|
41
|
+
@mixin box-orient($orientation: $default-box-orient) {
|
42
|
+
$orientation : unquote($orientation);
|
43
|
+
@include experimental(box-orient, $orientation, $legacy-box-support...);
|
44
|
+
}
|
45
|
+
|
46
|
+
// Box align [ start | end | center | baseline | stretch ]
|
47
|
+
@mixin box-align($alignment: $default-box-align) {
|
48
|
+
$alignment : unquote($alignment);
|
49
|
+
@include experimental(box-align, $alignment, $legacy-box-support...);
|
50
|
+
}
|
51
|
+
|
52
|
+
// Takes an int argument for box flex. Apply this to the children inside the box.
|
53
|
+
//
|
54
|
+
// For example: "div.display-box > div.child-box" would get the box flex mixin.
|
55
|
+
@mixin box-flex($flex: $default-box-flex) {
|
56
|
+
@include experimental(box-flex, $flex, $legacy-box-support...);
|
57
|
+
}
|
58
|
+
|
59
|
+
// Takes an int argument for flexible grouping
|
60
|
+
@mixin box-flex-group($group: $default-box-flex-group) {
|
61
|
+
@include experimental(box-flex-group, $group, $legacy-box-support...);
|
62
|
+
}
|
63
|
+
|
64
|
+
// Takes an int argument for ordinal grouping and rearranging the order
|
65
|
+
@mixin box-ordinal-group($group: $default-box-ordinal-group) {
|
66
|
+
@include experimental(box-ordinal-group, $group, $legacy-box-support...);
|
67
|
+
}
|
68
|
+
|
69
|
+
// Box direction [ normal | reverse | inherit ]
|
70
|
+
@mixin box-direction($direction: $default-box-direction) {
|
71
|
+
$direction: unquote($direction);
|
72
|
+
@include experimental(box-direction, $direction, $legacy-box-support...);
|
73
|
+
}
|
74
|
+
|
75
|
+
// Box lines [ single | multiple ]
|
76
|
+
@mixin box-lines($lines: $default-box-lines) {
|
77
|
+
$lines: unquote($lines);
|
78
|
+
@include experimental(box-lines, $lines, $legacy-box-support...);
|
79
|
+
}
|
80
|
+
|
81
|
+
// Box pack [ start | end | center | justify ]
|
82
|
+
@mixin box-pack($pack: $default-box-pack) {
|
83
|
+
$pack: unquote($pack);
|
84
|
+
@include experimental(box-pack, $pack, $legacy-box-support...);
|
85
|
+
}
|
@@ -0,0 +1,212 @@
|
|
1
|
+
// Columns
|
2
|
+
@import "compass/support";
|
3
|
+
|
4
|
+
// The prefixed support threshold for columns.
|
5
|
+
// Defaults to the $critical-usage-threshold.
|
6
|
+
$multicolumn-support-threshold: $critical-usage-threshold !default;
|
7
|
+
|
8
|
+
|
9
|
+
// Specify the shorthand `columns` property.
|
10
|
+
//
|
11
|
+
// Example:
|
12
|
+
//
|
13
|
+
// @include columns(20em 2);
|
14
|
+
@mixin columns($width-and-count) {
|
15
|
+
@include prefixed-properties(multicolumn, $multicolumn-support-threshold,(
|
16
|
+
columns: $width-and-count
|
17
|
+
));
|
18
|
+
}
|
19
|
+
|
20
|
+
// Specify the number of columns
|
21
|
+
@mixin column-count($count) {
|
22
|
+
@include prefixed-properties(multicolumn, $multicolumn-support-threshold,(
|
23
|
+
column-count: $count
|
24
|
+
));
|
25
|
+
}
|
26
|
+
|
27
|
+
// Specify the gap between columns e.g. `20px`
|
28
|
+
@mixin column-gap($width) {
|
29
|
+
@include prefixed-properties(multicolumn, $multicolumn-support-threshold,(
|
30
|
+
column-gap: $width
|
31
|
+
));
|
32
|
+
}
|
33
|
+
|
34
|
+
// Specify the width of columns e.g. `100px`
|
35
|
+
@mixin column-width($width) {
|
36
|
+
@include prefixed-properties(multicolumn, $multicolumn-support-threshold,(
|
37
|
+
column-width: $width
|
38
|
+
));
|
39
|
+
}
|
40
|
+
|
41
|
+
// Specify how many columns an element should span across.
|
42
|
+
//
|
43
|
+
// * legal values are 1, all
|
44
|
+
@mixin column-span($columns) {
|
45
|
+
@include prefixed-properties(multicolumn, $multicolumn-support-threshold,(
|
46
|
+
column-span: $columns
|
47
|
+
));
|
48
|
+
}
|
49
|
+
|
50
|
+
// Specify the width of the rule between columns e.g. `1px`
|
51
|
+
@mixin column-rule-width($width) {
|
52
|
+
@include prefixed-properties(multicolumn, $multicolumn-support-threshold,(
|
53
|
+
rule-width: $width
|
54
|
+
));
|
55
|
+
}
|
56
|
+
|
57
|
+
// Specify the style of the rule between columns e.g. `dotted`.
|
58
|
+
// This works like border-style.
|
59
|
+
@mixin column-rule-style($style) {
|
60
|
+
@include prefixed-properties(multicolumn, $multicolumn-support-threshold,(
|
61
|
+
rule-style: $style
|
62
|
+
));
|
63
|
+
}
|
64
|
+
|
65
|
+
// Specify the color of the rule between columns e.g. `blue`.
|
66
|
+
// This works like border-color.
|
67
|
+
@mixin column-rule-color($color) {
|
68
|
+
@include prefixed-properties(multicolumn, $multicolumn-support-threshold,(
|
69
|
+
rule-color: $color
|
70
|
+
));
|
71
|
+
}
|
72
|
+
|
73
|
+
// Mixin encompassing all column rule properties
|
74
|
+
// For example:
|
75
|
+
//
|
76
|
+
// @include column-rule(1px, solid, #c00)
|
77
|
+
//
|
78
|
+
// Or the values can be space separated:
|
79
|
+
//
|
80
|
+
// @include column-rule(1px solid #c00)
|
81
|
+
@mixin column-rule($width, $style: null, $color: null) {
|
82
|
+
@include prefixed-properties(multicolumn, $multicolumn-support-threshold,(
|
83
|
+
column-rule: $width $style $color
|
84
|
+
));
|
85
|
+
}
|
86
|
+
|
87
|
+
// All-purpose mixin for setting column breaks.
|
88
|
+
//
|
89
|
+
// * legal values for $type : before, after, inside
|
90
|
+
// * legal values for '$value' are dependent on $type
|
91
|
+
// * when $type = before, legal values are auto, always, avoid, left, right, page, column, avoid-page, avoid-column
|
92
|
+
// * when $type = after, legal values are auto, always, avoid, left, right, page, column, avoid-page, avoid-column
|
93
|
+
// * when $type = inside, legal values are auto, avoid, avoid-page, avoid-column
|
94
|
+
//
|
95
|
+
// Examples:
|
96
|
+
// h2.before {@include column-break(before, always);}
|
97
|
+
// h2.after {@include column-break(after, always); }
|
98
|
+
// h2.inside {@include column-break(inside); }
|
99
|
+
//
|
100
|
+
// Which generates:
|
101
|
+
// h2.before {
|
102
|
+
// -webkit-column-break-before: always;
|
103
|
+
// break-before: always;}
|
104
|
+
//
|
105
|
+
// h2.after {
|
106
|
+
// -webkit-column-break-after: always;
|
107
|
+
// break-after: always; }
|
108
|
+
//
|
109
|
+
// h2.inside {
|
110
|
+
// -webkit-column-break-inside: auto;
|
111
|
+
// break-inside: auto;}
|
112
|
+
|
113
|
+
@mixin column-break($type: before, $value: auto){
|
114
|
+
@include with-each-prefix(multicolumn, $multicolumn-support-threshold) {
|
115
|
+
@if $current-prefix == -webkit {
|
116
|
+
// Webkit uses non-standard syntax
|
117
|
+
-webkit-column-break-#{$type}: $value;
|
118
|
+
} @else if $current-prefix == -moz {
|
119
|
+
// Moz uses a different non-standard syntax
|
120
|
+
-moz-page-break-#{$type}: $value;
|
121
|
+
} @else {
|
122
|
+
@include prefix-prop(break-#{$type}, $value);
|
123
|
+
}
|
124
|
+
}
|
125
|
+
}
|
126
|
+
|
127
|
+
// Mixin for setting break-before
|
128
|
+
//
|
129
|
+
// * legal values are auto, always, avoid, left, right, page, column, avoid-page, avoid-column
|
130
|
+
//
|
131
|
+
// Example:
|
132
|
+
// h2.before {@include break-before(always);}
|
133
|
+
//
|
134
|
+
// Which generates:
|
135
|
+
//
|
136
|
+
// h2.before {
|
137
|
+
// -webkit-column-break-before: always;
|
138
|
+
// break-before: always;}
|
139
|
+
@mixin break-before($value: auto){
|
140
|
+
@include column-break(before, $value);
|
141
|
+
}
|
142
|
+
|
143
|
+
@mixin column-break-before($value: auto){
|
144
|
+
@include column-break(before, $value);
|
145
|
+
@warn '"column-break-before" has been deprecated in favor of the official syntax: "break-before".';
|
146
|
+
}
|
147
|
+
|
148
|
+
// Mixin for setting break-after
|
149
|
+
//
|
150
|
+
// * legal values are auto, always, avoid, left, right, page, column, avoid-page, avoid-column
|
151
|
+
//
|
152
|
+
// Example:
|
153
|
+
// h2.after {@include break-after(always); }
|
154
|
+
//
|
155
|
+
// Which generates:
|
156
|
+
//
|
157
|
+
// h2.after {
|
158
|
+
// -webkit-column-break-after: always;
|
159
|
+
// break-after: always; }
|
160
|
+
@mixin break-after($value: auto){
|
161
|
+
@include column-break(after, $value);
|
162
|
+
}
|
163
|
+
|
164
|
+
@mixin column-break-after($value: auto){
|
165
|
+
@include column-break(after, $value);
|
166
|
+
@warn '"column-break-after" has been deprecated in favor of the official syntax: "break-after".';
|
167
|
+
}
|
168
|
+
|
169
|
+
// Mixin for setting break-inside
|
170
|
+
//
|
171
|
+
// * legal values are auto, avoid, avoid-page, avoid-column
|
172
|
+
//
|
173
|
+
// Example:
|
174
|
+
// h2.inside {@include break-inside();}
|
175
|
+
//
|
176
|
+
// Which generates:
|
177
|
+
//
|
178
|
+
// h2.inside {
|
179
|
+
// -webkit-column-break-inside: auto;
|
180
|
+
// break-inside: auto;}
|
181
|
+
@mixin break-inside($value: auto){
|
182
|
+
@include column-break(inside, $value);
|
183
|
+
}
|
184
|
+
|
185
|
+
@mixin column-break-inside($value: auto){
|
186
|
+
@include column-break(inside, $value);
|
187
|
+
@warn '"column-break-inside" has been deprecated in favor of the official syntax: "break-inside".';
|
188
|
+
}
|
189
|
+
|
190
|
+
// Mixin for setting column-span
|
191
|
+
//
|
192
|
+
// * legal values: none, all
|
193
|
+
//
|
194
|
+
// Example:
|
195
|
+
// h2.span {@include column-span();}
|
196
|
+
@mixin column-span($span: all){
|
197
|
+
@include prefixed-properties(multicolumn, $multicolumn-support-threshold,(
|
198
|
+
column-span: $span
|
199
|
+
));
|
200
|
+
}
|
201
|
+
|
202
|
+
// Mixin for setting column-fill
|
203
|
+
//
|
204
|
+
// * legal values: auto, balance
|
205
|
+
//
|
206
|
+
// Example:
|
207
|
+
// h2.fill {@include column-fill();}
|
208
|
+
@mixin column-fill($fill: balance){
|
209
|
+
@include prefixed-properties(multicolumn, $multicolumn-support-threshold,(
|
210
|
+
column-fill: $fill
|
211
|
+
));
|
212
|
+
}
|
@@ -0,0 +1,272 @@
|
|
1
|
+
@import "compass/support";
|
2
|
+
|
3
|
+
// XXX Remove these
|
4
|
+
$experimental-support-for-mozilla: true !default;
|
5
|
+
$experimental-support-for-webkit: true !default;
|
6
|
+
$experimental-support-for-opera: true !default;
|
7
|
+
$experimental-support-for-microsoft: true !default;
|
8
|
+
$experimental-support-for-khtml: false !default;
|
9
|
+
$experimental-support-for-svg: false !default;
|
10
|
+
$legacy-support-for-ie6: true !default;
|
11
|
+
$legacy-support-for-ie7: true !default;
|
12
|
+
$legacy-support-for-ie8: true !default;
|
13
|
+
$legacy-support-for-mozilla: true !default;
|
14
|
+
$legacy-support-for-webkit: true !default;
|
15
|
+
|
16
|
+
// This mixin provides basic support for CSS3 properties and
|
17
|
+
// their corresponding experimental CSS2 properties when
|
18
|
+
// the implementations are identical except for the property
|
19
|
+
// prefix.
|
20
|
+
@mixin experimental($property, $value,
|
21
|
+
$moz : $experimental-support-for-mozilla,
|
22
|
+
$webkit : $experimental-support-for-webkit,
|
23
|
+
$o : $experimental-support-for-opera,
|
24
|
+
$ms : $experimental-support-for-microsoft,
|
25
|
+
$khtml : $experimental-support-for-khtml,
|
26
|
+
$official : true
|
27
|
+
) {
|
28
|
+
@if $webkit and $experimental-support-for-webkit { -webkit-#{$property} : $value; }
|
29
|
+
@if $khtml and $experimental-support-for-khtml { -khtml-#{$property} : $value; }
|
30
|
+
@if $moz and $experimental-support-for-mozilla { -moz-#{$property} : $value; }
|
31
|
+
@if $ms and $experimental-support-for-microsoft { -ms-#{$property} : $value; }
|
32
|
+
@if $o and $experimental-support-for-opera { -o-#{$property} : $value; }
|
33
|
+
@if $official { #{$property} : $value; }
|
34
|
+
}
|
35
|
+
|
36
|
+
// This mixin is a shortcut for applying only a single experimental value
|
37
|
+
@mixin experimental-only-for($property, $value,
|
38
|
+
$moz : false,
|
39
|
+
$webkit : false,
|
40
|
+
$o : false,
|
41
|
+
$ms : false,
|
42
|
+
$khtml : false,
|
43
|
+
$official : false
|
44
|
+
) {
|
45
|
+
@include experimental($property, $value, $moz, $webkit, $o, $ms, $khtml, $official);
|
46
|
+
}
|
47
|
+
|
48
|
+
// Same as experimental(), but for cases when the property is the same and the value is vendorized
|
49
|
+
@mixin experimental-value($property, $value,
|
50
|
+
$moz : $experimental-support-for-mozilla,
|
51
|
+
$webkit : $experimental-support-for-webkit,
|
52
|
+
$o : $experimental-support-for-opera,
|
53
|
+
$ms : $experimental-support-for-microsoft,
|
54
|
+
$khtml : $experimental-support-for-khtml,
|
55
|
+
$official : true
|
56
|
+
) {
|
57
|
+
@if $webkit and $experimental-support-for-webkit { #{$property} : -webkit-#{$value}; }
|
58
|
+
@if $khtml and $experimental-support-for-khtml { #{$property} : -khtml-#{$value}; }
|
59
|
+
@if $moz and $experimental-support-for-mozilla { #{$property} : -moz-#{$value}; }
|
60
|
+
@if $ms and $experimental-support-for-microsoft { #{$property} : -ms-#{$value}; }
|
61
|
+
@if $o and $experimental-support-for-opera { #{$property} : -o-#{$value}; }
|
62
|
+
@if $official { #{$property} : #{$value}; }
|
63
|
+
}
|
64
|
+
|
65
|
+
// @private
|
66
|
+
// Check a given support list for support of a particular browser
|
67
|
+
@function supported(
|
68
|
+
$prefix,
|
69
|
+
$support-list
|
70
|
+
) {
|
71
|
+
$keys: moz, webkit, o, ms, khtml, official;
|
72
|
+
$index: index($keys, $prefix);
|
73
|
+
|
74
|
+
@if $index {
|
75
|
+
@if $index == 6 and length($support-list) == 5 {
|
76
|
+
@return official;
|
77
|
+
} @else {
|
78
|
+
@return nth($support-list, $index);
|
79
|
+
}
|
80
|
+
} @else {
|
81
|
+
@warn 'Please pass a valid browser for $prefix: moz, webkit, o, ms, khtml, or official.';
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
85
|
+
// A debug tool for checking browser support
|
86
|
+
@mixin debug-support-matrix($experimental: true, $ie: true) {
|
87
|
+
@debug #{'$moz-'}$experimental-support-for-mozilla
|
88
|
+
#{'$webkit-'}$experimental-support-for-webkit
|
89
|
+
#{'$opera-'}$experimental-support-for-opera
|
90
|
+
#{'$microsoft-'}$experimental-support-for-microsoft
|
91
|
+
#{'$khtml-'}$experimental-support-for-khtml;
|
92
|
+
@debug #{'$ie6-'}$legacy-support-for-ie6
|
93
|
+
#{'$ie7-'}$legacy-support-for-ie7
|
94
|
+
#{'$ie8-'}$legacy-support-for-ie8;
|
95
|
+
}
|
96
|
+
|
97
|
+
// Capture the current exerimental support settings
|
98
|
+
@function capture-experimental-matrix() {
|
99
|
+
@return $experimental-support-for-mozilla
|
100
|
+
$experimental-support-for-webkit
|
101
|
+
$experimental-support-for-opera
|
102
|
+
$experimental-support-for-microsoft
|
103
|
+
$experimental-support-for-khtml;
|
104
|
+
}
|
105
|
+
|
106
|
+
// Capture the current legacy-ie support settings
|
107
|
+
@function capture-legacy-ie-matrix() {
|
108
|
+
@return $legacy-support-for-ie6
|
109
|
+
$legacy-support-for-ie7
|
110
|
+
$legacy-support-for-ie8;
|
111
|
+
}
|
112
|
+
|
113
|
+
// Capture and store support
|
114
|
+
$experimental-matrix: capture-experimental-matrix();
|
115
|
+
$legacy-ie-matrix: capture-legacy-ie-matrix();
|
116
|
+
|
117
|
+
@mixin capture-experimental-matrix {
|
118
|
+
$experimental-matrix: capture-experimental-matrix();
|
119
|
+
}
|
120
|
+
|
121
|
+
@mixin capture-legacy-ie-matrix {
|
122
|
+
$legacy-ie-matrix: capture-legacy-ie-matrix();
|
123
|
+
}
|
124
|
+
|
125
|
+
@mixin capture-support-matrix {
|
126
|
+
@include capture-experimental-matrix;
|
127
|
+
@include capture-legacy-ie-matrix;
|
128
|
+
}
|
129
|
+
|
130
|
+
// Change the experimental-support settings in specific contexts.
|
131
|
+
@mixin set-experimental-support(
|
132
|
+
$moz : false,
|
133
|
+
$webkit : false,
|
134
|
+
$o : false,
|
135
|
+
$ms : false,
|
136
|
+
$khtml : false
|
137
|
+
) {
|
138
|
+
$experimental-support-for-mozilla : $moz;
|
139
|
+
$experimental-support-for-webkit : $webkit;
|
140
|
+
$experimental-support-for-opera : $o;
|
141
|
+
$experimental-support-for-microsoft : $ms;
|
142
|
+
$experimental-support-for-khtml : $khtml;
|
143
|
+
}
|
144
|
+
|
145
|
+
@mixin capture-and-set-experimental(
|
146
|
+
$moz : false,
|
147
|
+
$webkit : false,
|
148
|
+
$o : false,
|
149
|
+
$ms : false,
|
150
|
+
$khtml : false
|
151
|
+
) {
|
152
|
+
@include capture-experimental-matrix;
|
153
|
+
@include set-experimental-support($moz, $webkit, $o, $ms, $khtml);
|
154
|
+
}
|
155
|
+
|
156
|
+
@mixin capture-and-adjust-experimental(
|
157
|
+
$moz : $experimental-support-for-mozilla,
|
158
|
+
$webkit : $experimental-support-for-webkit,
|
159
|
+
$o : $experimental-support-for-opera,
|
160
|
+
$ms : $experimental-support-for-microsoft,
|
161
|
+
$khtml : $experimental-support-for-khtml
|
162
|
+
) {
|
163
|
+
@include capture-experimental-matrix;
|
164
|
+
@include set-experimental-support($moz, $webkit, $o, $ms, $khtml);
|
165
|
+
}
|
166
|
+
|
167
|
+
// Change the legacy-support-for-ie* settings in specific contexts.
|
168
|
+
@mixin set-legacy-ie-support(
|
169
|
+
$ie6: false,
|
170
|
+
$ie7: false,
|
171
|
+
$ie8: false
|
172
|
+
) {
|
173
|
+
$legacy-support-for-ie6: $ie6;
|
174
|
+
$legacy-support-for-ie7: $ie7;
|
175
|
+
$legacy-support-for-ie8: $ie8;
|
176
|
+
}
|
177
|
+
|
178
|
+
@mixin capture-and-set-legacy-ie(
|
179
|
+
$ie6: false,
|
180
|
+
$ie7: false,
|
181
|
+
$ie8: false
|
182
|
+
) {
|
183
|
+
@include capture-legacy-ie-matrix;
|
184
|
+
@include set-legacy-ie-support($ie6, $ie7, $ie8);
|
185
|
+
}
|
186
|
+
|
187
|
+
@mixin capture-and-adjust-legacy-ie(
|
188
|
+
$ie6: $legacy-support-for-ie6,
|
189
|
+
$ie7: $legacy-support-for-ie7,
|
190
|
+
$ie8: $legacy-support-for-ie8
|
191
|
+
) {
|
192
|
+
@include capture-and-set-legacy-ie($ie6, $ie7, $ie8);
|
193
|
+
}
|
194
|
+
|
195
|
+
// Capture current browser support matrix, and set a new matrix of support.
|
196
|
+
@mixin capture-and-set-support(
|
197
|
+
$moz : false,
|
198
|
+
$webkit : false,
|
199
|
+
$o : false,
|
200
|
+
$ms : false,
|
201
|
+
$khtml : false,
|
202
|
+
$ie6 : false,
|
203
|
+
$ie7 : false,
|
204
|
+
$ie8 : false
|
205
|
+
) {
|
206
|
+
// Capture the current state
|
207
|
+
@include capture-support-matrix;
|
208
|
+
|
209
|
+
// Change support settings
|
210
|
+
@include set-experimental-support($moz, $webkit, $o, $ms, $khtml);
|
211
|
+
@include set-legacy-ie-support($ie6, $ie7, $ie8);
|
212
|
+
}
|
213
|
+
|
214
|
+
// Capture current browser support matrix, and set a new matrix of support.
|
215
|
+
@mixin capture-and-adjust-support(
|
216
|
+
$moz : $experimental-support-for-mozilla,
|
217
|
+
$webkit : $experimental-support-for-webkit,
|
218
|
+
$o : $experimental-support-for-opera,
|
219
|
+
$ms : $experimental-support-for-microsoft,
|
220
|
+
$khtml : $experimental-support-for-khtml,
|
221
|
+
$ie6 : $legacy-support-for-ie6,
|
222
|
+
$ie7 : $legacy-support-for-ie7,
|
223
|
+
$ie8 : $legacy-support-for-ie8
|
224
|
+
) {
|
225
|
+
@include capture-and-set-support($moz, $webkit, $o, $ms, $khtml, $ie6, $ie7, $ie8);
|
226
|
+
}
|
227
|
+
|
228
|
+
|
229
|
+
// This mixin allows you to change the experimental support settings for
|
230
|
+
// child (@content) styles.
|
231
|
+
@mixin with-only-support-for(
|
232
|
+
$moz : false,
|
233
|
+
$webkit : false,
|
234
|
+
$o : false,
|
235
|
+
$ms : false,
|
236
|
+
$khtml : false,
|
237
|
+
$ie6 : false,
|
238
|
+
$ie7 : false,
|
239
|
+
$ie8 : false
|
240
|
+
) {
|
241
|
+
// Capture current state
|
242
|
+
$wo-experimental-matrix : capture-experimental-matrix();
|
243
|
+
$wo-legacy-ie-matrix : capture-legacy-ie-matrix();
|
244
|
+
|
245
|
+
// Set new states
|
246
|
+
@include set-experimental-support($moz, $webkit, $o, $ms, $khtml);
|
247
|
+
@include set-legacy-ie-support($ie6, $ie7, $ie8);
|
248
|
+
|
249
|
+
// Apply styles
|
250
|
+
@content;
|
251
|
+
|
252
|
+
// Return to original support settings
|
253
|
+
@include set-experimental-support($wo-experimental-matrix...);
|
254
|
+
@include set-legacy-ie-support($wo-legacy-ie-matrix...);
|
255
|
+
}
|
256
|
+
|
257
|
+
// This mixin is a shortcut for making slight adjustments to browser support
|
258
|
+
// for child (@content) styles
|
259
|
+
@mixin adjust-support-for(
|
260
|
+
$moz : $experimental-support-for-mozilla,
|
261
|
+
$webkit : $experimental-support-for-webkit,
|
262
|
+
$o : $experimental-support-for-opera,
|
263
|
+
$ms : $experimental-support-for-microsoft,
|
264
|
+
$khtml : $experimental-support-for-khtml,
|
265
|
+
$ie6 : $legacy-support-for-ie6,
|
266
|
+
$ie7 : $legacy-support-for-ie7,
|
267
|
+
$ie8 : $legacy-support-for-ie8
|
268
|
+
) {
|
269
|
+
@include with-only-support-for($moz, $webkit, $o, $ms, $khtml, $ie6, $ie7, $ie8) {
|
270
|
+
@content;
|
271
|
+
}
|
272
|
+
}
|