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,86 @@
|
|
1
|
+
// Bourbon 4.1.0
|
2
|
+
// http://bourbon.io
|
3
|
+
// Copyright 2011-2014 thoughtbot, inc.
|
4
|
+
// MIT License
|
5
|
+
|
6
|
+
// Settings
|
7
|
+
@import "settings/prefixer";
|
8
|
+
@import "settings/px-to-em";
|
9
|
+
@import "settings/asset-pipeline";
|
10
|
+
|
11
|
+
// Custom Helpers
|
12
|
+
@import "helpers/convert-units";
|
13
|
+
@import "helpers/font-source-declaration";
|
14
|
+
@import "helpers/gradient-positions-parser";
|
15
|
+
@import "helpers/is-num";
|
16
|
+
@import "helpers/linear-angle-parser";
|
17
|
+
@import "helpers/linear-gradient-parser";
|
18
|
+
@import "helpers/linear-positions-parser";
|
19
|
+
@import "helpers/linear-side-corner-parser";
|
20
|
+
@import "helpers/radial-arg-parser";
|
21
|
+
@import "helpers/radial-positions-parser";
|
22
|
+
@import "helpers/radial-gradient-parser";
|
23
|
+
@import "helpers/render-gradients";
|
24
|
+
@import "helpers/shape-size-stripper";
|
25
|
+
@import "helpers/str-to-num";
|
26
|
+
|
27
|
+
// Custom Functions
|
28
|
+
@import "functions/assign";
|
29
|
+
@import "functions/color-lightness";
|
30
|
+
@import "functions/contains";
|
31
|
+
@import "functions/is-length";
|
32
|
+
@import "functions/is-size";
|
33
|
+
@import "functions/px-to-em";
|
34
|
+
@import "functions/px-to-rem";
|
35
|
+
@import "functions/strip-units";
|
36
|
+
@import "functions/tint-shade";
|
37
|
+
@import "functions/transition-property-name";
|
38
|
+
@import "functions/unpack";
|
39
|
+
@import "functions/modular-scale";
|
40
|
+
|
41
|
+
// CSS3 Mixins
|
42
|
+
@import "css3/animation";
|
43
|
+
@import "css3/appearance";
|
44
|
+
@import "css3/backface-visibility";
|
45
|
+
@import "css3/background";
|
46
|
+
@import "css3/background-image";
|
47
|
+
@import "css3/border-image";
|
48
|
+
@import "css3/border-radius";
|
49
|
+
@import "css3/box-sizing";
|
50
|
+
@import "css3/calc";
|
51
|
+
@import "css3/columns";
|
52
|
+
@import "css3/filter";
|
53
|
+
@import "css3/flex-box";
|
54
|
+
@import "css3/font-face";
|
55
|
+
@import "css3/font-feature-settings";
|
56
|
+
@import "css3/hidpi-media-query";
|
57
|
+
@import "css3/hyphens";
|
58
|
+
@import "css3/image-rendering";
|
59
|
+
@import "css3/keyframes";
|
60
|
+
@import "css3/linear-gradient";
|
61
|
+
@import "css3/perspective";
|
62
|
+
@import "css3/placeholder";
|
63
|
+
@import "css3/radial-gradient";
|
64
|
+
@import "css3/selection";
|
65
|
+
@import "css3/text-decoration";
|
66
|
+
@import "css3/transform";
|
67
|
+
@import "css3/transition";
|
68
|
+
@import "css3/user-select";
|
69
|
+
|
70
|
+
// Addons & other mixins
|
71
|
+
@import "addons/clearfix";
|
72
|
+
@import "addons/directional-values";
|
73
|
+
@import "addons/ellipsis";
|
74
|
+
@import "addons/font-family";
|
75
|
+
@import "addons/hide-text";
|
76
|
+
@import "addons/html5-input-types";
|
77
|
+
@import "addons/position";
|
78
|
+
@import "addons/prefixer";
|
79
|
+
@import "addons/retina-image";
|
80
|
+
@import "addons/size";
|
81
|
+
@import "addons/timing-functions";
|
82
|
+
@import "addons/triangle";
|
83
|
+
@import "addons/word-wrap";
|
84
|
+
|
85
|
+
// Soon to be deprecated Mixins
|
86
|
+
@import "bourbon-deprecated-upcoming";
|
@@ -0,0 +1,18 @@
|
|
1
|
+
// The clearfix mixin provides an easy way to contain floats
|
2
|
+
//
|
3
|
+
// Example usage:
|
4
|
+
// .wrapper {
|
5
|
+
// @include clearfix;
|
6
|
+
// }
|
7
|
+
|
8
|
+
@mixin clearfix {
|
9
|
+
&::after {
|
10
|
+
clear: both;
|
11
|
+
content: "";
|
12
|
+
display: table;
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
// Acknowledgements:
|
17
|
+
// Thierry Koblentz, cssmojo
|
18
|
+
// http://goo.gl/AQWvyH
|
@@ -0,0 +1,111 @@
|
|
1
|
+
// directional-property mixins are shorthands
|
2
|
+
// for writing properties like the following
|
3
|
+
//
|
4
|
+
// @include margin(null 0 10px);
|
5
|
+
// ------
|
6
|
+
// margin-right: 0;
|
7
|
+
// margin-bottom: 10px;
|
8
|
+
// margin-left: 0;
|
9
|
+
//
|
10
|
+
// - or -
|
11
|
+
//
|
12
|
+
// @include border-style(dotted null);
|
13
|
+
// ------
|
14
|
+
// border-top-style: dotted;
|
15
|
+
// border-bottom-style: dotted;
|
16
|
+
//
|
17
|
+
// ------
|
18
|
+
//
|
19
|
+
// Note: You can also use false instead of null
|
20
|
+
|
21
|
+
@function collapse-directionals($vals) {
|
22
|
+
$output: null;
|
23
|
+
|
24
|
+
$A: nth( $vals, 1 );
|
25
|
+
$B: if( length($vals) < 2, $A, nth($vals, 2));
|
26
|
+
$C: if( length($vals) < 3, $A, nth($vals, 3));
|
27
|
+
$D: if( length($vals) < 2, $A, nth($vals, if( length($vals) < 4, 2, 4) ));
|
28
|
+
|
29
|
+
@if $A == 0 { $A: 0 }
|
30
|
+
@if $B == 0 { $B: 0 }
|
31
|
+
@if $C == 0 { $C: 0 }
|
32
|
+
@if $D == 0 { $D: 0 }
|
33
|
+
|
34
|
+
@if $A == $B and $A == $C and $A == $D { $output: $A }
|
35
|
+
@else if $A == $C and $B == $D { $output: $A $B }
|
36
|
+
@else if $B == $D { $output: $A $B $C }
|
37
|
+
@else { $output: $A $B $C $D }
|
38
|
+
|
39
|
+
@return $output;
|
40
|
+
}
|
41
|
+
|
42
|
+
@function contains-falsy($list) {
|
43
|
+
@each $item in $list {
|
44
|
+
@if not $item {
|
45
|
+
@return true;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
@return false;
|
50
|
+
}
|
51
|
+
|
52
|
+
@mixin directional-property($pre, $suf, $vals) {
|
53
|
+
// Property Names
|
54
|
+
$top: $pre + "-top" + if($suf, "-#{$suf}", "");
|
55
|
+
$bottom: $pre + "-bottom" + if($suf, "-#{$suf}", "");
|
56
|
+
$left: $pre + "-left" + if($suf, "-#{$suf}", "");
|
57
|
+
$right: $pre + "-right" + if($suf, "-#{$suf}", "");
|
58
|
+
$all: $pre + if($suf, "-#{$suf}", "");
|
59
|
+
|
60
|
+
$vals: collapse-directionals($vals);
|
61
|
+
|
62
|
+
@if contains-falsy($vals) {
|
63
|
+
@if nth($vals, 1) { #{$top}: nth($vals, 1); }
|
64
|
+
|
65
|
+
@if length($vals) == 1 {
|
66
|
+
@if nth($vals, 1) { #{$right}: nth($vals, 1); }
|
67
|
+
} @else {
|
68
|
+
@if nth($vals, 2) { #{$right}: nth($vals, 2); }
|
69
|
+
}
|
70
|
+
|
71
|
+
// prop: top/bottom right/left
|
72
|
+
@if length($vals) == 2 {
|
73
|
+
@if nth($vals, 1) { #{$bottom}: nth($vals, 1); }
|
74
|
+
@if nth($vals, 2) { #{$left}: nth($vals, 2); }
|
75
|
+
|
76
|
+
// prop: top right/left bottom
|
77
|
+
} @else if length($vals) == 3 {
|
78
|
+
@if nth($vals, 3) { #{$bottom}: nth($vals, 3); }
|
79
|
+
@if nth($vals, 2) { #{$left}: nth($vals, 2); }
|
80
|
+
|
81
|
+
// prop: top right bottom left
|
82
|
+
} @else if length($vals) == 4 {
|
83
|
+
@if nth($vals, 3) { #{$bottom}: nth($vals, 3); }
|
84
|
+
@if nth($vals, 4) { #{$left}: nth($vals, 4); }
|
85
|
+
}
|
86
|
+
|
87
|
+
// prop: top/right/bottom/left
|
88
|
+
} @else {
|
89
|
+
#{$all}: $vals;
|
90
|
+
}
|
91
|
+
}
|
92
|
+
|
93
|
+
@mixin margin($vals...) {
|
94
|
+
@include directional-property(margin, false, $vals...);
|
95
|
+
}
|
96
|
+
|
97
|
+
@mixin padding($vals...) {
|
98
|
+
@include directional-property(padding, false, $vals...);
|
99
|
+
}
|
100
|
+
|
101
|
+
@mixin border-style($vals...) {
|
102
|
+
@include directional-property(border, style, $vals...);
|
103
|
+
}
|
104
|
+
|
105
|
+
@mixin border-color($vals...) {
|
106
|
+
@include directional-property(border, color, $vals...);
|
107
|
+
}
|
108
|
+
|
109
|
+
@mixin border-width($vals...) {
|
110
|
+
@include directional-property(border, width, $vals...);
|
111
|
+
}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
$georgia: Georgia, Cambria, "Times New Roman", Times, serif;
|
2
|
+
$helvetica: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
|
3
|
+
$lucida-grande: "Lucida Grande", Tahoma, Verdana, Arial, sans-serif;
|
4
|
+
$monospace: "Bitstream Vera Sans Mono", Consolas, Courier, monospace;
|
5
|
+
$verdana: Verdana, Geneva, sans-serif;
|
@@ -0,0 +1,90 @@
|
|
1
|
+
//************************************************************************//
|
2
|
+
// Generate a variable ($all-text-inputs) with a list of all html5
|
3
|
+
// input types that have a text-based input, excluding textarea.
|
4
|
+
// http://diveintohtml5.org/forms.html
|
5
|
+
//************************************************************************//
|
6
|
+
$inputs-list: 'input[type="email"]',
|
7
|
+
'input[type="number"]',
|
8
|
+
'input[type="password"]',
|
9
|
+
'input[type="search"]',
|
10
|
+
'input[type="tel"]',
|
11
|
+
'input[type="text"]',
|
12
|
+
'input[type="url"]',
|
13
|
+
|
14
|
+
// Webkit & Gecko may change the display of these in the future
|
15
|
+
'input[type="color"]',
|
16
|
+
'input[type="date"]',
|
17
|
+
'input[type="datetime"]',
|
18
|
+
'input[type="datetime-local"]',
|
19
|
+
'input[type="month"]',
|
20
|
+
'input[type="time"]',
|
21
|
+
'input[type="week"]';
|
22
|
+
|
23
|
+
// Bare inputs
|
24
|
+
//************************************************************************//
|
25
|
+
$all-text-inputs: assign-inputs($inputs-list);
|
26
|
+
|
27
|
+
// Hover Pseudo-class
|
28
|
+
//************************************************************************//
|
29
|
+
$all-text-inputs-hover: assign-inputs($inputs-list, hover);
|
30
|
+
|
31
|
+
// Focus Pseudo-class
|
32
|
+
//************************************************************************//
|
33
|
+
$all-text-inputs-focus: assign-inputs($inputs-list, focus);
|
34
|
+
|
35
|
+
// Active Pseudo-class
|
36
|
+
//************************************************************************//
|
37
|
+
$all-text-inputs-active: assign-inputs($inputs-list, active);
|
38
|
+
|
39
|
+
|
40
|
+
// You must use interpolation on the variable:
|
41
|
+
// #{$all-text-inputs}
|
42
|
+
// #{$all-text-inputs-hover}
|
43
|
+
// #{$all-text-inputs-focus}
|
44
|
+
// #{$all-text-inputs-active}
|
45
|
+
|
46
|
+
// Example
|
47
|
+
//************************************************************************//
|
48
|
+
// #{$all-text-inputs}, textarea {
|
49
|
+
// border: 1px solid red;
|
50
|
+
// }
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
//************************************************************************//
|
55
|
+
// Generate a variable ($all-button-inputs) with a list of all html5
|
56
|
+
// input types that have a button-based input, excluding button.
|
57
|
+
//************************************************************************//
|
58
|
+
$inputs-button-list: 'input[type="button"]',
|
59
|
+
'input[type="reset"]',
|
60
|
+
'input[type="submit"]';
|
61
|
+
|
62
|
+
// Bare inputs
|
63
|
+
//************************************************************************//
|
64
|
+
$all-button-inputs: assign-inputs($inputs-button-list);
|
65
|
+
|
66
|
+
// Hover Pseudo-class
|
67
|
+
//************************************************************************//
|
68
|
+
$all-button-inputs-hover: assign-inputs($inputs-button-list, hover);
|
69
|
+
|
70
|
+
// Focus Pseudo-class
|
71
|
+
//************************************************************************//
|
72
|
+
$all-button-inputs-focus: assign-inputs($inputs-button-list, focus);
|
73
|
+
|
74
|
+
// Active Pseudo-class
|
75
|
+
//************************************************************************//
|
76
|
+
$all-button-inputs-active: assign-inputs($inputs-button-list, active);
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
// You must use interpolation on the variable:
|
81
|
+
// #{$all-button-inputs}
|
82
|
+
// #{$all-button-inputs-hover}
|
83
|
+
// #{$all-button-inputs-focus}
|
84
|
+
// #{$all-button-inputs-active}
|
85
|
+
|
86
|
+
// Example
|
87
|
+
//************************************************************************//
|
88
|
+
// #{$all-button-inputs}, button {
|
89
|
+
// border: 1px solid red;
|
90
|
+
// }
|
@@ -0,0 +1,26 @@
|
|
1
|
+
// Set element positioning in a single statement
|
2
|
+
|
3
|
+
@mixin position($position: relative, $coordinates: null null null null) {
|
4
|
+
|
5
|
+
@if type-of($position) == list {
|
6
|
+
$coordinates: $position;
|
7
|
+
$position: relative;
|
8
|
+
}
|
9
|
+
|
10
|
+
$coordinates: unpack($coordinates);
|
11
|
+
|
12
|
+
$offsets: (
|
13
|
+
top: nth($coordinates, 1),
|
14
|
+
right: nth($coordinates, 2),
|
15
|
+
bottom: nth($coordinates, 3),
|
16
|
+
left: nth($coordinates, 4)
|
17
|
+
);
|
18
|
+
|
19
|
+
position: $position;
|
20
|
+
|
21
|
+
@each $offset, $value in $offsets {
|
22
|
+
@if is-length($value) {
|
23
|
+
#{$offset}: $value;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
//************************************************************************//
|
2
|
+
// Example: @include prefixer(border-radius, $radii, webkit ms spec);
|
3
|
+
//************************************************************************//
|
4
|
+
// Variables located in /settings/_prefixer.scss
|
5
|
+
|
6
|
+
@mixin prefixer ($property, $value, $prefixes) {
|
7
|
+
@each $prefix in $prefixes {
|
8
|
+
@if $prefix == webkit {
|
9
|
+
@if $prefix-for-webkit {
|
10
|
+
-webkit-#{$property}: $value;
|
11
|
+
}
|
12
|
+
}
|
13
|
+
@else if $prefix == moz {
|
14
|
+
@if $prefix-for-mozilla {
|
15
|
+
-moz-#{$property}: $value;
|
16
|
+
}
|
17
|
+
}
|
18
|
+
@else if $prefix == ms {
|
19
|
+
@if $prefix-for-microsoft {
|
20
|
+
-ms-#{$property}: $value;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
@else if $prefix == o {
|
24
|
+
@if $prefix-for-opera {
|
25
|
+
-o-#{$property}: $value;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
@else if $prefix == spec {
|
29
|
+
@if $prefix-for-spec {
|
30
|
+
#{$property}: $value;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
@else {
|
34
|
+
@warn "Unrecognized prefix: #{$prefix}";
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
@mixin disable-prefix-for-all() {
|
40
|
+
$prefix-for-webkit: false !global;
|
41
|
+
$prefix-for-mozilla: false !global;
|
42
|
+
$prefix-for-microsoft: false !global;
|
43
|
+
$prefix-for-opera: false !global;
|
44
|
+
$prefix-for-spec: false !global;
|
45
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
@mixin retina-image($filename, $background-size, $extension: png, $retina-filename: null, $retina-suffix: _2x, $asset-pipeline: $asset-pipeline) {
|
2
|
+
@if $asset-pipeline {
|
3
|
+
background-image: image-url("#{$filename}.#{$extension}");
|
4
|
+
}
|
5
|
+
@else {
|
6
|
+
background-image: url("#{$filename}.#{$extension}");
|
7
|
+
}
|
8
|
+
|
9
|
+
@include hidpi {
|
10
|
+
@if $asset-pipeline {
|
11
|
+
@if $retina-filename {
|
12
|
+
background-image: image-url("#{$retina-filename}.#{$extension}");
|
13
|
+
}
|
14
|
+
@else {
|
15
|
+
background-image: image-url("#{$filename}#{$retina-suffix}.#{$extension}");
|
16
|
+
}
|
17
|
+
}
|
18
|
+
|
19
|
+
@else {
|
20
|
+
@if $retina-filename {
|
21
|
+
background-image: url("#{$retina-filename}.#{$extension}");
|
22
|
+
}
|
23
|
+
@else {
|
24
|
+
background-image: url("#{$filename}#{$retina-suffix}.#{$extension}");
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
background-size: $background-size;
|
29
|
+
|
30
|
+
}
|
31
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
// Set `width` and `height` in a single statement
|
2
|
+
|
3
|
+
@mixin size($value) {
|
4
|
+
$width: nth($value, 1);
|
5
|
+
$height: $width;
|
6
|
+
|
7
|
+
@if length($value) > 1 {
|
8
|
+
$height: nth($value, 2);
|
9
|
+
}
|
10
|
+
|
11
|
+
@if is-size($height) {
|
12
|
+
height: $height;
|
13
|
+
}
|
14
|
+
|
15
|
+
@else {
|
16
|
+
@warn "`#{$height}` is not a valid length for the `$height` parameter in the `size` mixin.";
|
17
|
+
}
|
18
|
+
|
19
|
+
@if is-size($width) {
|
20
|
+
width: $width;
|
21
|
+
}
|
22
|
+
|
23
|
+
@else {
|
24
|
+
@warn "`#{$width}` is not a valid length for the `$width` parameter in the `size` mixin.";
|
25
|
+
}
|
26
|
+
}
|