para 0.10.0 → 0.11.1
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/app/assets/javascripts/para/inputs/nested_many.coffee +9 -3
- data/app/assets/stylesheets/para/admin/src/_alert.sass +1 -1
- data/app/assets/stylesheets/para/admin/src/_base.sass +1 -1
- data/app/assets/stylesheets/para/admin/src/_breadcrumb.sass +1 -1
- data/app/assets/stylesheets/para/admin/src/_common.sass +53 -54
- data/app/assets/stylesheets/para/admin/src/_dropdown.sass +1 -1
- data/app/assets/stylesheets/para/admin/src/_form.sass +17 -15
- data/app/assets/stylesheets/para/admin/src/_list.sass +8 -6
- data/app/assets/stylesheets/para/admin/src/_mixins.sass +13 -13
- data/app/assets/stylesheets/para/admin/src/_multi-select.sass +2 -2
- data/app/assets/stylesheets/para/admin/src/_navigation.sass +4 -6
- data/app/assets/stylesheets/para/admin/src/_navtabs.sass +2 -2
- data/app/assets/stylesheets/para/admin/src/_nested-many.sass +3 -3
- data/app/assets/stylesheets/para/admin/src/_orderable.sass +2 -2
- data/app/assets/stylesheets/para/admin/src/_pagination.sass +5 -5
- data/app/assets/stylesheets/para/admin/src/_panel.sass +1 -1
- data/app/assets/stylesheets/para/admin/src/_statcard.sass +1 -1
- data/app/assets/stylesheets/para/admin/src/_table.sass +1 -1
- data/app/assets/stylesheets/para/admin/src/_tree.sass +1 -1
- data/app/assets/stylesheets/para/admin/src/_variables.sass +1 -10
- data/app/assets/stylesheets/para/admin/src/_well.sass +2 -2
- data/app/assets/stylesheets/para/lib/compass/_support.scss +447 -0
- data/app/assets/stylesheets/para/lib/compass/css3/_box-shadow.scss +88 -0
- data/app/assets/stylesheets/para/lib/compass/css3/_images.scss +152 -0
- data/app/assets/stylesheets/para/lib/compass/css3/_inline-block.scss +31 -0
- data/app/assets/stylesheets/para/lib/compass/css3/_text-shadow.scss +82 -0
- data/app/assets/stylesheets/para/lib/compass/css3/_transform.scss +590 -0
- data/app/assets/stylesheets/para/lib/compass/css3/_transition.scss +190 -0
- data/app/assets/stylesheets/para/lib/compass/css3/_user-interface.scss +71 -0
- data/app/assets/stylesheets/para/lib/compass/utilities/general/_hacks.scss +65 -0
- data/app/assets/stylesheets/para/lib/datetimepicker.sass +1 -1
- data/app/assets/stylesheets/para/lib/fuelux.sass +2 -2
- data/app/assets/stylesheets/para/lib/redactor.sass +5 -5
- data/app/assets/stylesheets/para/lib/selectize.sass +6 -7
- data/lib/para/version.rb +1 -1
- data/lib/para.rb +0 -2
- metadata +99 -104
@@ -6,16 +6,7 @@
|
|
6
6
|
//
|
7
7
|
//##
|
8
8
|
|
9
|
-
@import para/admin/src/bootstrap-variables
|
10
|
-
|
11
|
-
@import compass/css3/border-radius
|
12
|
-
@import compass/css3/box-shadow
|
13
|
-
@import compass/css3/inline-block
|
14
|
-
@import compass/css3/transform
|
15
|
-
@import compass/css3/transition
|
16
|
-
@import compass/css3/text-shadow
|
17
|
-
@import compass/css3/user-interface
|
18
|
-
@import compass/css3/images
|
9
|
+
@import "para/admin/src/bootstrap-variables"
|
19
10
|
|
20
11
|
//== Specific variables
|
21
12
|
//
|
@@ -0,0 +1,447 @@
|
|
1
|
+
// Map of compass extensions that are loaded. The value will either be
|
2
|
+
// the version of the extension or `true` if the version is unknown.
|
3
|
+
// $compass-extensions: compass-extensions() !default;
|
4
|
+
|
5
|
+
// The list of browsers you want to support.
|
6
|
+
// Defaults to all.
|
7
|
+
$supported-browsers: browsers() !default;
|
8
|
+
|
9
|
+
// The browser usage threshold for features that gracefully degrade
|
10
|
+
// Defaults to 1 user in 1,000.
|
11
|
+
$graceful-usage-threshold: 0.1 !default;
|
12
|
+
|
13
|
+
// The browser usage threshold for features that cannot degrade gracefully
|
14
|
+
// Defaults to 1 user in 10,000.
|
15
|
+
$critical-usage-threshold: 0.01 !default;
|
16
|
+
|
17
|
+
// Set this to true to generate comments that will explain why a prefix was included or omitted.
|
18
|
+
$debug-browser-support: false !default;
|
19
|
+
|
20
|
+
// Minimum browser versions that must be supported.
|
21
|
+
// The keys of this map are any valid browser according to `browsers()`.
|
22
|
+
// The values of this map are the min version that is valid for that browser
|
23
|
+
// according to `browser-versions($browser)`
|
24
|
+
$browser-minimum-versions: (
|
25
|
+
'chrome': null,
|
26
|
+
'firefox': null,
|
27
|
+
'ie': null,
|
28
|
+
'safari': null,
|
29
|
+
'opera': null
|
30
|
+
) !default;
|
31
|
+
|
32
|
+
|
33
|
+
// @private
|
34
|
+
$default-capability-options: (
|
35
|
+
full-support: true,
|
36
|
+
partial-support: true
|
37
|
+
);
|
38
|
+
|
39
|
+
// When a prefix in in context, but there is no current prefix
|
40
|
+
// That context is recorded here so other prefixes can be avoided.
|
41
|
+
$prefix-context: null;
|
42
|
+
|
43
|
+
// When a prefix is in a selector or directive scope, this is set to the
|
44
|
+
// current prefix value. When `null`, either there is no prefix in scope
|
45
|
+
// or the official prefix is being rendered. The `$prefix-context`
|
46
|
+
// variable can be used to make that distinction.
|
47
|
+
$current-prefix: null;
|
48
|
+
|
49
|
+
// When in a context that only exists in a particular version
|
50
|
+
// this variable is set to those versions.
|
51
|
+
$current-browser-versions: ();
|
52
|
+
|
53
|
+
// The legacy support CSS 2.1 Selectors.
|
54
|
+
// Defaults to the $critical-usage-threshold.
|
55
|
+
$css-sel2-support-threshold: $critical-usage-threshold !default;
|
56
|
+
|
57
|
+
// Check if the browser is in scope given the browser support and current prefix minimums.
|
58
|
+
@function browser-out-of-scope($browser, $version: null) {
|
59
|
+
@if not index($supported-browsers, $browser) {
|
60
|
+
@if $debug-browser-support {
|
61
|
+
@return "#{$browser} is not listed as a supported browser."
|
62
|
+
} @else {
|
63
|
+
@return true;
|
64
|
+
}
|
65
|
+
} @else if not ($current-prefix == null or $current-prefix == browser-prefix($browser)) {
|
66
|
+
@if $debug-browser-support {
|
67
|
+
@return "#{$browser} #{$version} is incompatible with #{$current-prefix}."
|
68
|
+
} @else {
|
69
|
+
@return true;
|
70
|
+
}
|
71
|
+
}
|
72
|
+
$current-range: map-get($current-browser-versions, $browser);
|
73
|
+
$current-min: if($current-range, nth($current-range, 1), null);
|
74
|
+
$current-max: if($current-range, nth($current-range, 2), null);
|
75
|
+
@if not ($version and $current-max) {
|
76
|
+
// We don't have any versions to compare
|
77
|
+
@return false;
|
78
|
+
} @else {
|
79
|
+
// If the version is less than the current min, it is not supported
|
80
|
+
$too-old: compare-browser-versions($browser, $version, $current-min) < 0;
|
81
|
+
$too-new: compare-browser-versions($browser, $version, $current-max) > 0;
|
82
|
+
@if $too-old or $too-new {
|
83
|
+
@if $debug-browser-support {
|
84
|
+
@return "The current scope only works with #{display-browser-range($browser, $current-min, $current-max)}.";
|
85
|
+
} @else {
|
86
|
+
@return true;
|
87
|
+
}
|
88
|
+
} @else {
|
89
|
+
@return false;
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}
|
93
|
+
|
94
|
+
// Check whether the browser is supported according to the supported browsers,
|
95
|
+
// declared minimum support and usage thresholds.
|
96
|
+
@function support-legacy-browser($browser, $min-version, $max-version: null, $threshold: $critical-usage-threshold) {
|
97
|
+
@if not index($supported-browsers, $browser) {
|
98
|
+
@return false;
|
99
|
+
}
|
100
|
+
// Check agaist usage stats and declared minimums
|
101
|
+
$min-required-version: map-get($browser-minimum-versions, $browser);
|
102
|
+
$usage: if($max-version,
|
103
|
+
omitted-usage($browser, $min-version, $max-version),
|
104
|
+
omitted-usage($browser, $min-version));
|
105
|
+
@return $usage > $threshold or
|
106
|
+
($min-required-version and
|
107
|
+
compare-browser-versions($browser, $max-version or $min-version, $min-required-version) >= 0);
|
108
|
+
}
|
109
|
+
|
110
|
+
// Include content for a legacy browser
|
111
|
+
// Version can be a single version string or a list of versions ordered from oldest to newest.
|
112
|
+
@mixin for-legacy-browser($browser, $min-version, $max-version: $min-version,
|
113
|
+
$threshold: $critical-usage-threshold,
|
114
|
+
$ranges: ($browser: $min-version $max-version)) {
|
115
|
+
@if not browser-out-of-scope($browser, $max-version) and
|
116
|
+
support-legacy-browser($browser, $min-version, $max-version, $threshold)
|
117
|
+
{
|
118
|
+
@if $debug-browser-support {
|
119
|
+
/* Content for #{display-browser-range($browser, $min-version, $max-version)}.
|
120
|
+
Min version: #{map-get($browser-minimum-versions, $browser) or unspecified}.
|
121
|
+
User threshold to keep: #{$threshold}%. If #{display-browser-range($browser, $min-version, $max-version)} are omitted: #{omitted-usage($browser, $min-version, $max-version)}%. */
|
122
|
+
}
|
123
|
+
@include with-browser-ranges(intersect-browser-ranges($current-browser-versions, $ranges)) {
|
124
|
+
@content;
|
125
|
+
}
|
126
|
+
} @else if $debug-browser-support and browser-out-of-scope($browser, $max-version) {
|
127
|
+
/* Content for #{display-browser-range($browser, $min-version, $max-version)} omitted.
|
128
|
+
Not allowed in the current scope: #{browser-out-of-scope($browser, $max-version)} */
|
129
|
+
} @else if $debug-browser-support and not
|
130
|
+
support-legacy-browser($browser, $min-version, $max-version, $threshold) {
|
131
|
+
@if omitted-usage($browser, $min-version, $max-version) > $threshold {
|
132
|
+
/* Content for #{display-browser-range($browser, $min-version, $max-version)} omitted.
|
133
|
+
User threshold to keep: #{$threshold}%. If #{display-browser-range($browser, $min-version, $max-version)} and below are omitted: #{omitted-usage($browser, $min-version, $max-version)}%. */
|
134
|
+
} @else {
|
135
|
+
/* Content for #{display-browser-range($browser, $min-version, $max-version)} omitted.
|
136
|
+
Minimum support is #{map-get($browser-minimum-versions, $browser)}. */
|
137
|
+
}
|
138
|
+
}
|
139
|
+
}
|
140
|
+
|
141
|
+
@function display-browser-range($browser, $min-version, $max-version: $min-version) {
|
142
|
+
@return "#{unquote($browser)} #{unquote($min-version)}#{if($max-version != $min-version, unquote(' -') unquote($max-version), null)}";
|
143
|
+
}
|
144
|
+
|
145
|
+
|
146
|
+
// Renders the content once if any of the legacy browsers are supported.
|
147
|
+
// $browsers is a map of browser name to version ranges
|
148
|
+
@mixin for-legacy-browsers($browsers, $threshold: $critical-usage-threshold) {
|
149
|
+
$rendered: false;
|
150
|
+
@each $browser, $range in $browsers {
|
151
|
+
@if not $rendered {
|
152
|
+
@include for-legacy-browser($browser, $range..., $threshold: $threshold, $ranges: $browsers) {
|
153
|
+
$rendered: true;
|
154
|
+
@content;
|
155
|
+
}
|
156
|
+
}
|
157
|
+
}
|
158
|
+
}
|
159
|
+
|
160
|
+
// If there's a prefix context in scope, this will only output the content if the prefix matches.
|
161
|
+
// Otherwise, sets the current prefix scope and outputs the content.
|
162
|
+
@mixin with-prefix($prefix) {
|
163
|
+
@if $current-prefix or $prefix-context {
|
164
|
+
@if $current-prefix == $prefix or $prefix-context == $prefix {
|
165
|
+
@if $debug-browser-support {
|
166
|
+
@if $prefix {
|
167
|
+
/* content for #{$prefix} because #{$current-prefix or $prefix-context} is already in scope. */
|
168
|
+
} @else {
|
169
|
+
/* unprefixed content. #{$current-prefix or $prefix-context} is already in scope. */
|
170
|
+
}
|
171
|
+
}
|
172
|
+
$old-prefix-context: $prefix-context;
|
173
|
+
$old-prefix: $current-prefix;
|
174
|
+
$prefix-context: $prefix-context or $current-prefix !global;
|
175
|
+
$current-prefix: $prefix !global;
|
176
|
+
@content;
|
177
|
+
$prefix-context: $old-prefix-context !global;
|
178
|
+
$current-prefix: $old-prefix !global;
|
179
|
+
} @else if $prefix == null {
|
180
|
+
$old-prefix-context: $prefix-context;
|
181
|
+
$prefix-context: $prefix-context or $current-prefix !global;
|
182
|
+
$current-prefix: null !global;
|
183
|
+
@if $debug-browser-support {
|
184
|
+
/* Content for official syntax. Prefix context is still #{$prefix-context}. */
|
185
|
+
}
|
186
|
+
@content;
|
187
|
+
$current-prefix: $prefix-context !global;
|
188
|
+
$prefix-context: $old-prefix-context !global;
|
189
|
+
} @else if $debug-browser-support {
|
190
|
+
/* Omitting content for #{$prefix} because #{$current-prefix} is already in scope. */
|
191
|
+
}
|
192
|
+
} @else {
|
193
|
+
@if $debug-browser-support and $prefix {
|
194
|
+
/* Creating new #{$prefix} context. */
|
195
|
+
}
|
196
|
+
$prefix-context: $prefix !global;
|
197
|
+
$current-prefix: $prefix !global;
|
198
|
+
@content;
|
199
|
+
$current-prefix: null !global;
|
200
|
+
$prefix-context: null !global;
|
201
|
+
}
|
202
|
+
}
|
203
|
+
|
204
|
+
@function prefixes-for-capability($capability, $threshold, $capability-options: $default-capability-options) {
|
205
|
+
$result: ();
|
206
|
+
@each $prefix in browser-prefixes($supported-browsers) {
|
207
|
+
$result: map-merge($result,
|
208
|
+
($prefix: use-prefix($prefix, $capability, $threshold, $capability-options)));
|
209
|
+
}
|
210
|
+
@return $result;
|
211
|
+
}
|
212
|
+
|
213
|
+
// Yields to the mixin content once for each prefix required.
|
214
|
+
// The current prefix is set to the $current-prefix global for use by the included content.
|
215
|
+
// Also yields to the content once with $current-prefix set to null for the official version
|
216
|
+
// as long as there's not already a prefix in scope.
|
217
|
+
@mixin with-each-prefix($capability, $threshold, $capability-options: $default-capability-options) {
|
218
|
+
@each $prefix, $should-use-prefix in prefixes-for-capability($capability, $threshold, $capability-options) {
|
219
|
+
@if $should-use-prefix {
|
220
|
+
@if $debug-browser-support and type-of($should-use-prefix) == list {
|
221
|
+
/* Capability #{$capability} is prefixed with #{$prefix} because #{$should-use-prefix} is required. */
|
222
|
+
} @else if $debug-browser-support and type-of($should-use-prefix) == number {
|
223
|
+
/* Capability #{$capability} is prefixed with #{$prefix} because #{$should-use-prefix}% of users need it which is more than the threshold of #{$threshold}%. */
|
224
|
+
}
|
225
|
+
@include with-prefix($prefix) {
|
226
|
+
@include with-browser-ranges($capability) {
|
227
|
+
@content;
|
228
|
+
}
|
229
|
+
}
|
230
|
+
} @else if $debug-browser-support {
|
231
|
+
/* Capability #{$capability} is not prefixed with #{$prefix} because #{prefix-usage($prefix, $capability, $capability-options)}% of users are affected which is less than the threshold of #{$threshold}. */
|
232
|
+
}
|
233
|
+
}
|
234
|
+
@include with-prefix(null) {
|
235
|
+
@include with-browser-ranges($capability) {
|
236
|
+
@content;
|
237
|
+
}
|
238
|
+
}
|
239
|
+
}
|
240
|
+
|
241
|
+
// Returns true if at least one browser-version pair in $subset-ranges
|
242
|
+
// is a higher (or same) version than the browser-version pairs in
|
243
|
+
// $ranges.
|
244
|
+
@function has-browser-subset($ranges, $subset-ranges) {
|
245
|
+
$found-mismatch: false;
|
246
|
+
@each $browser, $subset-range in $subset-ranges {
|
247
|
+
$range: map-get($ranges, $browser);
|
248
|
+
@if $range {
|
249
|
+
$min-1: nth($subset-range, 1);
|
250
|
+
$max-1: nth($subset-range, 2);
|
251
|
+
$min-2: nth($range, 1);
|
252
|
+
$max-2: nth($range, 2);
|
253
|
+
@if (compare-browser-versions($browser, $min-2, $min-1) <= 0 and
|
254
|
+
compare-browser-versions($browser, $min-1, $max-2) <= 0) or
|
255
|
+
(compare-browser-versions($browser, $min-2, $max-1) <= 0 and
|
256
|
+
compare-browser-versions($browser, $max-1, $max-2) <= 0) or
|
257
|
+
(compare-browser-versions($browser, $min-1, $min-2) <= 0 and
|
258
|
+
compare-browser-versions($browser, $max-1, $max-2) >= 0) or
|
259
|
+
(compare-browser-versions($browser, $min-1, $min-2) >= 0 and
|
260
|
+
compare-browser-versions($browser, $max-1, $max-2) <= 0) {
|
261
|
+
@return true;
|
262
|
+
} @else {
|
263
|
+
$found-mismatch: true
|
264
|
+
}
|
265
|
+
}
|
266
|
+
}
|
267
|
+
@return not $found-mismatch;
|
268
|
+
}
|
269
|
+
|
270
|
+
// When the same browser is in both maps, then the minimum will be set
|
271
|
+
// to the maximum of the two minimum versions, and the maximum will be
|
272
|
+
// set to the minmum of the two maximum versions.
|
273
|
+
@function intersect-browser-ranges($ranges, $new-ranges) {
|
274
|
+
@each $browser, $new-range in $new-ranges {
|
275
|
+
$old-range: map-get($ranges, $browser);
|
276
|
+
@if $old-range {
|
277
|
+
$old-min: nth($old-range, 1);
|
278
|
+
$old-max: if(length($old-range) == 1, $old-min, nth($old-range, 2));
|
279
|
+
$new-min: nth($new-range, 1);
|
280
|
+
$new-max: if(length($new-range) == 1, $new-min, nth($new-range, 2));
|
281
|
+
$maximin: if(compare-browser-versions($browser, $old-min, $new-min) > 0,
|
282
|
+
$old-min, $new-min);
|
283
|
+
$minimax: if(compare-browser-versions($browser, $old-max, $new-max) < 0,
|
284
|
+
$old-max, $new-max);
|
285
|
+
$ranges: map-merge($ranges, ($browser: $maximin $minimax));
|
286
|
+
} @else {
|
287
|
+
$ranges: map-merge($ranges, ($browser: $new-range));
|
288
|
+
}
|
289
|
+
}
|
290
|
+
@return $ranges;
|
291
|
+
}
|
292
|
+
|
293
|
+
// If passed a map, that will be the new browser ranges.
|
294
|
+
// Otherwise a range map will be created based on the given capability and prefix
|
295
|
+
// using the `browser-ranges($capability, $prefix)` function.
|
296
|
+
//
|
297
|
+
// If there are current ranges in scope and the new ranges have some overlap
|
298
|
+
// with the current,
|
299
|
+
//
|
300
|
+
// If there is no overlap, then the content will not be rendered.
|
301
|
+
@mixin with-browser-ranges($capability, $prefix: $current-prefix) {
|
302
|
+
$new-ranges: null;
|
303
|
+
@if type-of($capability) == map {
|
304
|
+
$new-ranges: $capability;
|
305
|
+
} @else {
|
306
|
+
$new-ranges: browser-ranges($capability, $prefix);
|
307
|
+
}
|
308
|
+
|
309
|
+
@if has-browser-subset($current-browser-versions, $new-ranges) {
|
310
|
+
$old-ranges: $current-browser-versions;
|
311
|
+
$current-browser-versions: intersect-browser-ranges($old-ranges, $new-ranges) !global;
|
312
|
+
@content;
|
313
|
+
$current-browser-versions: $old-ranges !global;
|
314
|
+
} @else if $debug-browser-support {
|
315
|
+
/* Excluding content because #{inspect($new-ranges)} is not included within
|
316
|
+
#{inspect($current-browser-versions)} */
|
317
|
+
}
|
318
|
+
}
|
319
|
+
|
320
|
+
// Returns true if the prefixed usage stats for the capability exceed the threshold
|
321
|
+
// or if the minimum version for a supported browser would require a prefix for the capability.
|
322
|
+
@function use-prefix($prefix, $capability, $threshold, $capability-options: $default-capability-options) {
|
323
|
+
$usage: prefix-usage($prefix, $capability, $capability-options);
|
324
|
+
@if $usage > $threshold {
|
325
|
+
@return $usage;
|
326
|
+
} @else {
|
327
|
+
@each $browser in browsers($prefix) {
|
328
|
+
@if index($supported-browsers, $browser) {
|
329
|
+
$min-version: map-get($browser-minimum-versions, $browser);
|
330
|
+
@if $min-version {
|
331
|
+
$actual-prefix: browser-requires-prefix($browser, $min-version, $capability, $capability-options);
|
332
|
+
@if $actual-prefix and $prefix == $actual-prefix {
|
333
|
+
@return $browser $min-version;
|
334
|
+
}
|
335
|
+
}
|
336
|
+
}
|
337
|
+
}
|
338
|
+
}
|
339
|
+
@return false;
|
340
|
+
}
|
341
|
+
|
342
|
+
@function prefix-identifier($ident, $prefix: $current-prefix) {
|
343
|
+
@return unquote("#{$prefix}#{if($prefix, '-', null)}#{$ident}");
|
344
|
+
}
|
345
|
+
|
346
|
+
// Output a property and value using the current prefix.
|
347
|
+
// It will be unprefixed if $current-prefix is null.
|
348
|
+
@mixin prefix-prop($property, $value, $prefix: $current-prefix) {
|
349
|
+
#{prefix-identifier($property, $prefix)}: $value;
|
350
|
+
}
|
351
|
+
|
352
|
+
// Emit a set of properties with the prefix governed by the capability and usage threshold given.
|
353
|
+
//
|
354
|
+
// Example:
|
355
|
+
//
|
356
|
+
// @include prefixed-properties(css-animation, $animation-support-threshold,
|
357
|
+
// (animation-name: foo, animation-duration: 2s)
|
358
|
+
// );
|
359
|
+
@mixin prefixed-properties($capability, $threshold, $properties, $capability-options: $default-capability-options) {
|
360
|
+
@include with-each-prefix($capability, $threshold, $capability-options) {
|
361
|
+
@each $prop, $value in $properties {
|
362
|
+
@include prefix-prop($prop, $value);
|
363
|
+
}
|
364
|
+
}
|
365
|
+
}
|
366
|
+
|
367
|
+
|
368
|
+
// @private
|
369
|
+
@function warn-about-old-variables() {
|
370
|
+
$old-variables-in-use: ();
|
371
|
+
@each $old-variable-name in
|
372
|
+
(legacy-support-for-ie, legacy-support-for-ie6, legacy-support-for-ie7,
|
373
|
+
legacy-support-for-ie8, legacy-support-for-mozilla, legacy-support-for-webkit,
|
374
|
+
experimental-support-for-mozilla, experimental-support-for-webkit,
|
375
|
+
experimental-support-for-opera, experimental-support-for-microsoft,
|
376
|
+
experimental-support-for-khtml, experimental-support-for-svg)
|
377
|
+
{
|
378
|
+
@if global-variable-exists($old-variable-name) {
|
379
|
+
$old-variables-in-use: append($old-variables-in-use,
|
380
|
+
unquote("$#{$old-variable-name}"), comma);
|
381
|
+
}
|
382
|
+
}
|
383
|
+
@if length($old-variables-in-use) > 0 {
|
384
|
+
@warn "Compass has changed how browser support is configured. " +
|
385
|
+
"The following configuration variables " +
|
386
|
+
"are no longer supported: #{$old-variables-in-use}." +
|
387
|
+
"Details: http://compass-style.org/help/documentation/tuning-vendor-prefixes/"
|
388
|
+
}
|
389
|
+
@return $old-variables-in-use;
|
390
|
+
}
|
391
|
+
|
392
|
+
// @private
|
393
|
+
@function warn-about-pie-removal() {
|
394
|
+
@if global-variable-exists(experimental-support-for-pie) {
|
395
|
+
@warn "Compass no longer supports css3pie.";
|
396
|
+
}
|
397
|
+
@return true;
|
398
|
+
}
|
399
|
+
|
400
|
+
// Enable browser support debugging within the content block.
|
401
|
+
// Or you can enable it for the whole stylesheet by setting `$debug-browser-support` to true.
|
402
|
+
@mixin with-browser-support-debugging {
|
403
|
+
$current-status: $debug-browser-support;
|
404
|
+
$debug-browser-support: true !global;
|
405
|
+
@content;
|
406
|
+
$debug-browser-support: $current-status !global;
|
407
|
+
}
|
408
|
+
|
409
|
+
// Set a default value if the given arglist is empty
|
410
|
+
@function set-arglist-default($arglist, $default) {
|
411
|
+
$default-index: index($arglist, default);
|
412
|
+
@if $default-index {
|
413
|
+
$arglist: set-nth($arglist, $default-index, $default)
|
414
|
+
}
|
415
|
+
@return if(length($arglist) > 0, $arglist, $default);
|
416
|
+
}
|
417
|
+
|
418
|
+
|
419
|
+
// @private
|
420
|
+
$old-variable-warnings-issued: warn-about-old-variables() !default;
|
421
|
+
|
422
|
+
// @private
|
423
|
+
$pie-removal-warning-issued: warn-about-pie-removal() !default;
|
424
|
+
|
425
|
+
// @private
|
426
|
+
@function warn-about-useless-prefix-arguments($moz: null, $webkit: null, $o: null, $khtml: null, $official: null) {
|
427
|
+
@if $moz != null or $webkit != null or $o != null or $khtml != null or $official != null {
|
428
|
+
@warn "Browser prefix arguments to this mixin are no longer used and " +
|
429
|
+
"will be removed in the next release.";
|
430
|
+
}
|
431
|
+
@return true;
|
432
|
+
}
|
433
|
+
|
434
|
+
// coerce a list to be comma delimited or make a new, empty comma delimited list.
|
435
|
+
@function comma-list($list: ()) {
|
436
|
+
@return join((), $list, comma);
|
437
|
+
}
|
438
|
+
|
439
|
+
// @private Returns the legacy value for a given box-model
|
440
|
+
// - Used by background-clip and -origin.
|
441
|
+
@function legacy-box($box) {
|
442
|
+
$box: unquote($box);
|
443
|
+
@if $box == padding-box { $box: padding; }
|
444
|
+
@if $box == border-box { $box: border; }
|
445
|
+
@if $box == content-box { $box: content; }
|
446
|
+
@return $box;
|
447
|
+
}
|
@@ -0,0 +1,88 @@
|
|
1
|
+
// Box Shadow
|
2
|
+
|
3
|
+
@import "para/lib/compass/support";
|
4
|
+
|
5
|
+
// The prefixed support threshold for box-shadow.
|
6
|
+
// Defaults to the $graceful-usage-threshold.
|
7
|
+
$box-shadow-support-threshold: $graceful-usage-threshold !default;
|
8
|
+
|
9
|
+
|
10
|
+
// The default color for box shadows
|
11
|
+
$default-box-shadow-color: #333333 !default;
|
12
|
+
|
13
|
+
// The default horizontal offset. Positive is to the right.
|
14
|
+
$default-box-shadow-h-offset: 0px !default;
|
15
|
+
|
16
|
+
// The default vertical offset. Positive is down.
|
17
|
+
$default-box-shadow-v-offset: 0px !default;
|
18
|
+
|
19
|
+
// The default blur length.
|
20
|
+
$default-box-shadow-blur: 5px !default;
|
21
|
+
|
22
|
+
// The default spread length.
|
23
|
+
$default-box-shadow-spread: null !default;
|
24
|
+
|
25
|
+
// The default shadow inset: inset or null (for standard shadow).
|
26
|
+
$default-box-shadow-inset: null !default;
|
27
|
+
|
28
|
+
@function default-box-shadow() {
|
29
|
+
@return compact(if($default-box-shadow-inset, inset, null)
|
30
|
+
$default-box-shadow-h-offset
|
31
|
+
$default-box-shadow-v-offset
|
32
|
+
$default-box-shadow-blur
|
33
|
+
$default-box-shadow-spread
|
34
|
+
$default-box-shadow-color);
|
35
|
+
}
|
36
|
+
|
37
|
+
// Provides cross-browser for Webkit, Gecko, and CSS3 box shadows
|
38
|
+
// when one or more box shadows are needed.
|
39
|
+
// Each shadow argument should adhere to the standard css3 syntax
|
40
|
+
// for the box-shadow property.
|
41
|
+
@mixin box-shadow($shadow...) {
|
42
|
+
$shadow: set-arglist-default($shadow, default-box-shadow());
|
43
|
+
@include prefixed-properties(css-boxshadow, $box-shadow-support-threshold, (box-shadow: $shadow));
|
44
|
+
}
|
45
|
+
|
46
|
+
// Provides a single cross-browser CSS box shadow for Webkit, Gecko, and CSS3.
|
47
|
+
// Includes default arguments for color, horizontal offset, vertical offset, blur length, spread length, and inset.
|
48
|
+
@mixin single-box-shadow(
|
49
|
+
$hoff : null,
|
50
|
+
$voff : null,
|
51
|
+
$blur : null,
|
52
|
+
$spread : null,
|
53
|
+
$color : null,
|
54
|
+
$inset : $default-box-shadow-inset
|
55
|
+
) {
|
56
|
+
// Handle legacy argument order
|
57
|
+
@if not ($hoff == none or $hoff == null) and type-of($hoff) != number {
|
58
|
+
@warn "The $color argument for single-box-shadow is now the 5th argument instead of the 1st.";
|
59
|
+
$tmp-color: $color;
|
60
|
+
$color: $hoff;
|
61
|
+
$hoff: $voff;
|
62
|
+
$voff: $blur;
|
63
|
+
$blur: $spread;
|
64
|
+
$spread: $tmp-color
|
65
|
+
}
|
66
|
+
|
67
|
+
// Need to set these defaults here instead of the arglist to support the above backwards compat handling
|
68
|
+
@if $hoff == null { $hoff: $default-box-shadow-h-offset; }
|
69
|
+
@if $voff == null { $hoff: $default-box-shadow-v-offset; }
|
70
|
+
@if $blur == null { $blur: $default-box-shadow-blur; }
|
71
|
+
@if $spread == null { $spread: $default-box-shadow-spread; }
|
72
|
+
@if $color == null { $color: $default-box-shadow-color; }
|
73
|
+
|
74
|
+
@if not ($inset == true or $inset == false or $inset == null or $inset == inset) {
|
75
|
+
@warn "$inset expected to be true or the inset keyword. Got #{$inset} instead. Using: inset";
|
76
|
+
}
|
77
|
+
|
78
|
+
@if $hoff == none {
|
79
|
+
@include box-shadow(none);
|
80
|
+
} @else {
|
81
|
+
$full : $hoff $voff;
|
82
|
+
@if $blur { $full: $full $blur; }
|
83
|
+
@if $spread { $full: $full $spread; }
|
84
|
+
@if $color { $full: $full $color; }
|
85
|
+
@if $inset { $full: inset $full; }
|
86
|
+
@include box-shadow($full);
|
87
|
+
}
|
88
|
+
}
|