frozen 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +24 -0
- data/Gemfile +9 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +11 -0
- data/bin/frozen +56 -0
- data/dummy/assets/javascripts/coffee/test.js.coffee +8 -0
- data/dummy/assets/javascripts/main.js +11 -0
- data/dummy/assets/javascripts/sub/sub_script.js +11 -0
- data/dummy/assets/stylesheets/base/_base.scss +24 -0
- data/dummy/assets/stylesheets/base/_buttons.scss +10 -0
- data/dummy/assets/stylesheets/base/_forms.scss +78 -0
- data/dummy/assets/stylesheets/base/_grid-settings.scss +14 -0
- data/dummy/assets/stylesheets/base/_lists.scss +31 -0
- data/dummy/assets/stylesheets/base/_tables.scss +24 -0
- data/dummy/assets/stylesheets/base/_typography.scss +93 -0
- data/dummy/assets/stylesheets/base/_variables.scss +65 -0
- data/dummy/assets/stylesheets/base/extends/_button.scss +22 -0
- data/dummy/assets/stylesheets/base/extends/_clearfix.scss +3 -0
- data/dummy/assets/stylesheets/base/extends/_errors.scss +11 -0
- data/dummy/assets/stylesheets/base/extends/_flashes.scss +38 -0
- data/dummy/assets/stylesheets/base/extends/_hide-text.scss +3 -0
- data/dummy/assets/stylesheets/bourbon/_bourbon-deprecated-upcoming.scss +402 -0
- data/dummy/assets/stylesheets/bourbon/_bourbon.scss +86 -0
- data/dummy/assets/stylesheets/bourbon/addons/_clearfix.scss +18 -0
- data/dummy/assets/stylesheets/bourbon/addons/_directional-values.scss +111 -0
- data/dummy/assets/stylesheets/bourbon/addons/_ellipsis.scss +8 -0
- data/dummy/assets/stylesheets/bourbon/addons/_font-family.scss +5 -0
- data/dummy/assets/stylesheets/bourbon/addons/_hide-text.scss +12 -0
- data/dummy/assets/stylesheets/bourbon/addons/_html5-input-types.scss +90 -0
- data/dummy/assets/stylesheets/bourbon/addons/_position.scss +26 -0
- data/dummy/assets/stylesheets/bourbon/addons/_prefixer.scss +45 -0
- data/dummy/assets/stylesheets/bourbon/addons/_retina-image.scss +31 -0
- data/dummy/assets/stylesheets/bourbon/addons/_size.scss +26 -0
- data/dummy/assets/stylesheets/bourbon/addons/_timing-functions.scss +32 -0
- data/dummy/assets/stylesheets/bourbon/addons/_triangle.scss +83 -0
- data/dummy/assets/stylesheets/bourbon/addons/_word-wrap.scss +10 -0
- data/dummy/assets/stylesheets/bourbon/css3/_animation.scss +52 -0
- data/dummy/assets/stylesheets/bourbon/css3/_appearance.scss +3 -0
- data/dummy/assets/stylesheets/bourbon/css3/_backface-visibility.scss +6 -0
- data/dummy/assets/stylesheets/bourbon/css3/_background-image.scss +42 -0
- data/dummy/assets/stylesheets/bourbon/css3/_background.scss +55 -0
- data/dummy/assets/stylesheets/bourbon/css3/_border-image.scss +59 -0
- data/dummy/assets/stylesheets/bourbon/css3/_border-radius.scss +22 -0
- data/dummy/assets/stylesheets/bourbon/css3/_box-sizing.scss +4 -0
- data/dummy/assets/stylesheets/bourbon/css3/_calc.scss +4 -0
- data/dummy/assets/stylesheets/bourbon/css3/_columns.scss +47 -0
- data/dummy/assets/stylesheets/bourbon/css3/_filter.scss +5 -0
- data/dummy/assets/stylesheets/bourbon/css3/_flex-box.scss +320 -0
- data/dummy/assets/stylesheets/bourbon/css3/_font-face.scss +24 -0
- data/dummy/assets/stylesheets/bourbon/css3/_font-feature-settings.scss +10 -0
- data/dummy/assets/stylesheets/bourbon/css3/_hidpi-media-query.scss +10 -0
- data/dummy/assets/stylesheets/bourbon/css3/_hyphens.scss +4 -0
- data/dummy/assets/stylesheets/bourbon/css3/_image-rendering.scss +14 -0
- data/dummy/assets/stylesheets/bourbon/css3/_keyframes.scss +35 -0
- data/dummy/assets/stylesheets/bourbon/css3/_linear-gradient.scss +38 -0
- data/dummy/assets/stylesheets/bourbon/css3/_perspective.scss +8 -0
- data/dummy/assets/stylesheets/bourbon/css3/_placeholder.scss +8 -0
- data/dummy/assets/stylesheets/bourbon/css3/_radial-gradient.scss +39 -0
- data/dummy/assets/stylesheets/bourbon/css3/_selection.scss +14 -0
- data/dummy/assets/stylesheets/bourbon/css3/_text-decoration.scss +19 -0
- data/dummy/assets/stylesheets/bourbon/css3/_transform.scss +15 -0
- data/dummy/assets/stylesheets/bourbon/css3/_transition.scss +77 -0
- data/dummy/assets/stylesheets/bourbon/css3/_user-select.scss +3 -0
- data/dummy/assets/stylesheets/bourbon/functions/_assign.scss +11 -0
- data/dummy/assets/stylesheets/bourbon/functions/_color-lightness.scss +13 -0
- data/dummy/assets/stylesheets/bourbon/functions/_contains.scss +12 -0
- data/dummy/assets/stylesheets/bourbon/functions/_is-length.scss +7 -0
- data/dummy/assets/stylesheets/bourbon/functions/_is-size.scss +6 -0
- data/dummy/assets/stylesheets/bourbon/functions/_modular-scale.scss +69 -0
- data/dummy/assets/stylesheets/bourbon/functions/_px-to-em.scss +13 -0
- data/dummy/assets/stylesheets/bourbon/functions/_px-to-rem.scss +15 -0
- data/dummy/assets/stylesheets/bourbon/functions/_strip-units.scss +5 -0
- data/dummy/assets/stylesheets/bourbon/functions/_tint-shade.scss +9 -0
- data/dummy/assets/stylesheets/bourbon/functions/_transition-property-name.scss +22 -0
- data/dummy/assets/stylesheets/bourbon/functions/_unpack.scss +17 -0
- data/dummy/assets/stylesheets/bourbon/helpers/_convert-units.scss +15 -0
- data/dummy/assets/stylesheets/bourbon/helpers/_font-source-declaration.scss +36 -0
- data/dummy/assets/stylesheets/bourbon/helpers/_gradient-positions-parser.scss +13 -0
- data/dummy/assets/stylesheets/bourbon/helpers/_is-num.scss +5 -0
- data/dummy/assets/stylesheets/bourbon/helpers/_linear-angle-parser.scss +25 -0
- data/dummy/assets/stylesheets/bourbon/helpers/_linear-gradient-parser.scss +41 -0
- data/dummy/assets/stylesheets/bourbon/helpers/_linear-positions-parser.scss +61 -0
- data/dummy/assets/stylesheets/bourbon/helpers/_linear-side-corner-parser.scss +31 -0
- data/dummy/assets/stylesheets/bourbon/helpers/_radial-arg-parser.scss +69 -0
- data/dummy/assets/stylesheets/bourbon/helpers/_radial-gradient-parser.scss +50 -0
- data/dummy/assets/stylesheets/bourbon/helpers/_radial-positions-parser.scss +18 -0
- data/dummy/assets/stylesheets/bourbon/helpers/_render-gradients.scss +26 -0
- data/dummy/assets/stylesheets/bourbon/helpers/_shape-size-stripper.scss +10 -0
- data/dummy/assets/stylesheets/bourbon/helpers/_str-to-num.scss +50 -0
- data/dummy/assets/stylesheets/bourbon/settings/_asset-pipeline.scss +1 -0
- data/dummy/assets/stylesheets/bourbon/settings/_prefixer.scss +6 -0
- data/dummy/assets/stylesheets/bourbon/settings/_px-to-em.scss +1 -0
- data/dummy/assets/stylesheets/main.scss +6 -0
- data/dummy/assets/stylesheets/neat/_neat-helpers.scss +8 -0
- data/dummy/assets/stylesheets/neat/_neat.scss +23 -0
- data/dummy/assets/stylesheets/neat/functions/_new-breakpoint.scss +49 -0
- data/dummy/assets/stylesheets/neat/functions/_private.scss +114 -0
- data/dummy/assets/stylesheets/neat/grid/_box-sizing.scss +15 -0
- data/dummy/assets/stylesheets/neat/grid/_direction-context.scss +33 -0
- data/dummy/assets/stylesheets/neat/grid/_display-context.scss +28 -0
- data/dummy/assets/stylesheets/neat/grid/_fill-parent.scss +24 -0
- data/dummy/assets/stylesheets/neat/grid/_media.scss +92 -0
- data/dummy/assets/stylesheets/neat/grid/_omega.scss +87 -0
- data/dummy/assets/stylesheets/neat/grid/_outer-container.scss +38 -0
- data/dummy/assets/stylesheets/neat/grid/_pad.scss +25 -0
- data/dummy/assets/stylesheets/neat/grid/_private.scss +35 -0
- data/dummy/assets/stylesheets/neat/grid/_row.scss +52 -0
- data/dummy/assets/stylesheets/neat/grid/_shift.scss +50 -0
- data/dummy/assets/stylesheets/neat/grid/_span-columns.scss +92 -0
- data/dummy/assets/stylesheets/neat/grid/_to-deprecate.scss +97 -0
- data/dummy/assets/stylesheets/neat/grid/_visual-grid.scss +42 -0
- data/dummy/assets/stylesheets/neat/settings/_disable-warnings.scss +13 -0
- data/dummy/assets/stylesheets/neat/settings/_grid.scss +55 -0
- data/dummy/assets/stylesheets/neat/settings/_visual-grid.scss +27 -0
- data/dummy/assets/stylesheets/sub/sub.scss +8 -0
- data/dummy/build/about/index.html +1 -0
- data/dummy/build/css/main.css +1 -0
- data/dummy/build/css/sub/sub.css +1 -0
- data/dummy/build/index.html +1 -0
- data/dummy/build/js/coffee/test.js +1 -0
- data/dummy/build/js/main.js +1 -0
- data/dummy/build/js/sub/sub_script.js +1 -0
- data/dummy/config.yaml +3 -0
- data/dummy/layouts/default.html.slim +7 -0
- data/dummy/views/about/index.html.slim +1 -0
- data/dummy/views/index.html.slim +2 -0
- data/frozen.gemspec +37 -0
- data/lib/frozen.rb +13 -0
- data/lib/frozen/environment/base.rb +36 -0
- data/lib/frozen/rack/request_controller.rb +37 -0
- data/lib/frozen/site/base.rb +83 -0
- data/lib/frozen/site/local_site.rb +131 -0
- data/lib/frozen/template/base.rb +77 -0
- data/lib/frozen/template/javascript.rb +44 -0
- data/lib/frozen/template/stylesheet.rb +48 -0
- data/lib/frozen/template/view.rb +40 -0
- data/lib/frozen/version.rb +3 -0
- data/spec/lib/frozen/rack/request_controller_spec.rb +22 -0
- data/spec/lib/frozen/site/base_spec.rb +17 -0
- data/spec/lib/frozen/site/local_site_spec.rb +13 -0
- data/spec/lib/frozen/template/base_spec.rb +101 -0
- data/spec/lib/frozen/template/stylesheet_spec.rb +42 -0
- data/spec/spec_helper.rb +9 -0
- metadata +393 -0
@@ -0,0 +1,32 @@
|
|
1
|
+
// CSS cubic-bezier timing functions. Timing functions courtesy of jquery.easie (github.com/jaukia/easie)
|
2
|
+
// Timing functions are the same as demo'ed here: http://jqueryui.com/resources/demos/effect/easing.html
|
3
|
+
|
4
|
+
// EASE IN
|
5
|
+
$ease-in-quad: cubic-bezier(0.550, 0.085, 0.680, 0.530);
|
6
|
+
$ease-in-cubic: cubic-bezier(0.550, 0.055, 0.675, 0.190);
|
7
|
+
$ease-in-quart: cubic-bezier(0.895, 0.030, 0.685, 0.220);
|
8
|
+
$ease-in-quint: cubic-bezier(0.755, 0.050, 0.855, 0.060);
|
9
|
+
$ease-in-sine: cubic-bezier(0.470, 0.000, 0.745, 0.715);
|
10
|
+
$ease-in-expo: cubic-bezier(0.950, 0.050, 0.795, 0.035);
|
11
|
+
$ease-in-circ: cubic-bezier(0.600, 0.040, 0.980, 0.335);
|
12
|
+
$ease-in-back: cubic-bezier(0.600, -0.280, 0.735, 0.045);
|
13
|
+
|
14
|
+
// EASE OUT
|
15
|
+
$ease-out-quad: cubic-bezier(0.250, 0.460, 0.450, 0.940);
|
16
|
+
$ease-out-cubic: cubic-bezier(0.215, 0.610, 0.355, 1.000);
|
17
|
+
$ease-out-quart: cubic-bezier(0.165, 0.840, 0.440, 1.000);
|
18
|
+
$ease-out-quint: cubic-bezier(0.230, 1.000, 0.320, 1.000);
|
19
|
+
$ease-out-sine: cubic-bezier(0.390, 0.575, 0.565, 1.000);
|
20
|
+
$ease-out-expo: cubic-bezier(0.190, 1.000, 0.220, 1.000);
|
21
|
+
$ease-out-circ: cubic-bezier(0.075, 0.820, 0.165, 1.000);
|
22
|
+
$ease-out-back: cubic-bezier(0.175, 0.885, 0.320, 1.275);
|
23
|
+
|
24
|
+
// EASE IN OUT
|
25
|
+
$ease-in-out-quad: cubic-bezier(0.455, 0.030, 0.515, 0.955);
|
26
|
+
$ease-in-out-cubic: cubic-bezier(0.645, 0.045, 0.355, 1.000);
|
27
|
+
$ease-in-out-quart: cubic-bezier(0.770, 0.000, 0.175, 1.000);
|
28
|
+
$ease-in-out-quint: cubic-bezier(0.860, 0.000, 0.070, 1.000);
|
29
|
+
$ease-in-out-sine: cubic-bezier(0.445, 0.050, 0.550, 0.950);
|
30
|
+
$ease-in-out-expo: cubic-bezier(1.000, 0.000, 0.000, 1.000);
|
31
|
+
$ease-in-out-circ: cubic-bezier(0.785, 0.135, 0.150, 0.860);
|
32
|
+
$ease-in-out-back: cubic-bezier(0.680, -0.550, 0.265, 1.550);
|
@@ -0,0 +1,83 @@
|
|
1
|
+
@mixin triangle ($size, $color, $direction) {
|
2
|
+
height: 0;
|
3
|
+
width: 0;
|
4
|
+
|
5
|
+
$width: nth($size, 1);
|
6
|
+
$height: nth($size, length($size));
|
7
|
+
|
8
|
+
$foreground-color: nth($color, 1);
|
9
|
+
$background-color: if(length($color) == 2, nth($color, 2), transparent);
|
10
|
+
|
11
|
+
@if ($direction == up) or ($direction == down) or ($direction == right) or ($direction == left) {
|
12
|
+
|
13
|
+
$width: $width / 2;
|
14
|
+
$height: if(length($size) > 1, $height, $height/2);
|
15
|
+
|
16
|
+
@if $direction == up {
|
17
|
+
border-left: $width solid $background-color;
|
18
|
+
border-right: $width solid $background-color;
|
19
|
+
border-bottom: $height solid $foreground-color;
|
20
|
+
|
21
|
+
} @else if $direction == right {
|
22
|
+
border-top: $width solid $background-color;
|
23
|
+
border-bottom: $width solid $background-color;
|
24
|
+
border-left: $height solid $foreground-color;
|
25
|
+
|
26
|
+
} @else if $direction == down {
|
27
|
+
border-left: $width solid $background-color;
|
28
|
+
border-right: $width solid $background-color;
|
29
|
+
border-top: $height solid $foreground-color;
|
30
|
+
|
31
|
+
} @else if $direction == left {
|
32
|
+
border-top: $width solid $background-color;
|
33
|
+
border-bottom: $width solid $background-color;
|
34
|
+
border-right: $height solid $foreground-color;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
@else if ($direction == up-right) or ($direction == up-left) {
|
39
|
+
border-top: $height solid $foreground-color;
|
40
|
+
|
41
|
+
@if $direction == up-right {
|
42
|
+
border-left: $width solid $background-color;
|
43
|
+
|
44
|
+
} @else if $direction == up-left {
|
45
|
+
border-right: $width solid $background-color;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
@else if ($direction == down-right) or ($direction == down-left) {
|
50
|
+
border-bottom: $height solid $foreground-color;
|
51
|
+
|
52
|
+
@if $direction == down-right {
|
53
|
+
border-left: $width solid $background-color;
|
54
|
+
|
55
|
+
} @else if $direction == down-left {
|
56
|
+
border-right: $width solid $background-color;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
@else if ($direction == inset-up) {
|
61
|
+
border-width: $height $width;
|
62
|
+
border-style: solid;
|
63
|
+
border-color: $background-color $background-color $foreground-color;
|
64
|
+
}
|
65
|
+
|
66
|
+
@else if ($direction == inset-down) {
|
67
|
+
border-width: $height $width;
|
68
|
+
border-style: solid;
|
69
|
+
border-color: $foreground-color $background-color $background-color;
|
70
|
+
}
|
71
|
+
|
72
|
+
@else if ($direction == inset-right) {
|
73
|
+
border-width: $width $height;
|
74
|
+
border-style: solid;
|
75
|
+
border-color: $background-color $background-color $background-color $foreground-color;
|
76
|
+
}
|
77
|
+
|
78
|
+
@else if ($direction == inset-left) {
|
79
|
+
border-width: $width $height;
|
80
|
+
border-style: solid;
|
81
|
+
border-color: $background-color $foreground-color $background-color $background-color;
|
82
|
+
}
|
83
|
+
}
|
@@ -0,0 +1,52 @@
|
|
1
|
+
// http://www.w3.org/TR/css3-animations/#the-animation-name-property-
|
2
|
+
// Each of these mixins support comma separated lists of values, which allows different transitions for individual properties to be described in a single style rule. Each value in the list corresponds to the value at that same position in the other properties.
|
3
|
+
|
4
|
+
// Official animation shorthand property.
|
5
|
+
@mixin animation ($animations...) {
|
6
|
+
@include prefixer(animation, $animations, webkit moz spec);
|
7
|
+
}
|
8
|
+
|
9
|
+
// Individual Animation Properties
|
10
|
+
@mixin animation-name ($names...) {
|
11
|
+
@include prefixer(animation-name, $names, webkit moz spec);
|
12
|
+
}
|
13
|
+
|
14
|
+
|
15
|
+
@mixin animation-duration ($times...) {
|
16
|
+
@include prefixer(animation-duration, $times, webkit moz spec);
|
17
|
+
}
|
18
|
+
|
19
|
+
|
20
|
+
@mixin animation-timing-function ($motions...) {
|
21
|
+
// ease | linear | ease-in | ease-out | ease-in-out
|
22
|
+
@include prefixer(animation-timing-function, $motions, webkit moz spec);
|
23
|
+
}
|
24
|
+
|
25
|
+
|
26
|
+
@mixin animation-iteration-count ($values...) {
|
27
|
+
// infinite | <number>
|
28
|
+
@include prefixer(animation-iteration-count, $values, webkit moz spec);
|
29
|
+
}
|
30
|
+
|
31
|
+
|
32
|
+
@mixin animation-direction ($directions...) {
|
33
|
+
// normal | alternate
|
34
|
+
@include prefixer(animation-direction, $directions, webkit moz spec);
|
35
|
+
}
|
36
|
+
|
37
|
+
|
38
|
+
@mixin animation-play-state ($states...) {
|
39
|
+
// running | paused
|
40
|
+
@include prefixer(animation-play-state, $states, webkit moz spec);
|
41
|
+
}
|
42
|
+
|
43
|
+
|
44
|
+
@mixin animation-delay ($times...) {
|
45
|
+
@include prefixer(animation-delay, $times, webkit moz spec);
|
46
|
+
}
|
47
|
+
|
48
|
+
|
49
|
+
@mixin animation-fill-mode ($modes...) {
|
50
|
+
// none | forwards | backwards | both
|
51
|
+
@include prefixer(animation-fill-mode, $modes, webkit moz spec);
|
52
|
+
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
//************************************************************************//
|
2
|
+
// Backface-visibility mixin
|
3
|
+
//************************************************************************//
|
4
|
+
@mixin backface-visibility($visibility) {
|
5
|
+
@include prefixer(backface-visibility, $visibility, webkit spec);
|
6
|
+
}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
//************************************************************************//
|
2
|
+
// Background-image property for adding multiple background images with
|
3
|
+
// gradients, or for stringing multiple gradients together.
|
4
|
+
//************************************************************************//
|
5
|
+
|
6
|
+
@mixin background-image($images...) {
|
7
|
+
$webkit-images: ();
|
8
|
+
$spec-images: ();
|
9
|
+
|
10
|
+
@each $image in $images {
|
11
|
+
$webkit-image: ();
|
12
|
+
$spec-image: ();
|
13
|
+
|
14
|
+
@if (type-of($image) == string) {
|
15
|
+
$url-str: str-slice($image, 0, 3);
|
16
|
+
$gradient-type: str-slice($image, 0, 6);
|
17
|
+
|
18
|
+
@if $url-str == "url" {
|
19
|
+
$webkit-image: $image;
|
20
|
+
$spec-image: $image;
|
21
|
+
}
|
22
|
+
|
23
|
+
@else if $gradient-type == "linear" {
|
24
|
+
$gradients: _linear-gradient-parser($image);
|
25
|
+
$webkit-image: map-get($gradients, webkit-image);
|
26
|
+
$spec-image: map-get($gradients, spec-image);
|
27
|
+
}
|
28
|
+
|
29
|
+
@else if $gradient-type == "radial" {
|
30
|
+
$gradients: _radial-gradient-parser($image);
|
31
|
+
$webkit-image: map-get($gradients, webkit-image);
|
32
|
+
$spec-image: map-get($gradients, spec-image);
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
$webkit-images: append($webkit-images, $webkit-image, comma);
|
37
|
+
$spec-images: append($spec-images, $spec-image, comma);
|
38
|
+
}
|
39
|
+
|
40
|
+
background-image: $webkit-images;
|
41
|
+
background-image: $spec-images;
|
42
|
+
}
|
@@ -0,0 +1,55 @@
|
|
1
|
+
//************************************************************************//
|
2
|
+
// Background property for adding multiple backgrounds using shorthand
|
3
|
+
// notation.
|
4
|
+
//************************************************************************//
|
5
|
+
|
6
|
+
@mixin background($backgrounds...) {
|
7
|
+
$webkit-backgrounds: ();
|
8
|
+
$spec-backgrounds: ();
|
9
|
+
|
10
|
+
@each $background in $backgrounds {
|
11
|
+
$webkit-background: ();
|
12
|
+
$spec-background: ();
|
13
|
+
$background-type: type-of($background);
|
14
|
+
|
15
|
+
@if $background-type == string or $background-type == list {
|
16
|
+
$background-str: if($background-type == list, nth($background, 1), $background);
|
17
|
+
|
18
|
+
$url-str: str-slice($background-str, 0, 3);
|
19
|
+
$gradient-type: str-slice($background-str, 0, 6);
|
20
|
+
|
21
|
+
@if $url-str == "url" {
|
22
|
+
$webkit-background: $background;
|
23
|
+
$spec-background: $background;
|
24
|
+
}
|
25
|
+
|
26
|
+
@else if $gradient-type == "linear" {
|
27
|
+
$gradients: _linear-gradient-parser("#{$background}");
|
28
|
+
$webkit-background: map-get($gradients, webkit-image);
|
29
|
+
$spec-background: map-get($gradients, spec-image);
|
30
|
+
}
|
31
|
+
|
32
|
+
@else if $gradient-type == "radial" {
|
33
|
+
$gradients: _radial-gradient-parser("#{$background}");
|
34
|
+
$webkit-background: map-get($gradients, webkit-image);
|
35
|
+
$spec-background: map-get($gradients, spec-image);
|
36
|
+
}
|
37
|
+
|
38
|
+
@else {
|
39
|
+
$webkit-background: $background;
|
40
|
+
$spec-background: $background;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
@else {
|
45
|
+
$webkit-background: $background;
|
46
|
+
$spec-background: $background;
|
47
|
+
}
|
48
|
+
|
49
|
+
$webkit-backgrounds: append($webkit-backgrounds, $webkit-background, comma);
|
50
|
+
$spec-backgrounds: append($spec-backgrounds, $spec-background, comma);
|
51
|
+
}
|
52
|
+
|
53
|
+
background: $webkit-backgrounds;
|
54
|
+
background: $spec-backgrounds;
|
55
|
+
}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
@mixin border-image($borders...) {
|
2
|
+
$webkit-borders: ();
|
3
|
+
$spec-borders: ();
|
4
|
+
|
5
|
+
@each $border in $borders {
|
6
|
+
$webkit-border: ();
|
7
|
+
$spec-border: ();
|
8
|
+
$border-type: type-of($border);
|
9
|
+
|
10
|
+
@if $border-type == string or list {
|
11
|
+
$border-str: if($border-type == list, nth($border, 1), $border);
|
12
|
+
|
13
|
+
$url-str: str-slice($border-str, 0, 3);
|
14
|
+
$gradient-type: str-slice($border-str, 0, 6);
|
15
|
+
|
16
|
+
@if $url-str == "url" {
|
17
|
+
$webkit-border: $border;
|
18
|
+
$spec-border: $border;
|
19
|
+
}
|
20
|
+
|
21
|
+
@else if $gradient-type == "linear" {
|
22
|
+
$gradients: _linear-gradient-parser("#{$border}");
|
23
|
+
$webkit-border: map-get($gradients, webkit-image);
|
24
|
+
$spec-border: map-get($gradients, spec-image);
|
25
|
+
}
|
26
|
+
|
27
|
+
@else if $gradient-type == "radial" {
|
28
|
+
$gradients: _radial-gradient-parser("#{$border}");
|
29
|
+
$webkit-border: map-get($gradients, webkit-image);
|
30
|
+
$spec-border: map-get($gradients, spec-image);
|
31
|
+
}
|
32
|
+
|
33
|
+
@else {
|
34
|
+
$webkit-border: $border;
|
35
|
+
$spec-border: $border;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
@else {
|
40
|
+
$webkit-border: $border;
|
41
|
+
$spec-border: $border;
|
42
|
+
}
|
43
|
+
|
44
|
+
$webkit-borders: append($webkit-borders, $webkit-border, comma);
|
45
|
+
$spec-borders: append($spec-borders, $spec-border, comma);
|
46
|
+
}
|
47
|
+
|
48
|
+
-webkit-border-image: $webkit-borders;
|
49
|
+
border-image: $spec-borders;
|
50
|
+
border-style: solid;
|
51
|
+
}
|
52
|
+
|
53
|
+
//Examples:
|
54
|
+
// @include border-image(url("image.png"));
|
55
|
+
// @include border-image(url("image.png") 20 stretch);
|
56
|
+
// @include border-image(linear-gradient(45deg, orange, yellow));
|
57
|
+
// @include border-image(linear-gradient(45deg, orange, yellow) stretch);
|
58
|
+
// @include border-image(linear-gradient(45deg, orange, yellow) 20 30 40 50 stretch round);
|
59
|
+
// @include border-image(radial-gradient(top, cover, orange, yellow, orange));
|
@@ -0,0 +1,22 @@
|
|
1
|
+
// Border Radius (Shorthand)
|
2
|
+
// Provides a shorthand syntax to target and add border radii to both corners on one side of a box
|
3
|
+
|
4
|
+
@mixin border-top-radius($radii) {
|
5
|
+
border-top-left-radius: $radii;
|
6
|
+
border-top-right-radius: $radii;
|
7
|
+
}
|
8
|
+
|
9
|
+
@mixin border-right-radius($radii) {
|
10
|
+
border-bottom-right-radius: $radii;
|
11
|
+
border-top-right-radius: $radii;
|
12
|
+
}
|
13
|
+
|
14
|
+
@mixin border-bottom-radius($radii) {
|
15
|
+
border-bottom-left-radius: $radii;
|
16
|
+
border-bottom-right-radius: $radii;
|
17
|
+
}
|
18
|
+
|
19
|
+
@mixin border-left-radius($radii) {
|
20
|
+
border-bottom-left-radius: $radii;
|
21
|
+
border-top-left-radius: $radii;
|
22
|
+
}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
@mixin columns($arg: auto) {
|
2
|
+
// <column-count> || <column-width>
|
3
|
+
@include prefixer(columns, $arg, webkit moz spec);
|
4
|
+
}
|
5
|
+
|
6
|
+
@mixin column-count($int: auto) {
|
7
|
+
// auto || integer
|
8
|
+
@include prefixer(column-count, $int, webkit moz spec);
|
9
|
+
}
|
10
|
+
|
11
|
+
@mixin column-gap($length: normal) {
|
12
|
+
// normal || length
|
13
|
+
@include prefixer(column-gap, $length, webkit moz spec);
|
14
|
+
}
|
15
|
+
|
16
|
+
@mixin column-fill($arg: auto) {
|
17
|
+
// auto || length
|
18
|
+
@include prefixer(column-fill, $arg, webkit moz spec);
|
19
|
+
}
|
20
|
+
|
21
|
+
@mixin column-rule($arg) {
|
22
|
+
// <border-width> || <border-style> || <color>
|
23
|
+
@include prefixer(column-rule, $arg, webkit moz spec);
|
24
|
+
}
|
25
|
+
|
26
|
+
@mixin column-rule-color($color) {
|
27
|
+
@include prefixer(column-rule-color, $color, webkit moz spec);
|
28
|
+
}
|
29
|
+
|
30
|
+
@mixin column-rule-style($style: none) {
|
31
|
+
// none | hidden | dashed | dotted | double | groove | inset | inset | outset | ridge | solid
|
32
|
+
@include prefixer(column-rule-style, $style, webkit moz spec);
|
33
|
+
}
|
34
|
+
|
35
|
+
@mixin column-rule-width ($width: none) {
|
36
|
+
@include prefixer(column-rule-width, $width, webkit moz spec);
|
37
|
+
}
|
38
|
+
|
39
|
+
@mixin column-span($arg: none) {
|
40
|
+
// none || all
|
41
|
+
@include prefixer(column-span, $arg, webkit moz spec);
|
42
|
+
}
|
43
|
+
|
44
|
+
@mixin column-width($length: auto) {
|
45
|
+
// auto || length
|
46
|
+
@include prefixer(column-width, $length, webkit moz spec);
|
47
|
+
}
|
@@ -0,0 +1,320 @@
|
|
1
|
+
// CSS3 Flexible Box Model and property defaults
|
2
|
+
|
3
|
+
// Custom shorthand notation for flexbox
|
4
|
+
@mixin box($orient: inline-axis, $pack: start, $align: stretch) {
|
5
|
+
@include display-box;
|
6
|
+
@include box-orient($orient);
|
7
|
+
@include box-pack($pack);
|
8
|
+
@include box-align($align);
|
9
|
+
}
|
10
|
+
|
11
|
+
@mixin display-box {
|
12
|
+
display: -webkit-box;
|
13
|
+
display: -moz-box;
|
14
|
+
display: -ms-flexbox; // IE 10
|
15
|
+
display: box;
|
16
|
+
}
|
17
|
+
|
18
|
+
@mixin box-orient($orient: inline-axis) {
|
19
|
+
// horizontal|vertical|inline-axis|block-axis|inherit
|
20
|
+
@include prefixer(box-orient, $orient, webkit moz spec);
|
21
|
+
}
|
22
|
+
|
23
|
+
@mixin box-pack($pack: start) {
|
24
|
+
// start|end|center|justify
|
25
|
+
@include prefixer(box-pack, $pack, webkit moz spec);
|
26
|
+
-ms-flex-pack: $pack; // IE 10
|
27
|
+
}
|
28
|
+
|
29
|
+
@mixin box-align($align: stretch) {
|
30
|
+
// start|end|center|baseline|stretch
|
31
|
+
@include prefixer(box-align, $align, webkit moz spec);
|
32
|
+
-ms-flex-align: $align; // IE 10
|
33
|
+
}
|
34
|
+
|
35
|
+
@mixin box-direction($direction: normal) {
|
36
|
+
// normal|reverse|inherit
|
37
|
+
@include prefixer(box-direction, $direction, webkit moz spec);
|
38
|
+
-ms-flex-direction: $direction; // IE 10
|
39
|
+
}
|
40
|
+
|
41
|
+
@mixin box-lines($lines: single) {
|
42
|
+
// single|multiple
|
43
|
+
@include prefixer(box-lines, $lines, webkit moz spec);
|
44
|
+
}
|
45
|
+
|
46
|
+
@mixin box-ordinal-group($int: 1) {
|
47
|
+
@include prefixer(box-ordinal-group, $int, webkit moz spec);
|
48
|
+
-ms-flex-order: $int; // IE 10
|
49
|
+
}
|
50
|
+
|
51
|
+
@mixin box-flex($value: 0.0) {
|
52
|
+
@include prefixer(box-flex, $value, webkit moz spec);
|
53
|
+
-ms-flex: $value; // IE 10
|
54
|
+
}
|
55
|
+
|
56
|
+
@mixin box-flex-group($int: 1) {
|
57
|
+
@include prefixer(box-flex-group, $int, webkit moz spec);
|
58
|
+
}
|
59
|
+
|
60
|
+
// CSS3 Flexible Box Model and property defaults
|
61
|
+
// Unified attributes for 2009, 2011, and 2012 flavours.
|
62
|
+
|
63
|
+
// 2009 - display (box | inline-box)
|
64
|
+
// 2011 - display (flexbox | inline-flexbox)
|
65
|
+
// 2012 - display (flex | inline-flex)
|
66
|
+
@mixin display($value) {
|
67
|
+
// flex | inline-flex
|
68
|
+
@if $value == "flex" {
|
69
|
+
// 2009
|
70
|
+
display: -webkit-box;
|
71
|
+
display: -moz-box;
|
72
|
+
display: box;
|
73
|
+
|
74
|
+
// 2012
|
75
|
+
display: -webkit-flex;
|
76
|
+
display: -moz-flex;
|
77
|
+
display: -ms-flexbox; // 2011 (IE 10)
|
78
|
+
display: flex;
|
79
|
+
}
|
80
|
+
|
81
|
+
@else if $value == "inline-flex" {
|
82
|
+
display: -webkit-inline-box;
|
83
|
+
display: -moz-inline-box;
|
84
|
+
display: inline-box;
|
85
|
+
|
86
|
+
display: -webkit-inline-flex;
|
87
|
+
display: -moz-inline-flex;
|
88
|
+
display: -ms-inline-flexbox;
|
89
|
+
display: inline-flex;
|
90
|
+
}
|
91
|
+
|
92
|
+
@else {
|
93
|
+
display: $value;
|
94
|
+
}
|
95
|
+
}
|
96
|
+
|
97
|
+
// 2009 - box-flex (integer)
|
98
|
+
// 2011 - flex (decimal | width decimal)
|
99
|
+
// 2012 - flex (integer integer width)
|
100
|
+
@mixin flex($value) {
|
101
|
+
|
102
|
+
// Grab flex-grow for older browsers.
|
103
|
+
$flex-grow: nth($value, 1);
|
104
|
+
|
105
|
+
// 2009
|
106
|
+
@include prefixer(box-flex, $flex-grow, webkit moz spec);
|
107
|
+
|
108
|
+
// 2011 (IE 10), 2012
|
109
|
+
@include prefixer(flex, $value, webkit moz ms spec);
|
110
|
+
}
|
111
|
+
|
112
|
+
// 2009 - box-orient ( horizontal | vertical | inline-axis | block-axis)
|
113
|
+
// - box-direction (normal | reverse)
|
114
|
+
// 2011 - flex-direction (row | row-reverse | column | column-reverse)
|
115
|
+
// 2012 - flex-direction (row | row-reverse | column | column-reverse)
|
116
|
+
@mixin flex-direction($value: row) {
|
117
|
+
|
118
|
+
// Alt values.
|
119
|
+
$value-2009: $value;
|
120
|
+
$value-2011: $value;
|
121
|
+
$direction: "normal";
|
122
|
+
|
123
|
+
@if $value == row {
|
124
|
+
$value-2009: horizontal;
|
125
|
+
}
|
126
|
+
|
127
|
+
@else if $value == "row-reverse" {
|
128
|
+
$value-2009: horizontal;
|
129
|
+
$direction: reverse;
|
130
|
+
}
|
131
|
+
|
132
|
+
@else if $value == column {
|
133
|
+
$value-2009: vertical;
|
134
|
+
}
|
135
|
+
|
136
|
+
@else if $value == "column-reverse" {
|
137
|
+
$value-2009: vertical;
|
138
|
+
$direction: reverse;
|
139
|
+
}
|
140
|
+
|
141
|
+
// 2009
|
142
|
+
@include prefixer(box-orient, $value-2009, webkit moz spec);
|
143
|
+
@if $direction == "reverse" {
|
144
|
+
@include prefixer(box-direction, $direction, webkit moz spec);
|
145
|
+
}
|
146
|
+
|
147
|
+
// 2012
|
148
|
+
@include prefixer(flex-direction, $value, webkit moz spec);
|
149
|
+
|
150
|
+
// 2011 (IE 10)
|
151
|
+
-ms-flex-direction: $value;
|
152
|
+
}
|
153
|
+
|
154
|
+
// 2009 - box-lines (single | multiple)
|
155
|
+
// 2011 - flex-wrap (nowrap | wrap | wrap-reverse)
|
156
|
+
// 2012 - flex-wrap (nowrap | wrap | wrap-reverse)
|
157
|
+
@mixin flex-wrap($value: nowrap) {
|
158
|
+
|
159
|
+
// Alt values
|
160
|
+
$alt-value: $value;
|
161
|
+
@if $value == nowrap {
|
162
|
+
$alt-value: single;
|
163
|
+
}
|
164
|
+
|
165
|
+
@else if $value == wrap {
|
166
|
+
$alt-value: multiple;
|
167
|
+
}
|
168
|
+
|
169
|
+
@else if $value == "wrap-reverse" {
|
170
|
+
$alt-value: multiple;
|
171
|
+
}
|
172
|
+
|
173
|
+
@include prefixer(box-lines, $alt-value, webkit moz spec);
|
174
|
+
@include prefixer(flex-wrap, $value, webkit moz ms spec);
|
175
|
+
}
|
176
|
+
|
177
|
+
// 2009 - TODO: parse values into flex-direction/flex-wrap
|
178
|
+
// 2011 - TODO: parse values into flex-direction/flex-wrap
|
179
|
+
// 2012 - flex-flow (flex-direction || flex-wrap)
|
180
|
+
@mixin flex-flow($value) {
|
181
|
+
@include prefixer(flex-flow, $value, webkit moz spec);
|
182
|
+
}
|
183
|
+
|
184
|
+
// 2009 - box-ordinal-group (integer)
|
185
|
+
// 2011 - flex-order (integer)
|
186
|
+
// 2012 - order (integer)
|
187
|
+
@mixin order($int: 0) {
|
188
|
+
// 2009
|
189
|
+
@include prefixer(box-ordinal-group, $int, webkit moz spec);
|
190
|
+
|
191
|
+
// 2012
|
192
|
+
@include prefixer(order, $int, webkit moz spec);
|
193
|
+
|
194
|
+
// 2011 (IE 10)
|
195
|
+
-ms-flex-order: $int;
|
196
|
+
}
|
197
|
+
|
198
|
+
// 2012 - flex-grow (number)
|
199
|
+
@mixin flex-grow($number: 0) {
|
200
|
+
@include prefixer(flex-grow, $number, webkit moz spec);
|
201
|
+
-ms-flex-positive: $number;
|
202
|
+
}
|
203
|
+
|
204
|
+
// 2012 - flex-shrink (number)
|
205
|
+
@mixin flex-shrink($number: 1) {
|
206
|
+
@include prefixer(flex-shrink, $number, webkit moz spec);
|
207
|
+
-ms-flex-negative: $number;
|
208
|
+
}
|
209
|
+
|
210
|
+
// 2012 - flex-basis (number)
|
211
|
+
@mixin flex-basis($width: auto) {
|
212
|
+
@include prefixer(flex-basis, $width, webkit moz spec);
|
213
|
+
-ms-flex-preferred-size: $width;
|
214
|
+
}
|
215
|
+
|
216
|
+
// 2009 - box-pack (start | end | center | justify)
|
217
|
+
// 2011 - flex-pack (start | end | center | justify)
|
218
|
+
// 2012 - justify-content (flex-start | flex-end | center | space-between | space-around)
|
219
|
+
@mixin justify-content($value: flex-start) {
|
220
|
+
|
221
|
+
// Alt values.
|
222
|
+
$alt-value: $value;
|
223
|
+
@if $value == "flex-start" {
|
224
|
+
$alt-value: start;
|
225
|
+
}
|
226
|
+
|
227
|
+
@else if $value == "flex-end" {
|
228
|
+
$alt-value: end;
|
229
|
+
}
|
230
|
+
|
231
|
+
@else if $value == "space-between" {
|
232
|
+
$alt-value: justify;
|
233
|
+
}
|
234
|
+
|
235
|
+
@else if $value == "space-around" {
|
236
|
+
$alt-value: distribute;
|
237
|
+
}
|
238
|
+
|
239
|
+
// 2009
|
240
|
+
@include prefixer(box-pack, $alt-value, webkit moz spec);
|
241
|
+
|
242
|
+
// 2012
|
243
|
+
@include prefixer(justify-content, $value, webkit moz ms o spec);
|
244
|
+
|
245
|
+
// 2011 (IE 10)
|
246
|
+
-ms-flex-pack: $alt-value;
|
247
|
+
}
|
248
|
+
|
249
|
+
// 2009 - box-align (start | end | center | baseline | stretch)
|
250
|
+
// 2011 - flex-align (start | end | center | baseline | stretch)
|
251
|
+
// 2012 - align-items (flex-start | flex-end | center | baseline | stretch)
|
252
|
+
@mixin align-items($value: stretch) {
|
253
|
+
|
254
|
+
$alt-value: $value;
|
255
|
+
|
256
|
+
@if $value == "flex-start" {
|
257
|
+
$alt-value: start;
|
258
|
+
}
|
259
|
+
|
260
|
+
@else if $value == "flex-end" {
|
261
|
+
$alt-value: end;
|
262
|
+
}
|
263
|
+
|
264
|
+
// 2009
|
265
|
+
@include prefixer(box-align, $alt-value, webkit moz spec);
|
266
|
+
|
267
|
+
// 2012
|
268
|
+
@include prefixer(align-items, $value, webkit moz ms o spec);
|
269
|
+
|
270
|
+
// 2011 (IE 10)
|
271
|
+
-ms-flex-align: $alt-value;
|
272
|
+
}
|
273
|
+
|
274
|
+
// 2011 - flex-item-align (auto | start | end | center | baseline | stretch)
|
275
|
+
// 2012 - align-self (auto | flex-start | flex-end | center | baseline | stretch)
|
276
|
+
@mixin align-self($value: auto) {
|
277
|
+
|
278
|
+
$value-2011: $value;
|
279
|
+
@if $value == "flex-start" {
|
280
|
+
$value-2011: start;
|
281
|
+
}
|
282
|
+
|
283
|
+
@else if $value == "flex-end" {
|
284
|
+
$value-2011: end;
|
285
|
+
}
|
286
|
+
|
287
|
+
// 2012
|
288
|
+
@include prefixer(align-self, $value, webkit moz spec);
|
289
|
+
|
290
|
+
// 2011 (IE 10)
|
291
|
+
-ms-flex-item-align: $value-2011;
|
292
|
+
}
|
293
|
+
|
294
|
+
// 2011 - flex-line-pack (start | end | center | justify | distribute | stretch)
|
295
|
+
// 2012 - align-content (flex-start | flex-end | center | space-between | space-around | stretch)
|
296
|
+
@mixin align-content($value: stretch) {
|
297
|
+
|
298
|
+
$value-2011: $value;
|
299
|
+
@if $value == "flex-start" {
|
300
|
+
$value-2011: start;
|
301
|
+
}
|
302
|
+
|
303
|
+
@else if $value == "flex-end" {
|
304
|
+
$value-2011: end;
|
305
|
+
}
|
306
|
+
|
307
|
+
@else if $value == "space-between" {
|
308
|
+
$value-2011: justify;
|
309
|
+
}
|
310
|
+
|
311
|
+
@else if $value == "space-around" {
|
312
|
+
$value-2011: distribute;
|
313
|
+
}
|
314
|
+
|
315
|
+
// 2012
|
316
|
+
@include prefixer(align-content, $value, webkit moz spec);
|
317
|
+
|
318
|
+
// 2011 (IE 10)
|
319
|
+
-ms-flex-line-pack: $value-2011;
|
320
|
+
}
|