gridle 2.0.42 → 2.0.43
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gridle.rb +1 -1
- data/stylesheets/gridle/_default-states.scss +27 -25
- data/stylesheets/gridle/_driver-default.scss +4 -0
- data/stylesheets/gridle/_driver-flex.scss +4 -0
- data/stylesheets/gridle/_generate-mixins.scss +10 -7
- data/stylesheets/gridle/_init.scss +2 -2
- data/stylesheets/gridle/_settings.scss +1 -0
- 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: 6d15976dcb11f6ba0b8209131ddcc1564d265348
|
4
|
+
data.tar.gz: e486684f36314ff5bc9245e6805278282c161a0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fd4cdd19537548955ed520ad14101e038dfe07f34db5dd28f0af5b9d1bb80f3e46d59e158a5235e2923720b23e9a5fef846865584ad6fee20f75c6721b9f98a
|
7
|
+
data.tar.gz: 1127503bd6f058ac46dc9ee01ab60455fb38af7bdbd056d1fa287e59a9125930e9f838c64ff302f0d932616a806d1c90751edfe681f4a391b3f6f80bebb3ca03
|
data/lib/gridle.rb
CHANGED
@@ -4,32 +4,34 @@
|
|
4
4
|
// |------------------------------------------------------
|
5
5
|
// |------------------------------------------------------
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
7
|
+
@if $gridle-default-states {
|
8
|
+
// retina
|
9
|
+
@include gridle_register_state("retina", (
|
10
|
+
query : "(-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi), (min-resolution: 2dppx)",
|
11
|
+
classes : false
|
12
|
+
) );
|
12
13
|
|
13
|
-
// tv
|
14
|
-
@include gridle_register_state("tv", (
|
15
|
-
|
16
|
-
|
17
|
-
) );
|
14
|
+
// tv
|
15
|
+
@include gridle_register_state("tv", (
|
16
|
+
query : "only tv",
|
17
|
+
classes : false
|
18
|
+
) );
|
18
19
|
|
19
|
-
// print
|
20
|
-
@include gridle_register_state("print", (
|
21
|
-
|
22
|
-
|
23
|
-
) );
|
20
|
+
// print
|
21
|
+
@include gridle_register_state("print", (
|
22
|
+
query : "only print",
|
23
|
+
classes : false
|
24
|
+
) );
|
24
25
|
|
25
|
-
// portrait
|
26
|
-
@include gridle_register_state("portrait", (
|
27
|
-
|
28
|
-
|
29
|
-
) );
|
26
|
+
// portrait
|
27
|
+
@include gridle_register_state("portrait", (
|
28
|
+
query : "only screen and (orientation: portrait)",
|
29
|
+
classes : false
|
30
|
+
) );
|
30
31
|
|
31
|
-
// landscape
|
32
|
-
@include gridle_register_state("landscape", (
|
33
|
-
|
34
|
-
|
35
|
-
) );
|
32
|
+
// landscape
|
33
|
+
@include gridle_register_state("landscape", (
|
34
|
+
query : "only screen and (orientation: landscape)",
|
35
|
+
classes : false
|
36
|
+
) );
|
37
|
+
}
|
@@ -175,6 +175,10 @@
|
|
175
175
|
$context : map-get($column, context);
|
176
176
|
$columns : map-get($column, columns);
|
177
177
|
} @else if type-of($columns) == number {
|
178
|
+
// check if we have a ratio
|
179
|
+
@if $columns < 1 {
|
180
|
+
$columns : $context / 100 * ($columns * 100);
|
181
|
+
}
|
178
182
|
$columns : $columns / $name-multiplicator;
|
179
183
|
} @else {
|
180
184
|
@error "the column #{$columns} does not exist...";
|
@@ -156,6 +156,10 @@
|
|
156
156
|
$context : map-get($column, context);
|
157
157
|
$columns : map-get($column, columns);
|
158
158
|
} @else if type-of($columns) == number {
|
159
|
+
// check if we have a ratio
|
160
|
+
@if $columns < 1 {
|
161
|
+
$columns : $context / 100 * ($columns * 100);
|
162
|
+
}
|
159
163
|
$columns : $columns / $name-multiplicator;
|
160
164
|
} @else {
|
161
165
|
@error "the column #{$columns} does not exist...";
|
@@ -544,13 +544,16 @@ $_gridle_generateOnlyOnce : true; // keep track of generate once classes
|
|
544
544
|
// make nested grids working automatically
|
545
545
|
@if _gridle_need_to_generate(col, $package) or _gridle_need_to_generate(row, $package) {
|
546
546
|
@each $stateName, $state in gridle_get_states() {
|
547
|
-
$
|
548
|
-
$
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
547
|
+
$classes : gridle_get_state_var(classes, $state);
|
548
|
+
@if $classes {
|
549
|
+
$gutter-left : gridle_get_state_var(gutter-left, $state);
|
550
|
+
$gutter-right : gridle_get_state_var(gutter-right, $state);
|
551
|
+
@include _gridle_state($stateName, false) {
|
552
|
+
[class*="#{str-slice(_gridle_classname(grid),2)}"] > [class*="#{str-slice(_gridle_classname(row),2)}"],
|
553
|
+
[class*="#{str-slice(_gridle_classname(grid),2)}"] > [class*="#{str-slice(_gridle_classname(col),2)}"] {
|
554
|
+
margin-left: -#{$gutter-left};
|
555
|
+
margin-right: -#{$gutter-right};
|
556
|
+
}
|
554
557
|
}
|
555
558
|
}
|
556
559
|
}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
// @created 25.03.13
|
4
4
|
// @updated 03.11.15
|
5
5
|
// @author Olivier Bossel <olivier.bossel@gmail.com>
|
6
|
-
// @version 2.0.
|
6
|
+
// @version 2.0.43
|
7
7
|
// |------------------------------------------------------
|
8
8
|
// |------------------------------------------------------
|
9
9
|
|
@@ -16,7 +16,7 @@
|
|
16
16
|
// |------------------------------------------------------
|
17
17
|
// |------------------------------------------------------
|
18
18
|
|
19
|
-
$_gridle-version : "2.0.
|
19
|
+
$_gridle-version : "2.0.43";
|
20
20
|
|
21
21
|
|
22
22
|
|
@@ -5,6 +5,7 @@
|
|
5
5
|
// |------------------------------------------------------
|
6
6
|
|
7
7
|
$gridle-generate-json-settings : true !default;
|
8
|
+
$gridle-default-states : false !default; // register or not the states tv, print, retina, etc...
|
8
9
|
$_gridle-packages : (
|
9
10
|
container : (
|
10
11
|
classname : ('container','@','%state'),
|