bourbon 5.0.0.alpha.0 → 5.0.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/.npmignore +1 -1
- data/.scss-lint.yml +223 -2
- data/Gemfile +1 -1
- data/LICENSE.md +1 -1
- data/NEWS.md +71 -0
- data/README.md +43 -24
- data/RELEASING.md +27 -0
- data/Rakefile +0 -2
- data/bin/bourbon +1 -2
- data/bourbon.gemspec +33 -24
- data/bower.json +3 -2
- data/circle.yml +7 -0
- data/core/_bourbon.scss +10 -11
- data/core/bourbon/addons/_border-color.scss +14 -15
- data/core/bourbon/addons/_border-radius.scss +17 -18
- data/core/bourbon/addons/_border-style.scss +13 -14
- data/core/bourbon/addons/_border-width.scss +13 -14
- data/core/bourbon/addons/_buttons.scss +48 -49
- data/core/bourbon/addons/_clearfix.scss +10 -10
- data/core/bourbon/addons/_contrast-switch.scss +47 -0
- data/core/bourbon/addons/_ellipsis.scss +22 -15
- data/core/bourbon/addons/_font-face.scss +60 -0
- data/core/bourbon/addons/_font-stacks.scss +77 -9
- data/core/bourbon/addons/_hide-text.scss +10 -9
- data/core/bourbon/addons/_hide-visually.scss +65 -0
- data/core/bourbon/addons/_margin.scss +14 -15
- data/core/bourbon/addons/_modular-scale.scss +113 -0
- data/core/bourbon/addons/_padding.scss +14 -15
- data/core/bourbon/addons/_position.scss +24 -19
- data/core/bourbon/addons/_prefixer.scss +20 -15
- data/core/bourbon/addons/_size.scss +24 -20
- data/core/bourbon/addons/_text-inputs.scss +106 -104
- data/core/bourbon/addons/_timing-functions.scss +2 -2
- data/core/bourbon/addons/_word-wrap.scss +10 -10
- data/core/bourbon/functions/_assign-inputs.scss +11 -7
- data/core/bourbon/functions/_collapse-directionals.scss +51 -0
- data/core/bourbon/functions/_contains-falsy.scss +5 -5
- data/core/bourbon/functions/_contains.scss +11 -7
- data/core/bourbon/{helpers → functions}/_font-source-declaration.scss +26 -17
- data/core/bourbon/functions/_is-length.scss +3 -3
- data/core/bourbon/functions/_is-light.scss +2 -2
- data/core/bourbon/functions/_is-number.scss +5 -5
- data/core/bourbon/functions/_is-size.scss +7 -7
- data/core/bourbon/functions/_shade.scss +14 -10
- data/core/bourbon/functions/_strip-unit.scss +3 -3
- data/core/bourbon/functions/_tint.scss +14 -10
- data/core/bourbon/functions/_unpack.scss +10 -10
- data/core/bourbon/helpers/_directional-values.scss +19 -59
- data/core/bourbon/settings/_bourbon-get-setting.scss +14 -0
- data/core/bourbon/settings/_scales.scss +1 -1
- data/core/bourbon/settings/_settings.scss +33 -0
- data/eyeglass-exports.js +7 -0
- data/features/step_definitions/bourbon_steps.rb +6 -1
- data/index.js +2 -2
- data/lib/bourbon.rb +2 -10
- data/lib/bourbon/generator.rb +8 -8
- data/lib/bourbon/version.rb +1 -1
- data/package.json +6 -1
- data/spec/bourbon/addons/border_color_spec.rb +7 -7
- data/spec/bourbon/addons/buttons_spec.rb +3 -3
- data/spec/bourbon/addons/clearfix_spec.rb +2 -2
- data/spec/bourbon/addons/contrast_switch_spec.rb +23 -0
- data/spec/bourbon/{css3 → addons}/font_face_spec_1.rb +0 -2
- data/spec/bourbon/addons/font_face_spec_2.rb +21 -0
- data/spec/bourbon/{css3 → addons}/font_face_spec_3.rb +2 -4
- data/spec/bourbon/{css3 → addons}/font_face_spec_4.rb +0 -2
- data/spec/bourbon/addons/font_stacks_spec.rb +6 -1
- data/spec/bourbon/addons/hide_visually_spec.rb +35 -0
- data/spec/bourbon/{functions → addons}/modular_scale_spec.rb +6 -6
- data/spec/bourbon/addons/text_inputs_spec.rb +24 -14
- data/spec/bourbon/functions/assign_inputs_spec.rb +6 -6
- data/spec/bourbon/functions/collapse_directionals.rb +25 -0
- data/spec/bourbon/{helpers → functions}/font_source_declaration_spec.rb +1 -1
- data/spec/bourbon/helpers/directional_values_spec.rb +1 -19
- data/spec/bourbon/settings/bourbon_get_setting_spec.rb +31 -0
- data/spec/fixtures/addons/border-color.scss +4 -4
- data/spec/fixtures/addons/contrast-switch.scss +9 -0
- data/spec/fixtures/addons/font-face-1.scss +6 -0
- data/spec/fixtures/addons/font-face-2.scss +10 -0
- data/spec/fixtures/addons/font-face-3.scss +8 -0
- data/spec/fixtures/addons/font-face-4.scss +7 -0
- data/spec/fixtures/addons/font-stacks.scss +13 -9
- data/spec/fixtures/addons/hide-visually.scss +9 -0
- data/spec/fixtures/{functions → addons}/modular-scale.scss +0 -0
- data/spec/fixtures/addons/text-inputs.scss +4 -0
- data/spec/fixtures/functions/assign-inputs.scss +8 -8
- data/spec/fixtures/functions/collapse-directionals.scss +17 -0
- data/spec/fixtures/functions/contains.scss +1 -1
- data/spec/fixtures/functions/font-source-declaration.scss +11 -0
- data/spec/fixtures/functions/is-length.scss +1 -1
- data/spec/fixtures/functions/is-light.scss +2 -2
- data/spec/fixtures/functions/is-number.scss +1 -1
- data/spec/fixtures/functions/is-size.scss +1 -1
- data/spec/fixtures/functions/shade.scss +1 -1
- data/spec/fixtures/functions/tint.scss +1 -1
- data/spec/fixtures/functions/unpack.scss +4 -4
- data/spec/fixtures/helpers/directional-values.scss +3 -19
- data/spec/fixtures/settings/bourbon-get-setting.scss +16 -0
- data/spec/support/matchers/have_value.rb +1 -1
- metadata +88 -78
- data/.travis.yml +0 -8
- data/core/bourbon/_bourbon-deprecated.scss +0 -1
- data/core/bourbon/css3/_font-face.scss +0 -50
- data/core/bourbon/functions/_modular-scale.scss +0 -101
- data/core/bourbon/settings/_asset-pipeline.scss +0 -7
- data/core/bourbon/settings/_global-font-file-formats.scss +0 -12
- data/core/bourbon/settings/_modular-scale.scss +0 -17
- data/spec/bourbon/css3/font_face_spec_2.rb +0 -19
- data/spec/fixtures/css3/font-face-1.scss +0 -3
- data/spec/fixtures/css3/font-face-2.scss +0 -3
- data/spec/fixtures/css3/font-face-3.scss +0 -3
- data/spec/fixtures/css3/font-face-4.scss +0 -3
- data/spec/fixtures/helpers/font-source-declaration.scss +0 -10
- data/spec/support/matchers/be_contained_in.rb +0 -10
@@ -0,0 +1,14 @@
|
|
1
|
+
@charset "UTF-8";
|
2
|
+
|
3
|
+
/// Return a Bourbon setting.
|
4
|
+
///
|
5
|
+
/// @argument {string} $setting
|
6
|
+
///
|
7
|
+
/// @example scss
|
8
|
+
/// _bourbon-get-setting(rails-asset-pipeline)
|
9
|
+
///
|
10
|
+
/// @access private
|
11
|
+
|
12
|
+
@function _bourbon-get-setting($setting) {
|
13
|
+
@return map-get(map-merge($_bourbon-defaults, $bourbon), $setting);
|
14
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
@charset "UTF-8";
|
2
|
+
|
3
|
+
/// Default Bourbon configuration settings.
|
4
|
+
///
|
5
|
+
/// @type map
|
6
|
+
///
|
7
|
+
/// @property {list} global-font-file-formats [("ttf", "woff2", "woff")]
|
8
|
+
/// Global font file formats for the `font-face` mixin.
|
9
|
+
///
|
10
|
+
/// @property {number (with unit)} modular-scale-base [1em]
|
11
|
+
/// Global base value for the `modular-scale` function.
|
12
|
+
///
|
13
|
+
/// @property {number (unitless)} modular-scale-ratio [$major-third (1.25)]
|
14
|
+
/// Global base ratio for the `modular-scale` function.
|
15
|
+
///
|
16
|
+
/// @property {boolean} rails-asset-pipeline [false]
|
17
|
+
/// Enable or disable the `$asset-pipeline` variable for all functions that
|
18
|
+
/// accept it.
|
19
|
+
///
|
20
|
+
/// @access private
|
21
|
+
|
22
|
+
$_bourbon-defaults: (
|
23
|
+
"global-font-file-formats": ("ttf", "woff2", "woff"),
|
24
|
+
"modular-scale-base": 1em,
|
25
|
+
"modular-scale-ratio": $major-third,
|
26
|
+
"rails-asset-pipeline": false,
|
27
|
+
);
|
28
|
+
|
29
|
+
/// User overrides of Bourbon configuration settings
|
30
|
+
///
|
31
|
+
/// @type map
|
32
|
+
|
33
|
+
$bourbon: () !default;
|
data/eyeglass-exports.js
ADDED
@@ -6,7 +6,12 @@ Given /^I install bourbon to "([^"]*)"$/ do |path|
|
|
6
6
|
end
|
7
7
|
|
8
8
|
Then /^the sass directories(?: with "([^"]+)" prefix)? should have been generated$/ do |prefix|
|
9
|
-
sass_directories = [
|
9
|
+
sass_directories = [
|
10
|
+
"bourbon/addons",
|
11
|
+
"bourbon/helpers",
|
12
|
+
"bourbon/functions",
|
13
|
+
"bourbon/settings",
|
14
|
+
]
|
10
15
|
sass_directories.map!{ |directory| bourbon_path(prefix, directory) }
|
11
16
|
check_directory_presence(sass_directories, true)
|
12
17
|
end
|
data/index.js
CHANGED
data/lib/bourbon.rb
CHANGED
@@ -1,17 +1,9 @@
|
|
1
|
-
# CodeKit needs relative paths
|
2
|
-
dir = File.dirname(__FILE__)
|
3
|
-
$LOAD_PATH.unshift dir unless $LOAD_PATH.include?(dir)
|
4
|
-
|
5
1
|
require "bourbon/generator"
|
6
2
|
|
7
|
-
unless defined?(Sass)
|
8
|
-
require 'sass'
|
9
|
-
end
|
10
|
-
|
11
3
|
module Bourbon
|
12
4
|
if defined?(Rails) && defined?(Rails::Engine)
|
13
5
|
class Engine < ::Rails::Engine
|
14
|
-
require
|
6
|
+
require "bourbon/engine"
|
15
7
|
end
|
16
8
|
|
17
9
|
module Rails
|
@@ -22,7 +14,7 @@ module Bourbon
|
|
22
14
|
end
|
23
15
|
end
|
24
16
|
else
|
25
|
-
bourbon_path = File.expand_path("../../
|
17
|
+
bourbon_path = File.expand_path("../../core", __FILE__)
|
26
18
|
ENV["SASS_PATH"] = [ENV["SASS_PATH"], bourbon_path].compact.join(File::PATH_SEPARATOR)
|
27
19
|
end
|
28
20
|
end
|
data/lib/bourbon/generator.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
require
|
1
|
+
require "bourbon/version"
|
2
2
|
require "fileutils"
|
3
|
-
require
|
3
|
+
require "thor"
|
4
4
|
|
5
5
|
module Bourbon
|
6
6
|
class Generator < Thor
|
7
|
-
map [
|
7
|
+
map ["-v", "--version"] => :version
|
8
8
|
|
9
|
-
desc
|
9
|
+
desc "install", "Install Bourbon into your project"
|
10
10
|
method_options :path => :string, :force => :boolean
|
11
11
|
def install
|
12
12
|
if bourbon_files_already_exist? && !options[:force]
|
@@ -17,7 +17,7 @@ module Bourbon
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
desc
|
20
|
+
desc "update", "Update Bourbon"
|
21
21
|
method_options :path => :string
|
22
22
|
def update
|
23
23
|
if bourbon_files_already_exist?
|
@@ -29,7 +29,7 @@ module Bourbon
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
-
desc
|
32
|
+
desc "version", "Show Bourbon version"
|
33
33
|
def version
|
34
34
|
say "Bourbon #{Bourbon::VERSION}"
|
35
35
|
end
|
@@ -42,9 +42,9 @@ module Bourbon
|
|
42
42
|
|
43
43
|
def install_path
|
44
44
|
@install_path ||= if options[:path]
|
45
|
-
Pathname.new(File.join(options[:path],
|
45
|
+
Pathname.new(File.join(options[:path], "bourbon"))
|
46
46
|
else
|
47
|
-
Pathname.new(
|
47
|
+
Pathname.new("bourbon")
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
data/lib/bourbon/version.rb
CHANGED
data/package.json
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"name": "bourbon",
|
3
|
-
"version": "5.0.0.
|
3
|
+
"version": "5.0.0-beta.1",
|
4
4
|
"description": "A simple and lightweight mixin library for Sass.",
|
5
5
|
"keywords": [
|
6
6
|
"css",
|
7
|
+
"eyeglass-module",
|
7
8
|
"mixins",
|
8
9
|
"sass",
|
9
10
|
"scss"
|
@@ -12,6 +13,10 @@
|
|
12
13
|
"bugs": {
|
13
14
|
"url": "https://github.com/thoughtbot/bourbon/issues"
|
14
15
|
},
|
16
|
+
"eyeglass": {
|
17
|
+
"needs": "*",
|
18
|
+
"exports": "eyeglass-exports.js"
|
19
|
+
},
|
15
20
|
"license": "MIT",
|
16
21
|
"author": {
|
17
22
|
"name": "thoughtbot",
|
@@ -7,7 +7,7 @@ describe "border-color" do
|
|
7
7
|
|
8
8
|
context "called with one color" do
|
9
9
|
it "applies same color to all sides" do
|
10
|
-
rule = "border-color: #
|
10
|
+
rule = "border-color: #f00"
|
11
11
|
|
12
12
|
expect(".border-color-all").to have_rule(rule)
|
13
13
|
end
|
@@ -15,7 +15,7 @@ describe "border-color" do
|
|
15
15
|
|
16
16
|
context "called with two colors" do
|
17
17
|
it "applies to alternating sides" do
|
18
|
-
rule = "border-color: #
|
18
|
+
rule = "border-color: #0f0 #00f"
|
19
19
|
|
20
20
|
expect(".border-color-alternate").to have_rule(rule)
|
21
21
|
end
|
@@ -23,7 +23,7 @@ describe "border-color" do
|
|
23
23
|
|
24
24
|
context "called with three colors" do
|
25
25
|
it "applies second color to left and right" do
|
26
|
-
rule = "border-color: #
|
26
|
+
rule = "border-color: #f00 #0f0 #00f"
|
27
27
|
|
28
28
|
expect(".border-color-implied-left").to have_rule(rule)
|
29
29
|
end
|
@@ -31,7 +31,7 @@ describe "border-color" do
|
|
31
31
|
|
32
32
|
context "called with four colors" do
|
33
33
|
it "applies different colors to all sides" do
|
34
|
-
rule = "border-color: #
|
34
|
+
rule = "border-color: #00f #0f0 #f00 #ff0"
|
35
35
|
|
36
36
|
expect(".border-color-explicit").to have_rule(rule)
|
37
37
|
end
|
@@ -39,9 +39,9 @@ describe "border-color" do
|
|
39
39
|
|
40
40
|
context "called with null values" do
|
41
41
|
it "writes rules for other three" do
|
42
|
-
ruleset = "border-top-color: #
|
43
|
-
"border-right-color: #
|
44
|
-
"border-left-color: #
|
42
|
+
ruleset = "border-top-color: #0f0; " +
|
43
|
+
"border-right-color: #ff0; " +
|
44
|
+
"border-left-color: #00f;"
|
45
45
|
bad_rule = "border-bottom-color: null;"
|
46
46
|
|
47
47
|
expect(".border-color-false-third").to have_ruleset(ruleset)
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe "contrast-switch" do
|
4
|
+
before(:all) do
|
5
|
+
ParserSupport.parse_file("addons/contrast-switch")
|
6
|
+
end
|
7
|
+
|
8
|
+
context "called with a light base color" do
|
9
|
+
it "outputs the dark color" do
|
10
|
+
rule = "color: #000;"
|
11
|
+
|
12
|
+
expect(".contrast-switch-light-base").to have_ruleset(rule)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
context "called with a dark base color" do
|
17
|
+
it "outputs the light color" do
|
18
|
+
rule = "color: #eee;"
|
19
|
+
|
20
|
+
expect(".contrast-switch-dark-base").to have_ruleset(rule)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -8,8 +8,6 @@ describe "font-face" do
|
|
8
8
|
context "called with defaults" do
|
9
9
|
it "outputs defaults" do
|
10
10
|
ruleset = 'font-family: "source-sans-pro"; ' +
|
11
|
-
'font-style: normal; ' +
|
12
|
-
'font-weight: normal; ' +
|
13
11
|
'src: url("/fonts/source-sans-pro/source-sans-pro-regular.woff2") format("woff2"), url("/fonts/source-sans-pro/source-sans-pro-regular.woff") format("woff"), url("/fonts/source-sans-pro/source-sans-pro-regular.ttf") format("truetype");'
|
14
12
|
|
15
13
|
expect("@font-face").to have_ruleset(ruleset)
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe "font-face" do
|
4
|
+
before(:all) do
|
5
|
+
ParserSupport.parse_file("css3/font-face-5")
|
6
|
+
end
|
7
|
+
|
8
|
+
context "called with additional CSS rules" do
|
9
|
+
it "outputs defaults with additional content" do
|
10
|
+
ruleset = 'font-family: "calibre"; ' +
|
11
|
+
'src: url("fonts/calibre.woff2") format("woff2"), ' +
|
12
|
+
'url("fonts/calibre.woff") format("woff"), ' +
|
13
|
+
'url("fonts/calibre.ttf") format("truetype"); ' +
|
14
|
+
"font-style: normal;" +
|
15
|
+
"font-weight: 600;" +
|
16
|
+
"unicode-range: U+26;"
|
17
|
+
|
18
|
+
expect("@font-face").to have_ruleset(ruleset)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -7,10 +7,8 @@ describe "font-face" do
|
|
7
7
|
|
8
8
|
context "called with defaults" do
|
9
9
|
it "outputs defaults" do
|
10
|
-
ruleset = 'font-family: "pitch";
|
11
|
-
'font-
|
12
|
-
'font-weight: "normal"; ' +
|
13
|
-
'src: url("/fonts/pitch.woff") format("woff");'
|
10
|
+
ruleset = 'font-family: "pitch";' +
|
11
|
+
'src: font-url("/fonts/pitch.woff2") format("woff2");'
|
14
12
|
|
15
13
|
expect("@font-face").to have_ruleset(ruleset)
|
16
14
|
end
|
@@ -8,8 +8,6 @@ describe "font-face" do
|
|
8
8
|
context "called with defaults" do
|
9
9
|
it "outputs defaults" do
|
10
10
|
ruleset = 'font-family: "circular"; ' +
|
11
|
-
'font-style: "normal"; ' +
|
12
|
-
'font-weight: "normal"; ' +
|
13
11
|
'src: url("/circular.woff2") format("woff2"), ' +
|
14
12
|
'url("/circular.svg#circular") format("svg");'
|
15
13
|
|
@@ -9,7 +9,7 @@ describe "font-stacks" do
|
|
9
9
|
it "output stacks" do
|
10
10
|
helvetica = '"Helvetica Neue", "Helvetica", "Arial", sans-serif'
|
11
11
|
lucida_grande = '"Lucida Grande", "Lucida Sans Unicode", ' +
|
12
|
-
'"
|
12
|
+
'"Geneva", "Verdana", sans-serif'
|
13
13
|
verdana = '"Verdana", "Geneva", sans-serif'
|
14
14
|
garamond = '"Garamond", "Baskerville", "Baskerville Old Face", ' +
|
15
15
|
'"Hoefler Text", "Times New Roman", serif'
|
@@ -21,6 +21,10 @@ describe "font-stacks" do
|
|
21
21
|
'"Lucida Typewriter", monospace'
|
22
22
|
monaco = '"monaco", "Consolas", "Lucida Console", monospace'
|
23
23
|
|
24
|
+
system = '-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", ' +
|
25
|
+
'"Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", ' +
|
26
|
+
'"Helvetica Neue", sans-serif'
|
27
|
+
|
24
28
|
expect(".helvetica").to have_value(helvetica)
|
25
29
|
expect(".lucida-grande").to have_value(lucida_grande)
|
26
30
|
expect(".verdana").to have_value(verdana)
|
@@ -30,6 +34,7 @@ describe "font-stacks" do
|
|
30
34
|
expect(".consolas").to have_value(consolas)
|
31
35
|
expect(".courier-new").to have_value(courier_new)
|
32
36
|
expect(".monaco").to have_value(monaco)
|
37
|
+
expect(".system").to have_value(system)
|
33
38
|
end
|
34
39
|
end
|
35
40
|
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe "hide-visually" do
|
4
|
+
before(:all) do
|
5
|
+
ParserSupport.parse_file("addons/hide-visually")
|
6
|
+
end
|
7
|
+
|
8
|
+
context "called on element" do
|
9
|
+
it "adds properties to hide the element" do
|
10
|
+
ruleset = "border: 0; " +
|
11
|
+
"clip: rect(1px, 1px, 1px, 1px); " +
|
12
|
+
"clip-path: circle(1% at 1% 1%); " +
|
13
|
+
"height: 1px; " +
|
14
|
+
"overflow: hidden; " +
|
15
|
+
"padding: 0; " +
|
16
|
+
"position: absolute; " +
|
17
|
+
"width: 1px;"
|
18
|
+
|
19
|
+
expect(".hide-visually").to have_ruleset(ruleset)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
context "called with unhide argument" do
|
24
|
+
it "adds properties to reverse the hiding of the element" do
|
25
|
+
ruleset = "clip: auto; " +
|
26
|
+
"clip-path: none; " +
|
27
|
+
"height: auto; " +
|
28
|
+
"overflow: visible; " +
|
29
|
+
"position: static; " +
|
30
|
+
"width: auto;"
|
31
|
+
|
32
|
+
expect(".hide-visually--unhide").to have_ruleset(ruleset)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -2,24 +2,24 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
describe "modular-scale" do
|
4
4
|
before(:all) do
|
5
|
-
ParserSupport.parse_file("
|
5
|
+
ParserSupport.parse_file("addons/modular-scale")
|
6
6
|
end
|
7
7
|
|
8
8
|
context "called with arguments (1, $value: 2em)" do
|
9
9
|
it "outputs double the first value from the default scale" do
|
10
|
-
expect(".one-base-two").to have_rule("font-size: 2.
|
10
|
+
expect(".one-base-two").to have_rule("font-size: 2.5em")
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
14
|
context "called with arguments (1, $value: 3em)" do
|
15
15
|
it "outputs triple the first value from the default scale" do
|
16
|
-
expect(".one-base-three").to have_rule("font-size: 3.
|
16
|
+
expect(".one-base-three").to have_rule("font-size: 3.75em")
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
20
|
context "called with arguments (1, $value: 4em 6em)" do
|
21
21
|
it "outputs quadruple the first value from the default scale" do
|
22
|
-
expect(".one-double-value").to have_rule("font-size: 1.
|
22
|
+
expect(".one-double-value").to have_rule("font-size: 1.024em")
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
@@ -31,13 +31,13 @@ describe "modular-scale" do
|
|
31
31
|
|
32
32
|
context "called with argument (2)" do
|
33
33
|
it "outputs the second value from the default scale" do
|
34
|
-
expect(".two-base-one").to have_rule("font-size: 1.
|
34
|
+
expect(".two-base-one").to have_rule("font-size: 1.5625em")
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
38
|
context "called with arguments (2, $value: 4em 6em)" do
|
39
39
|
it "outputs sextuple the second value from the default scale" do
|
40
|
-
expect(".two-double-value").to have_rule("font-size: 3.
|
40
|
+
expect(".two-double-value").to have_rule("font-size: 3.125em")
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|