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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b69be97dab8a2d5fbcb8eacd365d9c1018da3093
4
- data.tar.gz: e91c6fd0aa09d5ba4a5a480a4d11d92485b6f72c
3
+ metadata.gz: 947d53a79af51ddc3d605e1f2dffc5abe441894d
4
+ data.tar.gz: 269d0b647b8a89b36d3d0df2b99ad5e8780d4f2e
5
5
  SHA512:
6
- metadata.gz: f5e3c85dbdab631aa0801f4a31a69c58c0d5049e414eb906d2feada726a6b284327258f15c39ed9cf4c29a7eac7b1b199794524559a256f5dad9327e377d4b43
7
- data.tar.gz: 85eecdf471932a52101b5c32599fb01ef723471ab1cc210dfc11ede3b612989e06ea6be035ccf86aaf2e8fb58ed4c6635ab134f47459f5b148e9531751029504
6
+ metadata.gz: 2f121809c32325d9880ae6288658435ac49121f4a6a325f4a59bd4bfdb7b25711caff7764ee09d1c5e9daedeb103621ab75bb08e7851ef29d2b36577fff1bf2e
7
+ data.tar.gz: edcd664510a8f88b179b41876e6aa28567fd5f8affa3591edb4063e6e62cbb204b18f5bae5460556181f614f57f87edda6e36d005c200582a0884e50e103325e
@@ -4,6 +4,6 @@ require 'breakpoint'
4
4
  Compass::Frameworks.register("breakpoint-slicer", :path => "#{File.dirname(__FILE__)}/..")
5
5
 
6
6
  module BreakpointSlicer
7
- VERSION = "1.3.2"
7
+ VERSION = "1.3.3"
8
8
  DATE = "2014-06-14"
9
9
  end
@@ -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
- // left-bp-of-slice($slice)
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
- or a name of the slice from $slicer-breakpoint-names (string)
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.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: breakpoint-slicer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey 'lolmaus' Mikhaylov