styler-sass 0.1.4 → 0.1.5.alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +3 -0
- data/CHANGELOG.md +17 -2
- data/README.md +1 -2
- data/bin/styler +13 -3
- data/{app/assets/images/.keep → features/support/env.rb} +0 -0
- data/lib/styler/generator.rb +8 -1
- data/lib/styler/version.rb +1 -1
- data/lib/styler.rb +2 -6
- data/spec/bourbon/addons/border_color_spec.rb +51 -0
- data/spec/bourbon/addons/border_radius_spec.rb +25 -0
- data/spec/bourbon/addons/border_style_spec.rb +51 -0
- data/spec/bourbon/addons/border_width_spec.rb +51 -0
- data/spec/bourbon/addons/buttons_spec.rb +53 -0
- data/spec/bourbon/addons/clearfix_spec.rb +18 -0
- data/spec/bourbon/addons/ellipsis_spec.rb +20 -0
- data/spec/bourbon/addons/font_stacks_spec.rb +25 -0
- data/spec/bourbon/addons/hide_text_spec.rb +17 -0
- data/spec/bourbon/addons/margin_spec.rb +51 -0
- data/spec/bourbon/addons/padding_spec.rb +51 -0
- data/spec/bourbon/addons/position_spec.rb +67 -0
- data/spec/bourbon/addons/retina_image_spec.rb +57 -0
- data/spec/bourbon/addons/size_spec.rb +31 -0
- data/spec/bourbon/addons/text_inputs_spec.rb +65 -0
- data/spec/bourbon/addons/triangle_spec.rb +32 -0
- data/spec/bourbon/addons/word_wrap_spec.rb +29 -0
- data/spec/bourbon/css3/font_face_spec.rb +45 -0
- data/spec/bourbon/css3/hidpi_media_query_spec.rb +23 -0
- data/spec/bourbon/functions/assign_inputs_spec.rb +50 -0
- data/spec/bourbon/functions/contains_spec.rb +27 -0
- data/spec/bourbon/functions/is_length_spec.rb +49 -0
- data/spec/bourbon/functions/is_light_spec.rb +37 -0
- data/spec/bourbon/functions/is_number_spec.rb +43 -0
- data/spec/bourbon/functions/is_size_spec.rb +43 -0
- data/spec/bourbon/functions/modular_scale_spec.rb +43 -0
- data/spec/bourbon/functions/px_to_em_spec.rb +31 -0
- data/spec/bourbon/functions/px_to_rem_spec.rb +25 -0
- data/spec/bourbon/functions/shade_spec.rb +31 -0
- data/spec/bourbon/functions/strip_units_spec.rb +31 -0
- data/spec/bourbon/functions/tint_spec.rb +31 -0
- data/spec/bourbon/functions/unpack_spec.rb +32 -0
- data/spec/bourbon/helpers/convert_units_spec.rb +31 -0
- data/spec/bourbon/helpers/directional_values_spec.rb +39 -0
- data/spec/bourbon/helpers/font_source_declaration_spec.rb +29 -0
- data/spec/bourbon/helpers/str_to_num_spec.rb +25 -0
- data/spec/fixtures/_setup.scss +1 -0
- data/spec/fixtures/addons/border-color.scss +26 -0
- data/spec/fixtures/addons/border-radius.scss +17 -0
- data/spec/fixtures/addons/border-style.scss +21 -0
- data/spec/fixtures/addons/border-width.scss +21 -0
- data/spec/fixtures/addons/buttons.scss +17 -0
- data/spec/fixtures/addons/clearfix.scss +5 -0
- data/spec/fixtures/addons/ellipsis.scss +5 -0
- data/spec/fixtures/addons/font-stacks.scss +21 -0
- data/spec/fixtures/addons/hide-text.scss +5 -0
- data/spec/fixtures/addons/margin.scss +21 -0
- data/spec/fixtures/addons/padding.scss +21 -0
- data/spec/fixtures/addons/position.scss +25 -0
- data/spec/fixtures/addons/retina-image.scss +21 -0
- data/spec/fixtures/addons/size.scss +13 -0
- data/spec/fixtures/addons/text-inputs.scss +17 -0
- data/spec/fixtures/addons/triangle.scss +9 -0
- data/spec/fixtures/addons/word-wrap.scss +9 -0
- data/spec/fixtures/css3/font-face.scss +6 -0
- data/spec/fixtures/css3/hidpi-media-query.scss +13 -0
- data/spec/fixtures/functions/assign-inputs.scss +19 -0
- data/spec/fixtures/functions/contains.scss +28 -0
- data/spec/fixtures/functions/is-length.scss +35 -0
- data/spec/fixtures/functions/is-light.scss +29 -0
- data/spec/fixtures/functions/is-number.scss +31 -0
- data/spec/fixtures/functions/is-size.scss +31 -0
- data/spec/fixtures/functions/modular-scale.scss +29 -0
- data/spec/fixtures/functions/px-to-em.scss +17 -0
- data/spec/fixtures/functions/px-to-rem.scss +15 -0
- data/spec/fixtures/functions/shade.scss +17 -0
- data/spec/fixtures/functions/strip-units.scss +17 -0
- data/spec/fixtures/functions/tint.scss +17 -0
- data/spec/fixtures/functions/unpack.scss +17 -0
- data/spec/fixtures/helpers/convert-units.scss +17 -0
- data/spec/fixtures/helpers/directional-values.scss +29 -0
- data/spec/fixtures/helpers/font-source-declaration.scss +10 -0
- data/spec/fixtures/helpers/str-to-num.scss +13 -0
- data/spec/spec_helper.rb +22 -0
- data/spec/styler_spec.rb.bak +11 -0
- data/spec/support/matchers/be_contained_in.rb +10 -0
- data/spec/support/matchers/have_rule.rb +35 -0
- data/spec/support/matchers/have_ruleset.rb +20 -0
- data/spec/support/matchers/have_value.rb +17 -0
- data/spec/support/parser_support.rb +16 -0
- data/spec/support/sass_support.rb +10 -0
- data/styler.gemspec +10 -5
- data/{app/assets/fonts/awesome → vendor/assets/fonts}/FontAwesome.otf +0 -0
- data/{app/assets/fonts/awesome → vendor/assets/fonts}/fontawesome-webfont.eot +0 -0
- data/{app/assets/fonts/awesome → vendor/assets/fonts}/fontawesome-webfont.svg +0 -0
- data/{app/assets/fonts/awesome → vendor/assets/fonts}/fontawesome-webfont.ttf +0 -0
- data/{app/assets/fonts/awesome → vendor/assets/fonts}/fontawesome-webfont.woff +0 -0
- data/{app/assets/fonts/awesome → vendor/assets/fonts}/fontawesome-webfont.woff2 +0 -0
- data/{app/assets/fonts/bootstrap → vendor/assets/fonts}/glyphicons-halflings-regular.eot +0 -0
- data/{app/assets/fonts/bootstrap → vendor/assets/fonts}/glyphicons-halflings-regular.svg +0 -0
- data/{app/assets/fonts/bootstrap → vendor/assets/fonts}/glyphicons-halflings-regular.ttf +0 -0
- data/{app/assets/fonts/bootstrap → vendor/assets/fonts}/glyphicons-halflings-regular.woff +0 -0
- data/{app/assets/fonts/bootstrap → vendor/assets/fonts}/glyphicons-halflings-regular.woff2 +0 -0
- data/{app → vendor}/assets/javascripts/bootstrap/affix.js +0 -0
- data/{app → vendor}/assets/javascripts/bootstrap/alert.js +0 -0
- data/{app → vendor}/assets/javascripts/bootstrap/button.js +0 -0
- data/{app → vendor}/assets/javascripts/bootstrap/carousel.js +0 -0
- data/{app → vendor}/assets/javascripts/bootstrap/collapse.js +0 -0
- data/{app → vendor}/assets/javascripts/bootstrap/dropdown.js +0 -0
- data/{app → vendor}/assets/javascripts/bootstrap/modal.js +0 -0
- data/{app → vendor}/assets/javascripts/bootstrap/popover.js +0 -0
- data/{app → vendor}/assets/javascripts/bootstrap/scrollspy.js +0 -0
- data/{app → vendor}/assets/javascripts/bootstrap/tab.js +0 -0
- data/{app → vendor}/assets/javascripts/bootstrap/tooltip.js +0 -0
- data/{app → vendor}/assets/javascripts/bootstrap/transition.js +0 -0
- data/{app → vendor}/assets/javascripts/bootstrap-sprockets.js +0 -0
- data/{app → vendor}/assets/javascripts/bootstrap.js +0 -0
- data/{app → vendor}/assets/javascripts/bootstrap.min.js +0 -0
- metadata +198 -36
- data/bin/console +0 -14
- data/bin/setup +0 -7
@@ -0,0 +1,32 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe "unpack" do
|
4
|
+
before(:all) do
|
5
|
+
ParserSupport.parse_file("functions/unpack")
|
6
|
+
end
|
7
|
+
|
8
|
+
context "single" do
|
9
|
+
it "unpacks four identical measurements" do
|
10
|
+
expect(".single").to have_rule("padding: 10px 10px 10px 10px")
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
context "double" do
|
15
|
+
it "unpacks identical measurements for top and bottom,
|
16
|
+
and different identical measurements for left and right" do
|
17
|
+
expect(".double").to have_rule("padding: 1em 2em 1em 2em")
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
context "triple" do
|
22
|
+
it "unpacks identical measurements for left and right" do
|
23
|
+
expect(".triple").to have_rule("padding: 10px 20px 0 20px")
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
context "quadruple" do
|
28
|
+
it "unpacks four distict measurements" do
|
29
|
+
expect(".quadruple").to have_rule("padding: 0 calc(1em + 10px) 20px 50px")
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe "convert-units" do
|
4
|
+
before(:all) do
|
5
|
+
ParserSupport.parse_file("helpers/convert-units")
|
6
|
+
end
|
7
|
+
|
8
|
+
context "called with integer and px" do
|
9
|
+
it "is converted to px length" do
|
10
|
+
expect(".px").to have_rule("height: 12px")
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
context "called with integer and pt" do
|
15
|
+
it "is converted to points" do
|
16
|
+
expect(".pt").to have_rule("font-size: 16pt")
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
context "called with integer and deg" do
|
21
|
+
it "is converted to degrees" do
|
22
|
+
expect(".deg").to have_rule("transform: rotate(180deg)")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
context "called with string and px" do
|
27
|
+
it "returns false" do
|
28
|
+
expect(".string").to have_rule("padding-top: false")
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe "directional-values" do
|
4
|
+
before(:all) do
|
5
|
+
ParserSupport.parse_file("helpers/directional-values")
|
6
|
+
end
|
7
|
+
|
8
|
+
context "collapse-directionals" do
|
9
|
+
it "returns four distinct lengths unaltered" do
|
10
|
+
expect(".four").to have_rule("padding: 10px 20px 30px 40px")
|
11
|
+
end
|
12
|
+
|
13
|
+
it "returns collapsed horizontal lengths" do
|
14
|
+
expect(".three").to have_rule("padding: 5px 10px 5px 20px")
|
15
|
+
end
|
16
|
+
|
17
|
+
it "returns collapsed vertical and horizontal lengths" do
|
18
|
+
expect(".two").to have_rule("padding: 50px 100px")
|
19
|
+
end
|
20
|
+
|
21
|
+
it "returns collapsed lengths when all match" do
|
22
|
+
expect(".one").to have_rule("padding: 10px")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
context "directional-property" do
|
27
|
+
it "returns property and values with four distinct lengths" do
|
28
|
+
expect(".border-all").to have_rule("border-width: 2px 5px 8px 12px")
|
29
|
+
end
|
30
|
+
|
31
|
+
it "returns property and value with one length" do
|
32
|
+
expect(".border-top").to have_rule("border-top: 10px")
|
33
|
+
end
|
34
|
+
|
35
|
+
it "returns property and value with vertical and horizontal values" do
|
36
|
+
expect(".border-color").to have_rule("border-color: #ffffff #000000")
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe "font-source-declaration" do
|
4
|
+
before(:all) do
|
5
|
+
ParserSupport.parse_file("helpers/font-source-declaration")
|
6
|
+
end
|
7
|
+
|
8
|
+
context "called with pipeline" do
|
9
|
+
it "returns pipeline path" do
|
10
|
+
rule = 'src: font-url("b.eot?#iefix") format("embedded-opentype"), ' +
|
11
|
+
'font-url("b.woff2") format("woff2"), ' +
|
12
|
+
'font-url("b.woff") format("woff"), ' +
|
13
|
+
'font-url("b.ttf") format("truetype"), ' +
|
14
|
+
'font-url("b.svg#a") format("svg")'
|
15
|
+
expect(".has-pipeline").to have_rule(rule)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
context "called with no pipeline" do
|
20
|
+
it "does not return pipeline path" do
|
21
|
+
rule = 'src: url("b.eot?#iefix") format("embedded-opentype"), ' +
|
22
|
+
'url("b.woff2") format("woff2"), ' +
|
23
|
+
'url("b.woff") format("woff"), ' +
|
24
|
+
'url("b.ttf") format("truetype"), ' +
|
25
|
+
'url("b.svg#a") format("svg")'
|
26
|
+
expect(".no-pipeline").to have_rule(rule)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe "str-to-num" do
|
4
|
+
before(:all) do
|
5
|
+
ParserSupport.parse_file("helpers/str-to-num")
|
6
|
+
end
|
7
|
+
|
8
|
+
context "called with integer string" do
|
9
|
+
it "is converted to integer" do
|
10
|
+
expect(".string-to-integer").to have_rule("height: 10")
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
context "called with px string" do
|
15
|
+
it "is converted to px" do
|
16
|
+
expect(".string-to-px").to have_rule("height: 15px")
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
context "called with negative px string" do
|
21
|
+
it "is converted to negative px" do
|
22
|
+
expect(".string-to-negative-px").to have_rule("height: -25px")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
@import "app/assets/stylesheets/bourbon";
|
@@ -0,0 +1,26 @@
|
|
1
|
+
@import "setup";
|
2
|
+
|
3
|
+
$red: #ff0000;
|
4
|
+
$blue: #00ff00;
|
5
|
+
$green: #0000ff;
|
6
|
+
$purple: #ffff00;
|
7
|
+
|
8
|
+
.border-color-all {
|
9
|
+
@include border-color($red);
|
10
|
+
}
|
11
|
+
|
12
|
+
.border-color-alternate {
|
13
|
+
@include border-color($blue $green);
|
14
|
+
}
|
15
|
+
|
16
|
+
.border-color-implied-left {
|
17
|
+
@include border-color($red $blue $green);
|
18
|
+
}
|
19
|
+
|
20
|
+
.border-color-explicit {
|
21
|
+
@include border-color($green $blue $red $purple);
|
22
|
+
}
|
23
|
+
|
24
|
+
.border-color-false-third {
|
25
|
+
@include border-color($blue $purple null $green);
|
26
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
@import "setup";
|
2
|
+
|
3
|
+
.border-top-radius {
|
4
|
+
@include border-top-radius(1em);
|
5
|
+
}
|
6
|
+
|
7
|
+
.border-left-radius {
|
8
|
+
@include border-left-radius(2em);
|
9
|
+
}
|
10
|
+
|
11
|
+
.border-right-radius {
|
12
|
+
@include border-right-radius(3em);
|
13
|
+
}
|
14
|
+
|
15
|
+
.border-bottom-radius {
|
16
|
+
@include border-bottom-radius(4em);
|
17
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
@import "setup";
|
2
|
+
|
3
|
+
.border-style-all {
|
4
|
+
@include border-style(solid);
|
5
|
+
}
|
6
|
+
|
7
|
+
.border-style-alternate {
|
8
|
+
@include border-style(dotted dashed);
|
9
|
+
}
|
10
|
+
|
11
|
+
.border-style-implied-left {
|
12
|
+
@include border-style(dashed double solid);
|
13
|
+
}
|
14
|
+
|
15
|
+
.border-style-explicit {
|
16
|
+
@include border-style(dotted groove ridge none);
|
17
|
+
}
|
18
|
+
|
19
|
+
.border-style-false-third {
|
20
|
+
@include border-style(inset none null double);
|
21
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
@import "setup";
|
2
|
+
|
3
|
+
.border-width-all {
|
4
|
+
@include border-width(1px);
|
5
|
+
}
|
6
|
+
|
7
|
+
.border-width-alternate {
|
8
|
+
@include border-width(2px 3px);
|
9
|
+
}
|
10
|
+
|
11
|
+
.border-width-implied-left {
|
12
|
+
@include border-width(4px 5px 6px);
|
13
|
+
}
|
14
|
+
|
15
|
+
.border-width-explicit {
|
16
|
+
@include border-width(7px 8px 9px 10px);
|
17
|
+
}
|
18
|
+
|
19
|
+
.border-width-false-third {
|
20
|
+
@include border-width(11px 12px null 13px);
|
21
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
@import "setup";
|
2
|
+
|
3
|
+
.all-buttons {
|
4
|
+
content: $all-buttons;
|
5
|
+
}
|
6
|
+
|
7
|
+
.all-buttons-active {
|
8
|
+
content: $all-buttons-active;
|
9
|
+
}
|
10
|
+
|
11
|
+
.all-buttons-focus {
|
12
|
+
content: $all-buttons-focus;
|
13
|
+
}
|
14
|
+
|
15
|
+
.all-buttons-hover {
|
16
|
+
content: $all-buttons-hover;
|
17
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
@import "setup";
|
2
|
+
|
3
|
+
.georgia {
|
4
|
+
content: $georgia;
|
5
|
+
}
|
6
|
+
|
7
|
+
.helvetica {
|
8
|
+
content: $helvetica;
|
9
|
+
}
|
10
|
+
|
11
|
+
.lucida-grande {
|
12
|
+
content: $lucida-grande;
|
13
|
+
}
|
14
|
+
|
15
|
+
.monospace {
|
16
|
+
content: $monospace;
|
17
|
+
}
|
18
|
+
|
19
|
+
.verdana {
|
20
|
+
content: $verdana;
|
21
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
@import "setup";
|
2
|
+
|
3
|
+
.margin-all {
|
4
|
+
@include margin(1px);
|
5
|
+
}
|
6
|
+
|
7
|
+
.margin-alternate {
|
8
|
+
@include margin(2px 3px);
|
9
|
+
}
|
10
|
+
|
11
|
+
.margin-implied-left {
|
12
|
+
@include margin(4px 5px 6px);
|
13
|
+
}
|
14
|
+
|
15
|
+
.margin-explicit {
|
16
|
+
@include margin(7px 8px 9px 10px);
|
17
|
+
}
|
18
|
+
|
19
|
+
.margin-false-third {
|
20
|
+
@include margin(11px 12px null 13px);
|
21
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
@import "setup";
|
2
|
+
|
3
|
+
.padding-all {
|
4
|
+
@include padding(1px);
|
5
|
+
}
|
6
|
+
|
7
|
+
.padding-alternate {
|
8
|
+
@include padding(2px 3px);
|
9
|
+
}
|
10
|
+
|
11
|
+
.padding-implied-left {
|
12
|
+
@include padding(4px 5px 6px);
|
13
|
+
}
|
14
|
+
|
15
|
+
.padding-explicit {
|
16
|
+
@include padding(7px 8px 9px 10px);
|
17
|
+
}
|
18
|
+
|
19
|
+
.padding-false-third {
|
20
|
+
@include padding(11px 12px null 13px);
|
21
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
@import "setup";
|
2
|
+
|
3
|
+
.position-only-type {
|
4
|
+
@include position(relative);
|
5
|
+
}
|
6
|
+
|
7
|
+
.position-all {
|
8
|
+
@include position(fixed, 1em);
|
9
|
+
}
|
10
|
+
|
11
|
+
.position-alternate {
|
12
|
+
@include position(absolute, 2px 3px);
|
13
|
+
}
|
14
|
+
|
15
|
+
.position-implied-left {
|
16
|
+
@include position(relative, 4px 5px 6px);
|
17
|
+
}
|
18
|
+
|
19
|
+
.position-explicit {
|
20
|
+
@include position(fixed, 7px 8px 9px 10px);
|
21
|
+
}
|
22
|
+
|
23
|
+
.position-false-third {
|
24
|
+
@include position(static, 11px null null 13px);
|
25
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
@import "setup";
|
2
|
+
|
3
|
+
.retina-default {
|
4
|
+
@include retina-image("retina-default", "320px 480px");
|
5
|
+
}
|
6
|
+
|
7
|
+
.retina-extension {
|
8
|
+
@include retina-image("retina-extension", "20px 40px", "jpg");
|
9
|
+
}
|
10
|
+
|
11
|
+
.retina-custom-name {
|
12
|
+
@include retina-image("default", "10px 5px", "png", "custom");
|
13
|
+
}
|
14
|
+
|
15
|
+
.retina-custom-suffix {
|
16
|
+
@include retina-image("default", "3em 2em", "png", false, "@2x");
|
17
|
+
}
|
18
|
+
|
19
|
+
.retina-pipeline {
|
20
|
+
@include retina-image("default", "100px 20px", "jpg", null, null, false);
|
21
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
@import "setup";
|
2
|
+
|
3
|
+
.all-text-inputs {
|
4
|
+
content: $all-text-inputs;
|
5
|
+
}
|
6
|
+
|
7
|
+
.all-text-inputs-active {
|
8
|
+
content: $all-text-inputs-active;
|
9
|
+
}
|
10
|
+
|
11
|
+
.all-text-inputs-focus {
|
12
|
+
content: $all-text-inputs-focus;
|
13
|
+
}
|
14
|
+
|
15
|
+
.all-text-inputs-hover {
|
16
|
+
content: $all-text-inputs-hover;
|
17
|
+
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
@import "setup";
|
2
|
+
|
3
|
+
@include font-face("Helvetica", "/fonts");
|
4
|
+
@include font-face("Verdana", "/assets/fonts", "bold", "italic");
|
5
|
+
@include font-face("Georgia", "/assets", "normal", "normal", false);
|
6
|
+
@include font-face("Arial", "/", "normal", "normal", false, woff2 svg);
|
@@ -0,0 +1,19 @@
|
|
1
|
+
@import "setup";
|
2
|
+
|
3
|
+
#{assign-inputs($text-inputs-list)} {
|
4
|
+
color: #ff0000;
|
5
|
+
}
|
6
|
+
|
7
|
+
#{assign-inputs($text-inputs-list, active)} {
|
8
|
+
color: #00ff00;
|
9
|
+
}
|
10
|
+
|
11
|
+
#{assign-inputs($text-inputs-list)},
|
12
|
+
select {
|
13
|
+
color: #0000ff;
|
14
|
+
}
|
15
|
+
|
16
|
+
input[type="file"],
|
17
|
+
#{assign-inputs($text-inputs-list)} {
|
18
|
+
color: #ff00ff;
|
19
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
@import "setup";
|
2
|
+
|
3
|
+
$single: "apple";
|
4
|
+
$multiple: "pineapple", "banana", "cumquat";
|
5
|
+
|
6
|
+
@mixin color-contains($list, $values) {
|
7
|
+
@if contains($list, $values) {
|
8
|
+
color: #fff;
|
9
|
+
} @else {
|
10
|
+
color: #000;
|
11
|
+
}
|
12
|
+
}
|
13
|
+
|
14
|
+
.single {
|
15
|
+
@include color-contains($single, "apple");
|
16
|
+
}
|
17
|
+
|
18
|
+
.single-missing {
|
19
|
+
@include color-contains($single, "pear");
|
20
|
+
}
|
21
|
+
|
22
|
+
.multiple {
|
23
|
+
@include color-contains($multiple, "banana");
|
24
|
+
}
|
25
|
+
|
26
|
+
.multiple-missing {
|
27
|
+
@include color-contains($multiple, "strawberry");
|
28
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
@import "setup";
|
2
|
+
|
3
|
+
@mixin color-length($value) {
|
4
|
+
@if is-length($value) {
|
5
|
+
color: #fff;
|
6
|
+
}
|
7
|
+
}
|
8
|
+
|
9
|
+
.integer {
|
10
|
+
@include color-length(1);
|
11
|
+
}
|
12
|
+
|
13
|
+
.pixels {
|
14
|
+
@include color-length(10px);
|
15
|
+
}
|
16
|
+
|
17
|
+
.ems {
|
18
|
+
@include color-length(10em);
|
19
|
+
}
|
20
|
+
|
21
|
+
.percent {
|
22
|
+
@include color-length(10%);
|
23
|
+
}
|
24
|
+
|
25
|
+
.calc {
|
26
|
+
@include color-length(calc(2em - 5px));
|
27
|
+
}
|
28
|
+
|
29
|
+
.string {
|
30
|
+
@include color-length("stringy");
|
31
|
+
}
|
32
|
+
|
33
|
+
.null {
|
34
|
+
@include color-length(null);
|
35
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
@import "setup";
|
2
|
+
|
3
|
+
@mixin reverse-color($color) {
|
4
|
+
@if is-light($color) {
|
5
|
+
color: #000;
|
6
|
+
} @else {
|
7
|
+
color: #fff;
|
8
|
+
}
|
9
|
+
}
|
10
|
+
|
11
|
+
.pink {
|
12
|
+
@include reverse-color(#ffcccc);
|
13
|
+
}
|
14
|
+
|
15
|
+
.sky {
|
16
|
+
@include reverse-color(#aaeeff);
|
17
|
+
}
|
18
|
+
|
19
|
+
.medium-gray {
|
20
|
+
@include reverse-color(#888);
|
21
|
+
}
|
22
|
+
|
23
|
+
.charcoal {
|
24
|
+
@include reverse-color(#333);
|
25
|
+
}
|
26
|
+
|
27
|
+
.translucent {
|
28
|
+
@include reverse-color(rgba(#fff, 0.1));
|
29
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
@import "setup";
|
2
|
+
|
3
|
+
@mixin line-height($number) {
|
4
|
+
@if is-number($number) {
|
5
|
+
line-height: $number;
|
6
|
+
}
|
7
|
+
}
|
8
|
+
|
9
|
+
.integer {
|
10
|
+
@include line-height(1);
|
11
|
+
}
|
12
|
+
|
13
|
+
.px {
|
14
|
+
@include line-height(2px);
|
15
|
+
}
|
16
|
+
|
17
|
+
.em {
|
18
|
+
@include line-height(3em);
|
19
|
+
}
|
20
|
+
|
21
|
+
.rem {
|
22
|
+
@include line-height(4rem);
|
23
|
+
}
|
24
|
+
|
25
|
+
.percent {
|
26
|
+
@include line-height(5%);
|
27
|
+
}
|
28
|
+
|
29
|
+
.string {
|
30
|
+
@include line-height("stringy");
|
31
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
@import "setup";
|
2
|
+
|
3
|
+
@mixin size-margin($size) {
|
4
|
+
@if is-size($size) {
|
5
|
+
margin-top: $size;
|
6
|
+
}
|
7
|
+
}
|
8
|
+
|
9
|
+
.integer {
|
10
|
+
@include size-margin(1);
|
11
|
+
}
|
12
|
+
|
13
|
+
.px {
|
14
|
+
@include size-margin(2px);
|
15
|
+
}
|
16
|
+
|
17
|
+
.em {
|
18
|
+
@include size-margin(3em);
|
19
|
+
}
|
20
|
+
|
21
|
+
.rem {
|
22
|
+
@include size-margin(4rem);
|
23
|
+
}
|
24
|
+
|
25
|
+
.percent {
|
26
|
+
@include size-margin(5%);
|
27
|
+
}
|
28
|
+
|
29
|
+
.string {
|
30
|
+
@include size-margin("stringy");
|
31
|
+
}
|