quantity-queries 0.1.0 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/quantity-queries.rb +1 -1
- data/stylesheets/_quantity-queries.scss +6 -28
- 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: 8ff6008d709dc720c401d479efc57eb67f99f84b
|
4
|
+
data.tar.gz: 299715ec6b574be589f2398b0ab0768951c80a38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65e0f356d6694d1fca5c1245a398e10d88753a336ac1503a008cb691f02cbea9cb14d211d82bfc2a463f481a10c43bbdef6c3416477aba7cfc14b28b40d9ed73
|
7
|
+
data.tar.gz: 09341cf028313edfe914f0229a00e0de9fb6adb37c5d3f910e1957c6a524c11c1864f334ed78de79097d0f15812beffa211d0b5f182bd290a107cf0322a1893d
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Quantity Queries mixins
|
2
2
|
|
3
|
-
Simple
|
3
|
+
Simple quantity queries mixins for Sass. Use quantity as a condition. Learn more about quantity queries in this [http://alistapart.com/article/quantity-queries-for-css](A List Apart article).
|
4
4
|
|
5
5
|
[![Build Status](https://travis-ci.org/danielguillan/quantity-queries.svg?branch=master)](https://travis-ci.org/danielguillan/quantity-queries)
|
6
6
|
|
data/lib/quantity-queries.rb
CHANGED
@@ -77,11 +77,11 @@
|
|
77
77
|
$selector-append: ':nth-last-child(n+#{$count})';
|
78
78
|
|
79
79
|
@if type-of($count) != 'number' {
|
80
|
-
@error '`#{$count}` is not a valid number for at-
|
80
|
+
@error '`#{$count}` is not a valid number for `at-leat`';
|
81
81
|
}
|
82
82
|
|
83
83
|
@if $selector != null and (type-of($selector) != 'string' or length($selector) > 1) {
|
84
|
-
@error '`#{$selector}` is not a valid selector for at-least
|
84
|
+
@error '`#{$selector}` is not a valid selector for `at-least`';
|
85
85
|
}
|
86
86
|
|
87
87
|
$at-least-selector: _build-quantity-selector($selector-append, $selector);
|
@@ -112,11 +112,11 @@
|
|
112
112
|
$selector-append: ':nth-last-child(-n+#{$count}):first-child';
|
113
113
|
|
114
114
|
@if type-of($count) != 'number' {
|
115
|
-
@error '`#{$count}` is not a valid number for at-
|
115
|
+
@error '`#{$count}` is not a valid number for `at-most`.';
|
116
116
|
}
|
117
117
|
|
118
118
|
@if $selector != null and (type-of($selector) != 'string' or length($selector) > 1) {
|
119
|
-
@error '`#{$selector}` is not a valid selector for at-
|
119
|
+
@error '`#{$selector}` is not a valid selector for `at-most`';
|
120
120
|
}
|
121
121
|
|
122
122
|
$at-least-selector: _build-quantity-selector($selector-append, $selector);
|
@@ -149,11 +149,11 @@
|
|
149
149
|
$selector-append: ':nth-last-child(n+#{$first}):nth-last-child(-n+#{$last}):first-child';
|
150
150
|
|
151
151
|
@if $first > $last {
|
152
|
-
@error '#{$first} can
|
152
|
+
@error '#{$first} can´t be larger that #{$last} for `between`';
|
153
153
|
}
|
154
154
|
|
155
155
|
@if $selector != null and (type-of($selector) != 'string' or length($selector) > 1) {
|
156
|
-
@error '`#{$selector}` is not a valid selector for
|
156
|
+
@error '`#{$selector}` is not a valid selector for `between`';
|
157
157
|
}
|
158
158
|
|
159
159
|
$at-least-selector: _build-quantity-selector($selector-append, $selector);
|
@@ -163,25 +163,3 @@
|
|
163
163
|
@content;
|
164
164
|
}
|
165
165
|
}
|
166
|
-
|
167
|
-
|
168
|
-
// -----------------------------------------------------------------------------
|
169
|
-
// Test
|
170
|
-
// -----------------------------------------------------------------------------
|
171
|
-
|
172
|
-
.nav > li,
|
173
|
-
.nav > div {
|
174
|
-
|
175
|
-
@include at-most(3) {
|
176
|
-
color: green;
|
177
|
-
}
|
178
|
-
|
179
|
-
@include at-least(6) {
|
180
|
-
color: red;
|
181
|
-
}
|
182
|
-
|
183
|
-
|
184
|
-
@include between(4, 6) {
|
185
|
-
background-color: rgba(blue, .1);
|
186
|
-
}
|
187
|
-
}
|