modular-scale 3.0.5 → 3.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/changelog.md +4 -0
- data/lib/modular-scale.rb +1 -1
- data/readme.md +1 -3
- data/stylesheets/modularscale/_function.scss +1 -1
- data/stylesheets/modularscale/_respond.scss +10 -4
- data/stylesheets/modularscale/_target.scss +9 -9
- metadata +2 -3
- data/stylesheets/modularscale.zip +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec910f298a8bb27a845ede2e23ba59679a8e463d
|
4
|
+
data.tar.gz: c55131f17ee5e93c067dc3423071ed848ab1636e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4925a700c60e848834360ccb2d97e2874c859e1ed3ed0f45791d944cd5c752baa4c76be33f3fc9e58f4e20f9256948f8ae099baaa65f0cb474378cb0d2e67c20
|
7
|
+
data.tar.gz: 45bca9e35ce493f62c9a7205fb5cdb4b96f1602e5ade51e31103096026f41838113f252dff5fc564df88e3e0c78fa041159329c43da2b3f4c1d6089a815aa62a
|
data/changelog.md
CHANGED
data/lib/modular-scale.rb
CHANGED
data/readme.md
CHANGED
@@ -126,11 +126,9 @@ h2 {
|
|
126
126
|
|
127
127
|
If you do happen to have any values that are just named without numbers they will be ignored by the responsive mixin, it’s smart enough to just pull values that look like breakpoints.
|
128
128
|
|
129
|
-
Here is an [example page](http://skscratch.bitballoon.com/ms-demo) and the [corresponding Sass](https://github.com/modularscale/modularscale-sass/blob/3.x/test-compass/sass/style.scss).
|
130
|
-
|
131
129
|
#### Note on non-integer values
|
132
130
|
|
133
|
-
Unfortunately [Sass doesn’t natively support exponents](https://github.com/sass/sass/issues/684#issuecomment-196852515). This isn’t all bad news, you can
|
131
|
+
Unfortunately [Sass doesn’t natively support exponents](https://github.com/sass/sass/issues/684#issuecomment-196852515). This isn’t all bad news, you can either use [Compass](http://compass-style.org/), [mathsass](https://github.com/terkel/mathsass), or another library that has a `pow()` function that supports non-integer values and this plugin will pick up on that function and use it. You will then be able to write values like `ms(2.5)`. This is also a prerequisite for _target sizes_ below.
|
134
132
|
|
135
133
|
#### Target sizes
|
136
134
|
|
@@ -31,7 +31,7 @@
|
|
31
31
|
$ms-base: $ms-base * $ratio;
|
32
32
|
}
|
33
33
|
// If the base is smaller than the main base.
|
34
|
-
@
|
34
|
+
@else if ($ms-base < nth($base,1)) {
|
35
35
|
// pump up the value until it aligns with main base.
|
36
36
|
@while $ms-base < nth($base,1) {
|
37
37
|
$ms-base: $ms-base * $ratio;
|
@@ -9,13 +9,19 @@
|
|
9
9
|
}
|
10
10
|
|
11
11
|
// Main responsive mixin
|
12
|
-
@mixin ms-respond($prop, $val, $map: $modularscale) {
|
12
|
+
@mixin ms-respond($prop, $val, $map: $modularscale, $ms-important: false) {
|
13
13
|
$base: $ms-base;
|
14
14
|
$ratio: $ms-ratio;
|
15
15
|
|
16
16
|
$first-write: true;
|
17
17
|
$last-break: null;
|
18
18
|
|
19
|
+
$important: '';
|
20
|
+
|
21
|
+
@if $ms-important == true {
|
22
|
+
$important: ' !important';
|
23
|
+
}
|
24
|
+
|
19
25
|
// loop through all settings with a breakpoint type value
|
20
26
|
@each $v, $s in $map {
|
21
27
|
@if type-of($v) == number {
|
@@ -23,7 +29,7 @@
|
|
23
29
|
|
24
30
|
// Write out the first value without a media query.
|
25
31
|
@if $first-write {
|
26
|
-
#{$prop}: ms-function($val, $thread: $v, $settings: $map);
|
32
|
+
#{$prop}: unquote("#{ms-function($val, $thread: $v, $settings: $map)}#{$important}");
|
27
33
|
|
28
34
|
// Not the first write anymore, reset to false to move on.
|
29
35
|
$first-write: false;
|
@@ -35,7 +41,7 @@
|
|
35
41
|
@media (min-width: $last-break) and (max-width: $v) {
|
36
42
|
$val1: ms-function($val, $thread: $last-break, $settings: $map);
|
37
43
|
$val2: ms-function($val, $thread: $v, $settings: $map);
|
38
|
-
#{$prop}: ms-fluid($val1,$val2,$last-break,$v);
|
44
|
+
#{$prop}: unquote("#{ms-fluid($val1,$val2,$last-break,$v)}#{$important}");
|
39
45
|
}
|
40
46
|
$last-break: $v;
|
41
47
|
}
|
@@ -46,7 +52,7 @@
|
|
46
52
|
// Write the last breakpoint.
|
47
53
|
@if $last-break {
|
48
54
|
@media (min-width: $last-break) {
|
49
|
-
#{$prop}: ms-function($val, $thread: $last-break, $settings: $map);
|
55
|
+
#{$prop}: unquote("#{ms-function($val, $thread: $last-break, $settings: $map)}#{$important}");
|
50
56
|
}
|
51
57
|
}
|
52
58
|
}
|
@@ -10,15 +10,15 @@
|
|
10
10
|
@for $i from 1 through $l {
|
11
11
|
$v: str-slice($n,$i,$i);
|
12
12
|
@if $v == '1' { $v: 1; }
|
13
|
-
@
|
14
|
-
@
|
15
|
-
@
|
16
|
-
@
|
17
|
-
@
|
18
|
-
@
|
19
|
-
@
|
20
|
-
@
|
21
|
-
@
|
13
|
+
@else if $v == '2' { $v: 2; }
|
14
|
+
@else if $v == '3' { $v: 3; }
|
15
|
+
@else if $v == '4' { $v: 4; }
|
16
|
+
@else if $v == '5' { $v: 5; }
|
17
|
+
@else if $v == '6' { $v: 6; }
|
18
|
+
@else if $v == '7' { $v: 7; }
|
19
|
+
@else if $v == '8' { $v: 8; }
|
20
|
+
@else if $v == '9' { $v: 9; }
|
21
|
+
@else if $v == '0' { $v: 0; }
|
22
22
|
@else { $v: null; }
|
23
23
|
@if $v != null {
|
24
24
|
$m: $m - 1;
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: modular-scale
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Kellum
|
@@ -34,7 +34,6 @@ files:
|
|
34
34
|
- license.md
|
35
35
|
- readme.md
|
36
36
|
- stylesheets/_modularscale.scss
|
37
|
-
- stylesheets/modularscale.zip
|
38
37
|
- stylesheets/modularscale/_function.scss
|
39
38
|
- stylesheets/modularscale/_pow.scss
|
40
39
|
- stylesheets/modularscale/_respond.scss
|
@@ -65,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
65
64
|
version: 1.3.6
|
66
65
|
requirements: []
|
67
66
|
rubyforge_project:
|
68
|
-
rubygems_version: 2.5.2
|
67
|
+
rubygems_version: 2.5.2.3
|
69
68
|
signing_key:
|
70
69
|
specification_version: 4
|
71
70
|
summary: Modular scale calculator built into your Sass.
|
Binary file
|