breakpoint-slicer 1.3.2 → 1.3.3
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/lib/breakpoint-slicer.rb +1 -1
- data/stylesheets/breakpoint-slicer/_helper-functions.sass +22 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 947d53a79af51ddc3d605e1f2dffc5abe441894d
|
4
|
+
data.tar.gz: 269d0b647b8a89b36d3d0df2b99ad5e8780d4f2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f121809c32325d9880ae6288658435ac49121f4a6a325f4a59bd4bfdb7b25711caff7764ee09d1c5e9daedeb103621ab75bb08e7851ef29d2b36577fff1bf2e
|
7
|
+
data.tar.gz: edcd664510a8f88b179b41876e6aa28567fd5f8affa3591edb4063e6e62cbb204b18f5bae5460556181f614f57f87edda6e36d005c200582a0884e50e103325e
|
data/lib/breakpoint-slicer.rb
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
// - $bp : a breakpoint, e. g. 800px or 20em
|
11
11
|
// - $positive : whether to return only positive or only negative values
|
12
12
|
// * true - return only positive correction value (default)
|
13
|
-
// * false - return only negative correction value
|
13
|
+
// * false - return only negative correction value
|
14
14
|
@function anti-overlap-correction($bp, $positive: true)
|
15
15
|
@each $correction in $slicer-anti-overlap-corrections
|
16
16
|
@if (unit($bp) == unit($correction)) and (($correction > 0) == $positive)
|
@@ -40,7 +40,7 @@
|
|
40
40
|
// Making sure that the slice provided is valid
|
41
41
|
@if ($slice < $min) or ($slice > $max)
|
42
42
|
|
43
|
-
@warn "Wrong Slice number provided: #{$slice}. Should be between #{min} and #{$max}."
|
43
|
+
@warn "Wrong Slice number provided: #{$slice}. Should be between #{$min} and #{$max}."
|
44
44
|
|
45
45
|
@else
|
46
46
|
|
@@ -59,7 +59,7 @@
|
|
59
59
|
@return $left
|
60
60
|
|
61
61
|
|
62
|
-
//
|
62
|
+
// right-bp-of-slice($slice)
|
63
63
|
// - $slice : <slice number> A number of a slice. Should be positive integer.
|
64
64
|
//
|
65
65
|
// Returns the right breakpoint of an Nth slice, e. g. `800px`.
|
@@ -72,7 +72,7 @@
|
|
72
72
|
@if $max == total-slices()
|
73
73
|
@warn "Slice number provided: #{$slice}. It's the last slice, it has no right edge."
|
74
74
|
@else if ($slice < $min) or ($slice > $max)
|
75
|
-
@warn "Wrong column number provided: #{$slice}. Should be between #{min} and #{$max}."
|
75
|
+
@warn "Wrong column number provided: #{$slice}. Should be between #{$min} and #{$max}."
|
76
76
|
@else
|
77
77
|
// Reading the right edge of the slice
|
78
78
|
$right-bp: nth($slicer-breakpoints, $slice + 1)
|
@@ -87,9 +87,26 @@
|
|
87
87
|
@return nth($slicer-breakpoints, $slice)
|
88
88
|
|
89
89
|
|
90
|
+
// lbp($slice)
|
91
|
+
//
|
92
|
+
// A shortcut for left-bp-of-slice($slice)
|
93
|
+
@function lbp($slice)
|
94
|
+
@return left-bp-of-slice($slice)
|
95
|
+
|
96
|
+
|
97
|
+
// rbp($slice)
|
98
|
+
//
|
99
|
+
// A shortcut for right-bp-of-slice($slice)
|
100
|
+
@function lbp($slice)
|
101
|
+
@return right-bp-of-slice($slice)
|
102
|
+
|
103
|
+
|
90
104
|
// get-slice-id($slice-id-or-name)
|
105
|
+
//
|
106
|
+
// Returns a slice number corresponding to a slice name
|
107
|
+
//
|
91
108
|
// - $slice-id-or-name: <slice number or name> Should be either a number of a slice (positive integer)
|
92
|
-
|
109
|
+
// or a name of the slice from $slicer-breakpoint-names (string)
|
93
110
|
@function get-slice-id($slice-id-or-name)
|
94
111
|
|
95
112
|
// Treating the argument as a slice name.
|