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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a691251acdb9b9299be8b799d9a83d8d581183a0
4
- data.tar.gz: b3a4fada10916e5b8de12c521423051a0193d50b
3
+ metadata.gz: 6d15976dcb11f6ba0b8209131ddcc1564d265348
4
+ data.tar.gz: e486684f36314ff5bc9245e6805278282c161a0b
5
5
  SHA512:
6
- metadata.gz: 7ecaed447b4cd802f0bddf7a91099f03e20b20e904339a7bef70fc0448378b513c2231ff263bfdc78b69d02639cdf7d0fac1f233ecf7e5df0805fd905f80506d
7
- data.tar.gz: 01fe0488f69f75e37e8c4278054a5518611d48816cbed819995c4ec2ec4a3ad1cb3a709bc2b5ad86a4bc72f259bd6f3db8d621a9cdfdcc93074c1d329c5aa0d3
6
+ metadata.gz: 0fd4cdd19537548955ed520ad14101e038dfe07f34db5dd28f0af5b9d1bb80f3e46d59e158a5235e2923720b23e9a5fef846865584ad6fee20f75c6721b9f98a
7
+ data.tar.gz: 1127503bd6f058ac46dc9ee01ab60455fb38af7bdbd056d1fa287e59a9125930e9f838c64ff302f0d932616a806d1c90751edfe681f4a391b3f6f80bebb3ca03
@@ -17,7 +17,7 @@ Compass::Frameworks.register('gridle', :path => extension_path)
17
17
  # a prerelease version
18
18
  # Date is in the form of YYYY-MM-DD
19
19
  module Extension
20
- VERSION = "2.0.42"
20
+ VERSION = "2.0.43"
21
21
  DATE = "2015-11-03"
22
22
  end
23
23
 
@@ -4,32 +4,34 @@
4
4
  // |------------------------------------------------------
5
5
  // |------------------------------------------------------
6
6
 
7
- // retina
8
- @include gridle_register_state("retina", (
9
- query : "(-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi), (min-resolution: 2dppx)",
10
- classes : false
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
- query : "only tv",
16
- classes : false
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
- query : "only print",
22
- classes : false
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
- query : "only screen and (orientation: portrait)",
28
- classes : false
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
- query : "only screen and (orientation: landscape)",
34
- classes : false
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
- $gutter-left : gridle_get_state_var(gutter-left, $state);
548
- $gutter-right : gridle_get_state_var(gutter-right, $state);
549
- @include _gridle_state($stateName, false) {
550
- [class*="#{str-slice(_gridle_classname(grid),2)}"] > [class*="#{str-slice(_gridle_classname(row),2)}"],
551
- [class*="#{str-slice(_gridle_classname(grid),2)}"] > [class*="#{str-slice(_gridle_classname(col),2)}"] {
552
- margin-left: -#{$gutter-left};
553
- margin-right: -#{$gutter-right};
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.42
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.42";
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'),
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gridle
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.42
4
+ version: 2.0.43
5
5
  platform: ruby
6
6
  authors:
7
7
  - Olivier Bossel