comixins 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +8 -0
- data/.rubocop.yml +26 -0
- data/Gemfile +2 -0
- data/README.md +35 -0
- data/comixins.gemspec +20 -0
- data/lib/comixins/version.rb +1 -1
- data/vendor/assets/stylesheets/LICENSE.markdown +29 -0
- data/vendor/assets/stylesheets/LICENSE_backup.md +29 -0
- data/vendor/assets/stylesheets/_animate.scss +3 -0
- data/vendor/assets/stylesheets/_compass.scss +4 -0
- data/vendor/assets/stylesheets/_lemonade.scss +38 -0
- data/vendor/assets/stylesheets/animation/_animate.scss +31 -0
- data/vendor/assets/stylesheets/animation/_core.scss +127 -0
- data/vendor/assets/stylesheets/animation/_shared.scss +22 -0
- data/vendor/assets/stylesheets/animation/animate/_attention-seekers.scss +152 -0
- data/vendor/assets/stylesheets/animation/animate/_bouncing.scss +3 -0
- data/vendor/assets/stylesheets/animation/animate/_classes.scss +21 -0
- data/vendor/assets/stylesheets/animation/animate/_fading.scss +3 -0
- data/vendor/assets/stylesheets/animation/animate/_flippers.scss +87 -0
- data/vendor/assets/stylesheets/animation/animate/_lightspeed.scss +24 -0
- data/vendor/assets/stylesheets/animation/animate/_rotating.scss +3 -0
- data/vendor/assets/stylesheets/animation/animate/_specials.scss +42 -0
- data/vendor/assets/stylesheets/animation/animate/bouncing/_bouncing-entrances.scss +68 -0
- data/vendor/assets/stylesheets/animation/animate/bouncing/_bouncing-exits.scss +60 -0
- data/vendor/assets/stylesheets/animation/animate/fading/_fading-entrances.scss +86 -0
- data/vendor/assets/stylesheets/animation/animate/fading/_fading-exits.scss +86 -0
- data/vendor/assets/stylesheets/animation/animate/rotating/_rotating-entrances.scss +58 -0
- data/vendor/assets/stylesheets/animation/animate/rotating/_rotating-exits.scss +58 -0
- data/vendor/assets/stylesheets/comixins.scss +1 -0
- data/vendor/assets/stylesheets/compass/_css3.scss +22 -0
- data/vendor/assets/stylesheets/compass/_functions.scss +6 -0
- data/vendor/assets/stylesheets/compass/_layout.scss +3 -0
- data/vendor/assets/stylesheets/compass/_reset-legacy.scss +3 -0
- data/vendor/assets/stylesheets/compass/_reset.scss +3 -0
- data/vendor/assets/stylesheets/compass/_support.scss +40 -0
- data/vendor/assets/stylesheets/compass/_typography.scss +4 -0
- data/vendor/assets/stylesheets/compass/_utilities.scss +9 -0
- data/vendor/assets/stylesheets/compass/css3/_animation.scss +2 -0
- data/vendor/assets/stylesheets/compass/css3/_appearance.scss +16 -0
- data/vendor/assets/stylesheets/compass/css3/_background-clip.scss +43 -0
- data/vendor/assets/stylesheets/compass/css3/_background-origin.scss +42 -0
- data/vendor/assets/stylesheets/compass/css3/_background-size.scss +26 -0
- data/vendor/assets/stylesheets/compass/css3/_border-radius.scss +130 -0
- data/vendor/assets/stylesheets/compass/css3/_box-shadow.scss +76 -0
- data/vendor/assets/stylesheets/compass/css3/_box-sizing.scss +13 -0
- data/vendor/assets/stylesheets/compass/css3/_box.scss +111 -0
- data/vendor/assets/stylesheets/compass/css3/_columns.scss +148 -0
- data/vendor/assets/stylesheets/compass/css3/_filter.scss +23 -0
- data/vendor/assets/stylesheets/compass/css3/_flexbox.scss +86 -0
- data/vendor/assets/stylesheets/compass/css3/_font-face.scss +48 -0
- data/vendor/assets/stylesheets/compass/css3/_hyphenation.scss +77 -0
- data/vendor/assets/stylesheets/compass/css3/_images.scss +133 -0
- data/vendor/assets/stylesheets/compass/css3/_inline-block.scss +22 -0
- data/vendor/assets/stylesheets/compass/css3/_opacity.scss +19 -0
- data/vendor/assets/stylesheets/compass/css3/_pie.scss +73 -0
- data/vendor/assets/stylesheets/compass/css3/_regions.scss +22 -0
- data/vendor/assets/stylesheets/compass/css3/_shared.scss +38 -0
- data/vendor/assets/stylesheets/compass/css3/_text-shadow.scss +87 -0
- data/vendor/assets/stylesheets/compass/css3/_transform-legacy.scss +87 -0
- data/vendor/assets/stylesheets/compass/css3/_transform.scss +598 -0
- data/vendor/assets/stylesheets/compass/css3/_transition.scss +221 -0
- data/vendor/assets/stylesheets/compass/css3/_user-interface.scss +47 -0
- data/vendor/assets/stylesheets/compass/functions/_colors.scss +37 -0
- data/vendor/assets/stylesheets/compass/functions/_constants.scss +18 -0
- data/vendor/assets/stylesheets/compass/functions/_cross_browser_support.scss +72 -0
- data/vendor/assets/stylesheets/compass/functions/_display.scss +36 -0
- data/vendor/assets/stylesheets/compass/functions/_gradient_support.scss +15 -0
- data/vendor/assets/stylesheets/compass/functions/_lists.scss +90 -0
- data/vendor/assets/stylesheets/compass/layout/_grid-background.scss +178 -0
- data/vendor/assets/stylesheets/compass/layout/_sticky-footer.scss +23 -0
- data/vendor/assets/stylesheets/compass/layout/_stretching.scss +24 -0
- data/vendor/assets/stylesheets/compass/reset/_utilities-legacy.scss +135 -0
- data/vendor/assets/stylesheets/compass/reset/_utilities.scss +142 -0
- data/vendor/assets/stylesheets/compass/typography/_links.scss +3 -0
- data/vendor/assets/stylesheets/compass/typography/_lists.scss +4 -0
- data/vendor/assets/stylesheets/compass/typography/_text.scss +4 -0
- data/vendor/assets/stylesheets/compass/typography/_vertical_rhythm.scss +219 -0
- data/vendor/assets/stylesheets/compass/typography/links/_hover-link.scss +5 -0
- data/vendor/assets/stylesheets/compass/typography/links/_link-colors.scss +28 -0
- data/vendor/assets/stylesheets/compass/typography/links/_unstyled-link.scss +7 -0
- data/vendor/assets/stylesheets/compass/typography/lists/_bullets.scss +34 -0
- data/vendor/assets/stylesheets/compass/typography/lists/_horizontal-list.scss +61 -0
- data/vendor/assets/stylesheets/compass/typography/lists/_inline-block-list.scss +50 -0
- data/vendor/assets/stylesheets/compass/typography/lists/_inline-list.scss +44 -0
- data/vendor/assets/stylesheets/compass/typography/text/_ellipsis.scss +25 -0
- data/vendor/assets/stylesheets/compass/typography/text/_force-wrap.scss +12 -0
- data/vendor/assets/stylesheets/compass/typography/text/_nowrap.scss +2 -0
- data/vendor/assets/stylesheets/compass/typography/text/_replacement.scss +68 -0
- data/vendor/assets/stylesheets/compass/utilities/_color.scss +1 -0
- data/vendor/assets/stylesheets/compass/utilities/_general.scss +6 -0
- data/vendor/assets/stylesheets/compass/utilities/_links.scss +5 -0
- data/vendor/assets/stylesheets/compass/utilities/_lists.scss +6 -0
- data/vendor/assets/stylesheets/compass/utilities/_print.scss +17 -0
- data/vendor/assets/stylesheets/compass/utilities/_sprites.scss +2 -0
- data/vendor/assets/stylesheets/compass/utilities/_tables.scss +3 -0
- data/vendor/assets/stylesheets/compass/utilities/_text.scss +5 -0
- data/vendor/assets/stylesheets/compass/utilities/color/_contrast.scss +28 -0
- data/vendor/assets/stylesheets/compass/utilities/general/_clearfix.scss +44 -0
- data/vendor/assets/stylesheets/compass/utilities/general/_float.scss +30 -0
- data/vendor/assets/stylesheets/compass/utilities/general/_hacks.scss +46 -0
- data/vendor/assets/stylesheets/compass/utilities/general/_min.scss +16 -0
- data/vendor/assets/stylesheets/compass/utilities/general/_reset.scss +2 -0
- data/vendor/assets/stylesheets/compass/utilities/general/_tabs.scss +1 -0
- data/vendor/assets/stylesheets/compass/utilities/general/_tag-cloud.scss +18 -0
- data/vendor/assets/stylesheets/compass/utilities/links/_hover-link.scss +3 -0
- data/vendor/assets/stylesheets/compass/utilities/links/_link-colors.scss +3 -0
- data/vendor/assets/stylesheets/compass/utilities/links/_unstyled-link.scss +3 -0
- data/vendor/assets/stylesheets/compass/utilities/lists/_bullets.scss +3 -0
- data/vendor/assets/stylesheets/compass/utilities/lists/_horizontal-list.scss +3 -0
- data/vendor/assets/stylesheets/compass/utilities/lists/_inline-block-list.scss +3 -0
- data/vendor/assets/stylesheets/compass/utilities/lists/_inline-list.scss +3 -0
- data/vendor/assets/stylesheets/compass/utilities/sprites/_base.scss +66 -0
- data/vendor/assets/stylesheets/compass/utilities/sprites/_sprite-img.scss +79 -0
- data/vendor/assets/stylesheets/compass/utilities/tables/_alternating-rows-and-columns.scss +22 -0
- data/vendor/assets/stylesheets/compass/utilities/tables/_borders.scss +33 -0
- data/vendor/assets/stylesheets/compass/utilities/tables/_scaffolding.scss +9 -0
- data/vendor/assets/stylesheets/compass/utilities/text/_ellipsis.scss +3 -0
- data/vendor/assets/stylesheets/compass/utilities/text/_nowrap.scss +3 -0
- data/vendor/assets/stylesheets/compass/utilities/text/_replacement.scss +3 -0
- metadata +119 -1
@@ -0,0 +1,221 @@
|
|
1
|
+
@import "shared";
|
2
|
+
|
3
|
+
// CSS Transitions
|
4
|
+
// Currently only works in Webkit.
|
5
|
+
//
|
6
|
+
// * expected in CSS3, FireFox 3.6/7 and Opera Presto 2.3
|
7
|
+
// * We'll be prepared.
|
8
|
+
//
|
9
|
+
// Including this submodule sets following defaults for the mixins:
|
10
|
+
//
|
11
|
+
// $default-transition-property : all
|
12
|
+
// $default-transition-duration : 1s
|
13
|
+
// $default-transition-function : false
|
14
|
+
// $default-transition-delay : false
|
15
|
+
//
|
16
|
+
// Override them if you like. Timing-function and delay are set to false for browser defaults (ease, 0s).
|
17
|
+
|
18
|
+
$default-transition-property: all !default;
|
19
|
+
|
20
|
+
$default-transition-duration: 1s !default;
|
21
|
+
|
22
|
+
$default-transition-function: false !default;
|
23
|
+
|
24
|
+
$default-transition-delay: false !default;
|
25
|
+
|
26
|
+
$transitionable-prefixed-values: transform, transform-origin !default;
|
27
|
+
|
28
|
+
// One or more properties to transition
|
29
|
+
//
|
30
|
+
// * for multiple, use a comma-delimited list
|
31
|
+
// * also accepts "all" or "none"
|
32
|
+
|
33
|
+
@mixin transition-property($property-1: $default-transition-property,
|
34
|
+
$property-2 : false,
|
35
|
+
$property-3 : false,
|
36
|
+
$property-4 : false,
|
37
|
+
$property-5 : false,
|
38
|
+
$property-6 : false,
|
39
|
+
$property-7 : false,
|
40
|
+
$property-8 : false,
|
41
|
+
$property-9 : false,
|
42
|
+
$property-10: false
|
43
|
+
) {
|
44
|
+
@if type-of($property-1) == string { $property-1: unquote($property-1); }
|
45
|
+
$properties: compact($property-1, $property-2, $property-3, $property-4, $property-5, $property-6, $property-7, $property-8, $property-9, $property-10);
|
46
|
+
@if $experimental-support-for-webkit { -webkit-transition-property : prefixed-for-transition(-webkit, $properties); }
|
47
|
+
@if $experimental-support-for-mozilla { -moz-transition-property : prefixed-for-transition(-moz, $properties); }
|
48
|
+
@if $experimental-support-for-opera { -o-transition-property : prefixed-for-transition(-o, $properties); }
|
49
|
+
transition-property : $properties;
|
50
|
+
}
|
51
|
+
|
52
|
+
// One or more durations in seconds
|
53
|
+
//
|
54
|
+
// * for multiple, use a comma-delimited list
|
55
|
+
// * these durations will affect the properties in the same list position
|
56
|
+
|
57
|
+
@mixin transition-duration($duration-1: $default-transition-duration,
|
58
|
+
$duration-2 : false,
|
59
|
+
$duration-3 : false,
|
60
|
+
$duration-4 : false,
|
61
|
+
$duration-5 : false,
|
62
|
+
$duration-6 : false,
|
63
|
+
$duration-7 : false,
|
64
|
+
$duration-8 : false,
|
65
|
+
$duration-9 : false,
|
66
|
+
$duration-10: false
|
67
|
+
) {
|
68
|
+
@if type-of($duration-1) == string { $duration-1: unquote($duration-1); }
|
69
|
+
$durations: compact($duration-1, $duration-2, $duration-3, $duration-4, $duration-5, $duration-6, $duration-7, $duration-8, $duration-9, $duration-10);
|
70
|
+
@include experimental(transition-duration, $durations,
|
71
|
+
-moz, -webkit, -o, not(-ms), not(-khtml), official
|
72
|
+
);
|
73
|
+
}
|
74
|
+
|
75
|
+
// One or more timing functions
|
76
|
+
//
|
77
|
+
// * [ ease | linear | ease-in | ease-out | ease-in-out | cubic-bezier(x1, y1, x2, y2)]
|
78
|
+
// * For multiple, use a comma-delimited list
|
79
|
+
// * These functions will effect the properties in the same list position
|
80
|
+
|
81
|
+
@mixin transition-timing-function($function-1: $default-transition-function,
|
82
|
+
$function-2 : false,
|
83
|
+
$function-3 : false,
|
84
|
+
$function-4 : false,
|
85
|
+
$function-5 : false,
|
86
|
+
$function-6 : false,
|
87
|
+
$function-7 : false,
|
88
|
+
$function-8 : false,
|
89
|
+
$function-9 : false,
|
90
|
+
$function-10: false
|
91
|
+
) {
|
92
|
+
$function-1: unquote($function-1);
|
93
|
+
$functions: compact($function-1, $function-2, $function-3, $function-4, $function-5, $function-6, $function-7, $function-8, $function-9, $function-10);
|
94
|
+
@include experimental(transition-timing-function, $functions,
|
95
|
+
-moz, -webkit, -o, not(-ms), not(-khtml), official
|
96
|
+
);
|
97
|
+
}
|
98
|
+
|
99
|
+
// One or more transition-delays in seconds
|
100
|
+
//
|
101
|
+
// * for multiple, use a comma-delimited list
|
102
|
+
// * these delays will effect the properties in the same list position
|
103
|
+
|
104
|
+
@mixin transition-delay($delay-1: $default-transition-delay,
|
105
|
+
$delay-2 : false,
|
106
|
+
$delay-3 : false,
|
107
|
+
$delay-4 : false,
|
108
|
+
$delay-5 : false,
|
109
|
+
$delay-6 : false,
|
110
|
+
$delay-7 : false,
|
111
|
+
$delay-8 : false,
|
112
|
+
$delay-9 : false,
|
113
|
+
$delay-10: false
|
114
|
+
) {
|
115
|
+
@if type-of($delay-1) == string { $delay-1: unquote($delay-1); }
|
116
|
+
$delays: compact($delay-1, $delay-2, $delay-3, $delay-4, $delay-5, $delay-6, $delay-7, $delay-8, $delay-9, $delay-10);
|
117
|
+
@include experimental(transition-delay, $delays,
|
118
|
+
-moz, -webkit, -o, not(-ms), not(-khtml), official
|
119
|
+
);
|
120
|
+
}
|
121
|
+
|
122
|
+
// Transition all-in-one shorthand
|
123
|
+
|
124
|
+
@mixin single-transition(
|
125
|
+
$property: $default-transition-property,
|
126
|
+
$duration: $default-transition-duration,
|
127
|
+
$function: $default-transition-function,
|
128
|
+
$delay: $default-transition-delay
|
129
|
+
) {
|
130
|
+
@include transition(compact($property $duration $function $delay));
|
131
|
+
}
|
132
|
+
|
133
|
+
@mixin transition(
|
134
|
+
$transition-1 : default,
|
135
|
+
$transition-2 : false,
|
136
|
+
$transition-3 : false,
|
137
|
+
$transition-4 : false,
|
138
|
+
$transition-5 : false,
|
139
|
+
$transition-6 : false,
|
140
|
+
$transition-7 : false,
|
141
|
+
$transition-8 : false,
|
142
|
+
$transition-9 : false,
|
143
|
+
$transition-10: false
|
144
|
+
) {
|
145
|
+
@if $transition-1 == default {
|
146
|
+
$transition-1 : compact($default-transition-property $default-transition-duration $default-transition-function $default-transition-delay);
|
147
|
+
}
|
148
|
+
$transitions: false;
|
149
|
+
@if type-of($transition-1) == list and type-of(nth($transition-1,1)) == list {
|
150
|
+
$transitions: join($transition-1, compact($transition-2, $transition-3, $transition-4, $transition-5, $transition-6, $transition-7, $transition-8, $transition-9, $transition-10), comma);
|
151
|
+
} @else {
|
152
|
+
$transitions : compact($transition-1, $transition-2, $transition-3, $transition-4, $transition-5, $transition-6, $transition-7, $transition-8, $transition-9, $transition-10);
|
153
|
+
}
|
154
|
+
$delays: comma-list();
|
155
|
+
$has-delays: false;
|
156
|
+
$webkit-value: comma-list();
|
157
|
+
$moz-value: comma-list();
|
158
|
+
$o-value: comma-list();
|
159
|
+
|
160
|
+
// This block can be made considerably simpler at the point in time that
|
161
|
+
// we no longer need to deal with the differences in how delays are treated.
|
162
|
+
@each $transition in $transitions {
|
163
|
+
// Extract the values from the list
|
164
|
+
// (this would be cleaner if nth took a 3rd argument to provide a default value).
|
165
|
+
$property: nth($transition, 1);
|
166
|
+
$duration: false;
|
167
|
+
$timing-function: false;
|
168
|
+
$delay: false;
|
169
|
+
@if length($transition) > 1 { $duration: nth($transition, 2); }
|
170
|
+
@if length($transition) > 2 { $timing-function: nth($transition, 3); }
|
171
|
+
@if length($transition) > 3 { $delay: nth($transition, 4); $has-delays: true; }
|
172
|
+
|
173
|
+
// If a delay is provided without a timing function
|
174
|
+
@if is-time($timing-function) and not($delay) { $delay: $timing-function; $timing-function: false; $has-delays: true; }
|
175
|
+
|
176
|
+
// Keep a list of delays in case one is specified
|
177
|
+
$delays: append($delays, if($delay, $delay, 0s));
|
178
|
+
|
179
|
+
$webkit-value: append($webkit-value, compact((prefixed-for-transition(-webkit, $property) $duration $timing-function)...));
|
180
|
+
$moz-value: append( $moz-value, compact((prefixed-for-transition( -moz, $property) $duration $timing-function $delay)...));
|
181
|
+
$o-value: append( $o-value, compact((prefixed-for-transition( -o, $property) $duration $timing-function $delay)...));
|
182
|
+
}
|
183
|
+
|
184
|
+
@if $experimental-support-for-webkit { -webkit-transition : $webkit-value;
|
185
|
+
// old webkit doesn't support the delay parameter in the shorthand so we progressively enhance it.
|
186
|
+
@if $has-delays { -webkit-transition-delay : $delays; } }
|
187
|
+
@if $experimental-support-for-mozilla { -moz-transition : $moz-value; }
|
188
|
+
@if $experimental-support-for-opera { -o-transition : $o-value; }
|
189
|
+
transition : $transitions;
|
190
|
+
}
|
191
|
+
|
192
|
+
// coerce a list to be comma delimited or make a new, empty comma delimited list.
|
193
|
+
@function comma-list($list: ()) {
|
194
|
+
@return join((), $list, comma);
|
195
|
+
}
|
196
|
+
|
197
|
+
// Returns `$property` with the given prefix if it is found in `$transitionable-prefixed-values`.
|
198
|
+
@function prefixed-for-transition($prefix, $property) {
|
199
|
+
@if type-of($property) == list {
|
200
|
+
$new-list: comma-list();
|
201
|
+
@each $v in $property {
|
202
|
+
$new-list: append($new-list, prefixed-for-transition($prefix, $v));
|
203
|
+
}
|
204
|
+
@return $new-list;
|
205
|
+
} @else {
|
206
|
+
@if index($transitionable-prefixed-values, $property) {
|
207
|
+
@return #{$prefix}-#{$property};
|
208
|
+
} @else {
|
209
|
+
@return $property;
|
210
|
+
}
|
211
|
+
}
|
212
|
+
}
|
213
|
+
|
214
|
+
// Checks if the value given is a unit of time.
|
215
|
+
@function is-time($value) {
|
216
|
+
@if type-of($value) == number {
|
217
|
+
@return not(not(index(s ms, unit($value))));
|
218
|
+
} @else {
|
219
|
+
@return false;
|
220
|
+
}
|
221
|
+
}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
// User Interface ------------------------------------------------------------
|
2
|
+
// This file can be expanded to handle all the user interface properties as
|
3
|
+
// they become available in browsers:
|
4
|
+
// http://www.w3.org/TR/2000/WD-css3-userint-20000216
|
5
|
+
@import "shared";
|
6
|
+
|
7
|
+
|
8
|
+
// This property controls the selection model and granularity of an element.
|
9
|
+
//
|
10
|
+
// @param $select
|
11
|
+
// [ none | text | toggle | element | elements | all | inherit ]
|
12
|
+
@mixin user-select($select) {
|
13
|
+
$select: unquote($select);
|
14
|
+
@include experimental(user-select, $select,
|
15
|
+
-moz, -webkit, not(-o), -ms, -khtml, official
|
16
|
+
);
|
17
|
+
}
|
18
|
+
|
19
|
+
// Style the html5 input placeholder in browsers that support it.
|
20
|
+
//
|
21
|
+
// The styles for the input placeholder are passed as mixin content
|
22
|
+
// and the selector comes from the mixin's context.
|
23
|
+
//
|
24
|
+
// For example:
|
25
|
+
//
|
26
|
+
// #{elements-of-type(text-input)} {
|
27
|
+
// @include input-placeholder {
|
28
|
+
// color: #bfbfbf;
|
29
|
+
// font-style: italic;
|
30
|
+
// }
|
31
|
+
// }
|
32
|
+
//
|
33
|
+
// if you want to apply the placeholder styles to all elements supporting
|
34
|
+
// the `input-placeholder` pseudo class (beware of performance impacts):
|
35
|
+
//
|
36
|
+
// * {
|
37
|
+
// @include input-placeholder {
|
38
|
+
// color: #bfbfbf;
|
39
|
+
// font-style: italic;
|
40
|
+
// }
|
41
|
+
// }
|
42
|
+
@mixin input-placeholder {
|
43
|
+
&:-ms-input-placeholder { @content; }
|
44
|
+
&:-moz-placeholder { @content; }
|
45
|
+
&::-moz-placeholder { @content; }
|
46
|
+
&::-webkit-input-placeholder { @content; }
|
47
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
//
|
2
|
+
// A partial implementation of the Ruby colors functions from Compass:
|
3
|
+
// https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/colors.rb
|
4
|
+
//
|
5
|
+
|
6
|
+
// a genericized version of lighten/darken so that negative values can be used.
|
7
|
+
@function adjust-lightness($color, $amount) {
|
8
|
+
@return adjust-color($color, $lightness: $amount);
|
9
|
+
}
|
10
|
+
|
11
|
+
// Scales a color's lightness by some percentage.
|
12
|
+
// If the amount is negative, the color is scaled darker, if positive, it is scaled lighter.
|
13
|
+
// This will never return a pure light or dark color unless the amount is 100%.
|
14
|
+
@function scale-lightness($color, $amount) {
|
15
|
+
@return scale-color($color, $lightness: $amount);
|
16
|
+
}
|
17
|
+
|
18
|
+
// a genericized version of saturate/desaturate so that negative values can be used.
|
19
|
+
@function adjust-saturation($color, $amount) {
|
20
|
+
@return adjust-color($color, $saturation: $amount);
|
21
|
+
}
|
22
|
+
|
23
|
+
// Scales a color's saturation by some percentage.
|
24
|
+
// If the amount is negative, the color is desaturated, if positive, it is saturated.
|
25
|
+
// This will never return a pure saturated or desaturated color unless the amount is 100%.
|
26
|
+
@function scale-saturation($color, $amount) {
|
27
|
+
@return scale-color($color, $saturation: $amount);
|
28
|
+
}
|
29
|
+
|
30
|
+
@function shade($color, $percentage) {
|
31
|
+
@return mix(#000000, $color, $percentage);
|
32
|
+
}
|
33
|
+
|
34
|
+
@function tint($color, $percentage) {
|
35
|
+
@return mix(#ffffff, $color, $percentage);
|
36
|
+
}
|
37
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
//
|
2
|
+
// A partial implementation of the Ruby constants functions from Compass:
|
3
|
+
// https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/constants.rb
|
4
|
+
//
|
5
|
+
|
6
|
+
@function opposite-position($from) {
|
7
|
+
@if ($from == top) {
|
8
|
+
@return bottom;
|
9
|
+
} @else if ($from == bottom) {
|
10
|
+
@return top;
|
11
|
+
} @else if ($from == left) {
|
12
|
+
@return right;
|
13
|
+
} @else if ($from == right) {
|
14
|
+
@return left;
|
15
|
+
} @else if ($from == center) {
|
16
|
+
@return center;
|
17
|
+
}
|
18
|
+
}
|
@@ -0,0 +1,72 @@
|
|
1
|
+
//
|
2
|
+
// A partial implementation of the Ruby cross browser support functions from Compass:
|
3
|
+
// https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/cross_browser_support.rb
|
4
|
+
//
|
5
|
+
|
6
|
+
@function prefixed($prefix, $property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
|
7
|
+
$properties: $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9;
|
8
|
+
$prefixed: false;
|
9
|
+
@each $item in $properties {
|
10
|
+
@if type-of($item) == 'string' {
|
11
|
+
$prefixed: $prefixed or str-index($item, 'url') != 1 and str-index($item, 'rgb') != 1 and str-index($item, '#') != 1;
|
12
|
+
} @elseif type-of($item) == 'color' {
|
13
|
+
} @elseif $item != null {
|
14
|
+
$prefixed: true;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
@return $prefixed;
|
18
|
+
}
|
19
|
+
|
20
|
+
@function prefix($prefix, $property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
|
21
|
+
$properties: "";
|
22
|
+
|
23
|
+
// Support for polymorphism.
|
24
|
+
@if type-of($property1) == 'list' {
|
25
|
+
// Passing a single array of properties.
|
26
|
+
$properties: $property1;
|
27
|
+
} @else {
|
28
|
+
// Passing multiple properties.
|
29
|
+
$properties: $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9;
|
30
|
+
}
|
31
|
+
|
32
|
+
$props: false;
|
33
|
+
@each $item in $properties {
|
34
|
+
@if $item == null {}
|
35
|
+
@else {
|
36
|
+
@if prefixed($prefix, $item) {
|
37
|
+
$item: #{$prefix}-#{$item};
|
38
|
+
}
|
39
|
+
@if $props {
|
40
|
+
$props: $props, $item;
|
41
|
+
}
|
42
|
+
@else {
|
43
|
+
$props: $item;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
@return $props;
|
48
|
+
}
|
49
|
+
|
50
|
+
@function -svg($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
|
51
|
+
@return prefix('-svg', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
|
52
|
+
}
|
53
|
+
|
54
|
+
@function -owg($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
|
55
|
+
@return prefix('-owg', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
|
56
|
+
}
|
57
|
+
|
58
|
+
@function -webkit($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
|
59
|
+
@return prefix('-webkit', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
|
60
|
+
}
|
61
|
+
|
62
|
+
@function -moz($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
|
63
|
+
@return prefix('-moz', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
|
64
|
+
}
|
65
|
+
|
66
|
+
@function -o($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
|
67
|
+
@return prefix('-o', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
|
68
|
+
}
|
69
|
+
|
70
|
+
@function -pie($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
|
71
|
+
@return prefix('-pie', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
|
72
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
//
|
2
|
+
// A partial implementation of the Ruby display functions from Compass:
|
3
|
+
// https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/display.rb
|
4
|
+
//
|
5
|
+
|
6
|
+
@function elements-of-type($type){
|
7
|
+
@if ($type == block){
|
8
|
+
@return address, article, aside, blockquote, center, dir, div, dd, details, dl, dt, fieldset, figcaption, figure, form, footer, frameset, h1, h2, h3, h4, h5, h6, hr, header, hgroup, isindex, main, menu, nav, noframes, noscript, ol, p, pre, section, summary, ul;
|
9
|
+
} @else if ($type == inline){
|
10
|
+
@return a, abbr, acronym, audio, b, basefont, bdo, big, br, canvas, cite, code, command, datalist, dfn, em, embed, font, i, img, input, keygen, kbd, label, mark, meter, output, progress, q, rp, rt, ruby, s, samp, select, small, span, strike, strong, sub, sup, textarea, time, tt, u, var, video, wbr;
|
11
|
+
} @else if ($type == inline-block){
|
12
|
+
@return img;
|
13
|
+
} @else if ($type == table){
|
14
|
+
@return table;
|
15
|
+
} @else if ($type == list-item){
|
16
|
+
@return li;
|
17
|
+
} @else if ($type == table-row-group){
|
18
|
+
@return tbody;
|
19
|
+
} @else if ($type == table-header-group){
|
20
|
+
@return thead;
|
21
|
+
} @else if ($type == table-footer-group){
|
22
|
+
@return tfoot;
|
23
|
+
} @else if ($type == table-row){
|
24
|
+
@return tr;
|
25
|
+
} @else if ($type == table-cell){
|
26
|
+
@return th, td;
|
27
|
+
} @else if ($type == html5-block){
|
28
|
+
@return article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary;
|
29
|
+
} @else if ($type == html5-inline){
|
30
|
+
@return audio, canvas, command, datalist, embed, keygen, mark, meter, output, progress, rp, rt, ruby, time, video, wbr;
|
31
|
+
} @else if ($type == html5){
|
32
|
+
@return article, aside, audio, canvas, command, datalist, details, embed, figcaption, figure, footer, header, hgroup, keygen, main, mark, menu, meter, nav, output, progress, rp, rt, ruby, section, summary, time, video, wbr;
|
33
|
+
} @else if ($type == text-input){
|
34
|
+
@return input, textarea;
|
35
|
+
}
|
36
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
//
|
2
|
+
// A partial implementation of the Ruby gradient support functions from Compass:
|
3
|
+
// https://github.com/Compass/compass/blob/v0.12.2/lib/compass/sass_extensions/functions/gradient_support.rb
|
4
|
+
//
|
5
|
+
|
6
|
+
@function color-stops($item1, $item2:null, $item3:null, $item4:null, $item5:null, $item6:null, $item7:null, $item8:null, $item9:null) {
|
7
|
+
$items: $item2, $item3, $item4, $item5, $item6, $item7, $item8, $item9;
|
8
|
+
$full: $item1;
|
9
|
+
@each $item in $items {
|
10
|
+
@if $item != null {
|
11
|
+
$full: $full, $item;
|
12
|
+
}
|
13
|
+
}
|
14
|
+
@return $full;
|
15
|
+
}
|