ultimate-base 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +5 -0
- data/.rvmrc +2 -0
- data/.rvmrc.example +2 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +14 -0
- data/LICENSE +5 -0
- data/README.md +1 -0
- data/Rakefile +1 -0
- data/app/assets/javascripts/backbone/backbone.js +1452 -0
- data/app/assets/javascripts/backbone/ultimate/app.js.coffee +25 -0
- data/app/assets/javascripts/backbone/ultimate/collection.js.coffee +12 -0
- data/app/assets/javascripts/backbone/ultimate/model.js.coffee +12 -0
- data/app/assets/javascripts/backbone/ultimate/router.js.coffee +13 -0
- data/app/assets/javascripts/backbone/ultimate/view.js.coffee +96 -0
- data/app/assets/javascripts/ultimate/base.js.coffee +103 -0
- data/app/assets/javascripts/ultimate/bus.js.coffee +57 -0
- data/app/assets/javascripts/ultimate/devise.js.coffee +18 -0
- data/app/assets/javascripts/ultimate/experimental/_inflections/dzone.inflections.js +154 -0
- data/app/assets/javascripts/ultimate/experimental/_inflections/inflections.js.coffee +2 -0
- data/app/assets/javascripts/ultimate/experimental/_inflections/plur.js +29 -0
- data/app/assets/javascripts/ultimate/experimental/_inflections/underscore.inflection.js +175 -0
- data/app/assets/javascripts/ultimate/experimental/fuzzy-json-generator.js.coffee +48 -0
- data/app/assets/javascripts/ultimate/helpers/array.js.coffee +63 -0
- data/app/assets/javascripts/ultimate/helpers/asset_tag.js.coffee +63 -0
- data/app/assets/javascripts/ultimate/helpers/decor.js.coffee +14 -0
- data/app/assets/javascripts/ultimate/helpers/forms.js.coffee +0 -0
- data/app/assets/javascripts/ultimate/helpers/tags.js.coffee +70 -0
- data/app/assets/javascripts/ultimate/helpers.js.coffee +149 -0
- data/app/assets/javascripts/ultimate/improves/datepicker.js.coffee +34 -0
- data/app/assets/javascripts/ultimate/improves/form-errors.js.coffee +146 -0
- data/app/assets/javascripts/ultimate/improves/form.js.coffee +155 -0
- data/app/assets/javascripts/ultimate/improves/magic-radios.js.coffee +41 -0
- data/app/assets/javascripts/ultimate/improves/tablesorter.js +59 -0
- data/app/assets/javascripts/ultimate/improves/typed-field.js.coffee +98 -0
- data/app/assets/javascripts/ultimate/underscore/underscore.js +1059 -0
- data/app/assets/javascripts/ultimate/underscore/underscore.string.js +480 -0
- data/app/assets/javascripts/ultimate/widgets/dock.js.coffee +70 -0
- data/app/assets/javascripts/ultimate/widgets/gear.js.coffee +84 -0
- data/app/assets/javascripts/ultimate/widgets/jquery-ext.js.coffee +104 -0
- data/app/assets/javascripts/ultimate/widgets/jquery.adapter.js.coffee +62 -0
- data/app/assets/javascripts/ultimate/widgets/widget.js.coffee +115 -0
- data/app/assets/stylesheets/polyfills/PIE.htc +96 -0
- data/app/assets/stylesheets/polyfills/boxsizing.htc +300 -0
- data/app/assets/stylesheets/ultimate/mixins/_routines.css.scss +95 -0
- data/app/assets/stylesheets/ultimate/mixins/_vendors.css.scss +34 -0
- data/app/assets/stylesheets/ultimate/mixins/css3/_text-shadow.scss +37 -0
- data/app/assets/stylesheets/ultimate/mixins/css3.css.scss +328 -0
- data/app/assets/stylesheets/ultimate/mixins/decor.css.scss +86 -0
- data/app/assets/stylesheets/ultimate/mixins/fonts.css.scss +100 -0
- data/app/assets/stylesheets/ultimate/mixins/microstructures.css.scss +188 -0
- data/app/assets/stylesheets/ultimate/structures/slider.css.scss +53 -0
- data/lib/ultimate-base/engine.rb +6 -0
- data/lib/ultimate-base/extensions/directive_processor.rb +64 -0
- data/lib/ultimate-base/extensions/sass_script_functions.rb +39 -0
- data/lib/ultimate-base/version.rb +5 -0
- data/lib/ultimate-base.rb +10 -0
- data/ultimate-base.gemspec +25 -0
- metadata +102 -0
@@ -0,0 +1,300 @@
|
|
1
|
+
/**
|
2
|
+
* CSS-JS-BOOSTER
|
3
|
+
*
|
4
|
+
* A polyfill for box-sizing: border-box for IE6 & IE7.
|
5
|
+
*
|
6
|
+
* JScript
|
7
|
+
*
|
8
|
+
* This program is free software: you can redistribute it and/or modify
|
9
|
+
* it under the terms of the GNU Lesser General Public License as published
|
10
|
+
* by the Free Software Foundation, either version 3 of the License, or
|
11
|
+
* (at your option) any later version.
|
12
|
+
*
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
16
|
+
* GNU Lesser General Public License for more details.
|
17
|
+
*
|
18
|
+
* See <http://www.gnu.org/licenses/lgpl-3.0.txt>
|
19
|
+
*
|
20
|
+
* @category JScript
|
21
|
+
* @package box-sizing-polyfill
|
22
|
+
* @author Christian Schepp Schaefer <schaepp@gmx.de> <http://twitter.com/derSchepp>
|
23
|
+
* @copyright 2010 Christian Schepp Schaefer
|
24
|
+
* @license http://www.gnu.org/copyleft/lesser.html The GNU LESSER GENERAL PUBLIC LICENSE, Version 3.0
|
25
|
+
* @link http://github.com/Schepp/box-sizing-polyfill
|
26
|
+
*
|
27
|
+
* PREFACE:
|
28
|
+
*
|
29
|
+
* This box-sizing polyfill is based on previous work done by Erik Arvidsson,
|
30
|
+
* which he published in 2002 on http://webfx.eae.net/dhtml/boxsizing/boxsizing.html.
|
31
|
+
*
|
32
|
+
* USAGE:
|
33
|
+
*
|
34
|
+
* Add the behavior/HTC after every `box-sizing: border-box;` that you assign:
|
35
|
+
*
|
36
|
+
* box-sizing: border-box;
|
37
|
+
* *behavior: url(/scripts/boxsizing.htc);`
|
38
|
+
*
|
39
|
+
* If you prefix the `behavior` property with a star, like seen above, it will only be seen by
|
40
|
+
* IE6 & IE7, not by IE8+ (it's a hack) which is better for the performance on those newer browsers.
|
41
|
+
*
|
42
|
+
* The URL to the HTC file must be relative to your HTML(!) document, not relative to your CSS.
|
43
|
+
* That's why I'd advise you to use absolute paths like in the example.
|
44
|
+
*
|
45
|
+
*/
|
46
|
+
<component lightWeight="true">
|
47
|
+
<attach event="onpropertychange" onevent="checkPropertyChange()" />
|
48
|
+
<attach event="ondetach" onevent="restore()" />
|
49
|
+
<attach event="onresize" for="window" onevent="restore();init()" />
|
50
|
+
<script type="text/javascript">
|
51
|
+
//<![CDATA[
|
52
|
+
|
53
|
+
var viewportwidth = (typeof window.innerWidth != 'undefined' ? window.innerWidth : element.document.documentElement.clientWidth);
|
54
|
+
// Shortcut for the document object
|
55
|
+
var doc = element.document;
|
56
|
+
|
57
|
+
/*
|
58
|
+
* init gets called once at the start and then never again,
|
59
|
+
* triggers box-sizing calculations and updates width and height
|
60
|
+
*/
|
61
|
+
function init(){
|
62
|
+
updateBorderBoxWidth();
|
63
|
+
updateBorderBoxHeight();
|
64
|
+
}
|
65
|
+
|
66
|
+
/*
|
67
|
+
* restore gets called when the behavior is being detached (see event binding at the top),
|
68
|
+
* resets everything like it was before applying the behavior
|
69
|
+
*/
|
70
|
+
function restore(){
|
71
|
+
element.runtimeStyle.width = "";
|
72
|
+
element.runtimeStyle.height = "";
|
73
|
+
}
|
74
|
+
|
75
|
+
/*
|
76
|
+
* checkPropertyChange gets called as soon as an element property changes
|
77
|
+
* (see event binding at the top), it then checks if any property influencing its
|
78
|
+
* dimensions was changed and if yes recalculates width and height
|
79
|
+
*/
|
80
|
+
function checkPropertyChange(){
|
81
|
+
var pn = event.propertyName;
|
82
|
+
var undef;
|
83
|
+
if(pn == "style.boxSizing" && element.style.boxSizing == ""){
|
84
|
+
element.style.removeAttribute("boxSizing");
|
85
|
+
element.runtimeStyle.boxSizing = undef;
|
86
|
+
}
|
87
|
+
switch (pn){
|
88
|
+
case "style.width":
|
89
|
+
case "style.borderLeftWidth":
|
90
|
+
case "style.borderLeftStyle":
|
91
|
+
case "style.borderRightWidth":
|
92
|
+
case "style.borderRightStyle":
|
93
|
+
case "style.paddingLeft":
|
94
|
+
case "style.paddingRight":
|
95
|
+
updateBorderBoxWidth();
|
96
|
+
break;
|
97
|
+
|
98
|
+
case "style.height":
|
99
|
+
case "style.borderTopWidth":
|
100
|
+
case "style.borderTopStyle":
|
101
|
+
case "style.borderBottomWidth":
|
102
|
+
case "style.borderBottomStyle":
|
103
|
+
case "style.paddingTop":
|
104
|
+
case "style.paddingBottom":
|
105
|
+
updateBorderBoxHeight();
|
106
|
+
break;
|
107
|
+
|
108
|
+
case "className":
|
109
|
+
case "style.boxSizing":
|
110
|
+
updateBorderBoxWidth();
|
111
|
+
updateBorderBoxHeight();
|
112
|
+
break;
|
113
|
+
}
|
114
|
+
|
115
|
+
}
|
116
|
+
|
117
|
+
/*
|
118
|
+
* Helper function, taken from Dean Edward's IE7 framework,
|
119
|
+
* added by Schepp on 12.06.2010.
|
120
|
+
* http://code.google.com/p/ie7-js/
|
121
|
+
*
|
122
|
+
* Allows us to convert from relative to pixel-values.
|
123
|
+
*/
|
124
|
+
function getPixelValue(value){
|
125
|
+
var PIXEL = /^\d+(px)?$/i;
|
126
|
+
if (PIXEL.test(value)) return parseInt(value);
|
127
|
+
var style = element.style.left;
|
128
|
+
var runtimeStyle = element.runtimeStyle.left;
|
129
|
+
element.runtimeStyle.left = element.currentStyle.left;
|
130
|
+
element.style.left = value || 0;
|
131
|
+
value = parseInt(element.style.pixelLeft);
|
132
|
+
element.style.left = style;
|
133
|
+
element.runtimeStyle.left = runtimeStyle;
|
134
|
+
|
135
|
+
return value;
|
136
|
+
}
|
137
|
+
|
138
|
+
function getPixelWidth(object, value){
|
139
|
+
// For Pixel Values
|
140
|
+
var PIXEL = /^\d+(px)?$/i;
|
141
|
+
if (PIXEL.test(value)) return parseInt(value);
|
142
|
+
|
143
|
+
// For Percentage Values
|
144
|
+
var PERCENT = /^[\d\.]+%$/i;
|
145
|
+
if (PERCENT.test(value)){
|
146
|
+
try{
|
147
|
+
parentWidth = getPixelWidth(object.parentElement,(object.parentElement.currentStyle.width != "auto" ? object.parentElement.currentStyle.width : "100%"));
|
148
|
+
value = (parseFloat(value) / 100) * parentWidth;
|
149
|
+
}
|
150
|
+
catch(e){
|
151
|
+
value = (parseFloat(value) / 100) * element.document.documentElement.clientWidth;
|
152
|
+
}
|
153
|
+
return parseInt(value);
|
154
|
+
}
|
155
|
+
|
156
|
+
// For EM Values
|
157
|
+
var style = object.style.left;
|
158
|
+
var runtimeStyle = object.runtimeStyle.left;
|
159
|
+
object.runtimeStyle.left = object.currentStyle.left;
|
160
|
+
object.style.left = value || 0;
|
161
|
+
value = parseInt(object.style.pixelLeft);
|
162
|
+
object.style.left = style;
|
163
|
+
object.runtimeStyle.left = runtimeStyle;
|
164
|
+
|
165
|
+
return value;
|
166
|
+
}
|
167
|
+
|
168
|
+
|
169
|
+
/*
|
170
|
+
* getBorderWidth & friends
|
171
|
+
* Border width getters
|
172
|
+
*/
|
173
|
+
function getBorderWidth(sSide){
|
174
|
+
if(element.currentStyle["border" + sSide + "Style"] == "none"){
|
175
|
+
return 0;
|
176
|
+
}
|
177
|
+
var n = getPixelValue(element.currentStyle["border" + sSide + "Width"]);
|
178
|
+
return n || 0;
|
179
|
+
}
|
180
|
+
function getBorderLeftWidth() { return getBorderWidth("Left"); }
|
181
|
+
function getBorderRightWidth() { return getBorderWidth("Right"); }
|
182
|
+
function getBorderTopWidth() { return getBorderWidth("Top"); }
|
183
|
+
function getBorderBottomWidth() { return getBorderWidth("Bottom"); }
|
184
|
+
|
185
|
+
|
186
|
+
/*
|
187
|
+
* getPadding & friends
|
188
|
+
* Padding width getters
|
189
|
+
*/
|
190
|
+
function getPadding(sSide) {
|
191
|
+
var n = getPixelValue(element.currentStyle["padding" + sSide]);
|
192
|
+
return n || 0;
|
193
|
+
}
|
194
|
+
function getPaddingLeft() { return getPadding("Left"); }
|
195
|
+
function getPaddingRight() { return getPadding("Right"); }
|
196
|
+
function getPaddingTop() { return getPadding("Top"); }
|
197
|
+
function getPaddingBottom() { return getPadding("Bottom"); }
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
/*
|
202
|
+
* getBoxSizing
|
203
|
+
* Get the box-sizing value for the current element
|
204
|
+
*/
|
205
|
+
function getBoxSizing(){
|
206
|
+
var s = element.style;
|
207
|
+
var cs = element.currentStyle
|
208
|
+
if(typeof s.boxSizing != "undefined" && s.boxSizing != ""){
|
209
|
+
return s.boxSizing;
|
210
|
+
}
|
211
|
+
if(typeof s["box-sizing"] != "undefined" && s["box-sizing"] != ""){
|
212
|
+
return s["box-sizing"];
|
213
|
+
}
|
214
|
+
if(typeof cs.boxSizing != "undefined" && cs.boxSizing != ""){
|
215
|
+
return cs.boxSizing;
|
216
|
+
}
|
217
|
+
if(typeof cs["box-sizing"] != "undefined" && cs["box-sizing"] != ""){
|
218
|
+
return cs["box-sizing"];
|
219
|
+
}
|
220
|
+
return getDocumentBoxSizing();
|
221
|
+
}
|
222
|
+
|
223
|
+
|
224
|
+
/*
|
225
|
+
* getDocumentBoxSizing
|
226
|
+
* Get the default document box sizing (check for quirks mode)
|
227
|
+
*/
|
228
|
+
function getDocumentBoxSizing(){
|
229
|
+
if(doc.compatMode == null || doc.compatMode == "BackCompat"){
|
230
|
+
return "border-box";
|
231
|
+
}
|
232
|
+
return "content-box"
|
233
|
+
}
|
234
|
+
|
235
|
+
|
236
|
+
/*
|
237
|
+
* setBorderBoxWidth & friends
|
238
|
+
* Width and height setters
|
239
|
+
*/
|
240
|
+
function setBorderBoxWidth(n){
|
241
|
+
element.runtimeStyle.width = Math.max(0, n - getBorderLeftWidth() -
|
242
|
+
getPaddingLeft() - getPaddingRight() - getBorderRightWidth()) + "px";
|
243
|
+
}
|
244
|
+
function setBorderBoxHeight(n){
|
245
|
+
element.runtimeStyle.height = Math.max(0, n - getBorderTopWidth() -
|
246
|
+
getPaddingTop() - getPaddingBottom() - getBorderBottomWidth()) + "px";
|
247
|
+
}
|
248
|
+
function setContentBoxWidth(n){
|
249
|
+
element.runtimeStyle.width = Math.max(0, n + getBorderLeftWidth() +
|
250
|
+
getPaddingLeft() + getPaddingRight() + getBorderRightWidth()) + "px";
|
251
|
+
}
|
252
|
+
function setContentBoxHeight(n){
|
253
|
+
element.runtimeStyle.height = Math.max(0, n + getBorderTopWidth() +
|
254
|
+
getPaddingTop() + getPaddingBottom() + getBorderBottomWidth()) + "px";
|
255
|
+
}
|
256
|
+
|
257
|
+
|
258
|
+
/*
|
259
|
+
* updateBorderBoxWidth & updateBorderBoxHeight
|
260
|
+
*
|
261
|
+
*/
|
262
|
+
function updateBorderBoxWidth() {
|
263
|
+
if(getDocumentBoxSizing() == getBoxSizing()){
|
264
|
+
return;
|
265
|
+
}
|
266
|
+
var csw = element.currentStyle.width;
|
267
|
+
if(csw != "auto"){
|
268
|
+
csw = getPixelWidth(element,csw);
|
269
|
+
if(getBoxSizing() == "border-box"){
|
270
|
+
setBorderBoxWidth(parseInt(csw));
|
271
|
+
}
|
272
|
+
else{
|
273
|
+
setContentBoxWidth(parseInt(csw));
|
274
|
+
}
|
275
|
+
}
|
276
|
+
}
|
277
|
+
|
278
|
+
function updateBorderBoxHeight() {
|
279
|
+
if(getDocumentBoxSizing() == getBoxSizing()){
|
280
|
+
return;
|
281
|
+
}
|
282
|
+
var csh = element.currentStyle.height;
|
283
|
+
if(csh != "auto"){
|
284
|
+
csh = getPixelValue(csh);
|
285
|
+
if(getBoxSizing() == "border-box"){
|
286
|
+
setBorderBoxHeight(parseInt(csh));
|
287
|
+
}
|
288
|
+
else{
|
289
|
+
setContentBoxHeight(parseInt(csh));
|
290
|
+
}
|
291
|
+
}
|
292
|
+
}
|
293
|
+
|
294
|
+
|
295
|
+
// Run the calculations
|
296
|
+
init();
|
297
|
+
|
298
|
+
//]]>
|
299
|
+
</script>
|
300
|
+
</component>
|
@@ -0,0 +1,95 @@
|
|
1
|
+
@mixin deprecate($subject, $instead: false) {
|
2
|
+
@warn "\"#{$subject}\" DEPRECATED!#{if($instead, " Use instead: \"#{$instead}\"", '')}";
|
3
|
+
}
|
4
|
+
|
5
|
+
@function isset($v) {
|
6
|
+
@return $v != none and $v != false;
|
7
|
+
}
|
8
|
+
|
9
|
+
@function complex-isset($list, $l: length($list)) {
|
10
|
+
$i: 1;
|
11
|
+
@while $i <= $l and isset(nth($list, $i)) {
|
12
|
+
$i: $i + 1;
|
13
|
+
}
|
14
|
+
@return $i > $l;
|
15
|
+
}
|
16
|
+
|
17
|
+
@function complex-list($params) {
|
18
|
+
$l: length($params);
|
19
|
+
@if $l < 4 {
|
20
|
+
@if $l < 3 {
|
21
|
+
$params: join($params, nth($params, 1));
|
22
|
+
}
|
23
|
+
@if $l > 1 {
|
24
|
+
$params: join($params, nth($params, 2));
|
25
|
+
} @else {
|
26
|
+
$params: join($params, $params);
|
27
|
+
}
|
28
|
+
}
|
29
|
+
@return $params;
|
30
|
+
}
|
31
|
+
|
32
|
+
@mixin complex-property($property, $params, $complex-params: false) {
|
33
|
+
@if isset($params) {
|
34
|
+
$l: length($params);
|
35
|
+
@if $l == 1 or complex-isset($params) {
|
36
|
+
#{$property}: $params;
|
37
|
+
} @else {
|
38
|
+
@if $l < 4 {
|
39
|
+
$params: if(length($complex-params) >= 4, $complex-params, complex-list($params));
|
40
|
+
}
|
41
|
+
$i: 0;
|
42
|
+
@each $side in top, right, bottom, left {
|
43
|
+
$i: $i + 1;
|
44
|
+
$p: nth($params, $i);
|
45
|
+
@if isset($p) {
|
46
|
+
#{$property}-#{$side}: $p;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
53
|
+
@function max($a, $b) {
|
54
|
+
@return if($a > $b, $a, $b);
|
55
|
+
}
|
56
|
+
|
57
|
+
@function strip-px($v) {
|
58
|
+
@return if(unit($v) == "px", $v / 1px, $v);
|
59
|
+
}
|
60
|
+
|
61
|
+
@function list-to-string($list, $separator: "") {
|
62
|
+
$result: "";
|
63
|
+
$first: true;
|
64
|
+
@each $cut in $list {
|
65
|
+
@if $first {
|
66
|
+
$first: false;
|
67
|
+
$result: $cut;
|
68
|
+
} @else {
|
69
|
+
$result: "#{$result}#{$separator}#{$cut}"
|
70
|
+
}
|
71
|
+
}
|
72
|
+
@return $result;
|
73
|
+
}
|
74
|
+
|
75
|
+
@function change-separator($list, $separator: comma) {
|
76
|
+
$result: ();
|
77
|
+
@each $value in $list {
|
78
|
+
$result: append($result, $value, $separator);
|
79
|
+
}
|
80
|
+
@return $result;
|
81
|
+
}
|
82
|
+
|
83
|
+
@function compact-list($list, $separator: comma) {
|
84
|
+
$result: ();
|
85
|
+
@each $value in $list {
|
86
|
+
@if isset($value) {
|
87
|
+
$result: append($result, $value, $separator);
|
88
|
+
}
|
89
|
+
}
|
90
|
+
@return $result;
|
91
|
+
}
|
92
|
+
|
93
|
+
@function hack-ie8($params) {
|
94
|
+
@return unquote("#{$params}\0/");
|
95
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
// This mixin provides basic support for CSS properties with custom vendors implementations
|
2
|
+
// are identical except for the property prefix.
|
3
|
+
// example:
|
4
|
+
// @include vendors(webkit moz, border-radius, 5px);
|
5
|
+
// produce:
|
6
|
+
// -webkit-border-radius: 5px;
|
7
|
+
// -moz-border-radius: 5px;
|
8
|
+
// border-radius: 5px;
|
9
|
+
@mixin vendors($vendors, $property, $params, $origin: true) {
|
10
|
+
@each $vendor in $vendors {
|
11
|
+
-#{$vendor}-#{$property}: $params;
|
12
|
+
}
|
13
|
+
@if $origin {
|
14
|
+
#{$property}: $params;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
18
|
+
// Same as vendors(), but for cases when the property is the same and the value is vendorized.
|
19
|
+
// examples:
|
20
|
+
// @include vendors-param(webkit moz ms o, background-image, linear-gradient(left top, #F00, #FF0 50%, #0F0));
|
21
|
+
// produce:
|
22
|
+
// background-image: -webkit-linear-gradient(left top, #F00, #FF0 50%, #0F0);
|
23
|
+
// background-image: -moz-linear-gradient(left top, #F00, #FF0 50%, #0F0);
|
24
|
+
// background-image: -ms-linear-gradient(left top, #F00, #FF0 50%, #0F0);
|
25
|
+
// background-image: -o-linear-gradient(left top, #F00, #FF0 50%, #0F0);
|
26
|
+
// background-image: linear-gradient(left top, #F00, #FF0 50%, #0F0);
|
27
|
+
@mixin vendors-param($vendors, $property, $params, $origin: true) {
|
28
|
+
@each $vendor in $vendors {
|
29
|
+
#{$property}: -#{$vendor}-#{$params};
|
30
|
+
}
|
31
|
+
@if $origin {
|
32
|
+
#{$property}: $params;
|
33
|
+
}
|
34
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
// Provide cross-browser CSS text-shadow with hardcore ie-hack.
|
2
|
+
// example:
|
3
|
+
// @include text-shadow(#3b3b3b 1px 1px 1px);
|
4
|
+
// produce:
|
5
|
+
// text-shadow: 0 2px #000;
|
6
|
+
// filter: shadow(Color=#3b3b3b, Direction=135, Strength=1.414);
|
7
|
+
@mixin text-shadow_hard($params) {
|
8
|
+
$l: length($params);
|
9
|
+
$color: nth($params, $l);
|
10
|
+
@if $color == none {
|
11
|
+
text-shadow: none;
|
12
|
+
@if $support-ie {
|
13
|
+
filter: shadow(enabled=false);
|
14
|
+
}
|
15
|
+
} @else {
|
16
|
+
text-shadow: $params;
|
17
|
+
@if $support-ie {
|
18
|
+
$params-offset: 0;
|
19
|
+
@if type-of($color) != 'color' {
|
20
|
+
$color: nth($params, 1);
|
21
|
+
@if type-of($color) == 'color' {
|
22
|
+
$params-offset: 1;
|
23
|
+
} @else {
|
24
|
+
$color: #000;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
$offset-x: 0;
|
28
|
+
$offset-y: 0;
|
29
|
+
@if $l > 2 {
|
30
|
+
$offset-x : nth($params, $params-offset + 1);
|
31
|
+
$offset-y : nth($params, $params-offset + 2);
|
32
|
+
}
|
33
|
+
$polar: polar($offset-x, $offset-y);
|
34
|
+
filter: shadow(Color=$color, Direction=nth($polar, 1), Strength=nth($polar, 2));
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|