gridle 2.0.43 → 2.0.44

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: 6d15976dcb11f6ba0b8209131ddcc1564d265348
4
- data.tar.gz: e486684f36314ff5bc9245e6805278282c161a0b
3
+ metadata.gz: c3fe405b2623f4db63f1ffaa0d1c71ba2a4c78c4
4
+ data.tar.gz: edfaf3e818bd31943f86aa500f83cee16d305326
5
5
  SHA512:
6
- metadata.gz: 0fd4cdd19537548955ed520ad14101e038dfe07f34db5dd28f0af5b9d1bb80f3e46d59e158a5235e2923720b23e9a5fef846865584ad6fee20f75c6721b9f98a
7
- data.tar.gz: 1127503bd6f058ac46dc9ee01ab60455fb38af7bdbd056d1fa287e59a9125930e9f838c64ff302f0d932616a806d1c90751edfe681f4a391b3f6f80bebb3ca03
6
+ metadata.gz: 3c19c81f62a2cf7a134af9794891e825b71c07b2b6f95b465af8a863a5010f349a8732b1e19214e42d1e534cb571da143e811890f86ce609a2f3e3fc1a368280
7
+ data.tar.gz: 507888ca1a0030edf8891ba4313a6e0618fa310c551737ecec34e0e61d38e0431208d1984a25702f61ceba20c4d4cbc36518c1341bebb6830eca44a874bfb5cb
@@ -17,8 +17,8 @@ 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.43"
21
- DATE = "2015-11-03"
20
+ VERSION = "2.0.44"
21
+ DATE = "2015-12-23"
22
22
  end
23
23
 
24
24
  # This is where any custom SassScript should be placed. The functions will be
@@ -27,13 +27,18 @@
27
27
  margin-left: -#{gridle_get_state_var(gutter-left)};
28
28
  margin-right: -#{gridle_get_state_var(gutter-right)};
29
29
  // font-size:0; // to avoid problems with inline-block margins
30
+
31
+ #{_gridle_get_generic_selector(no-gutter)} > & {
32
+ margin-left: 0 !important;
33
+ margin-right: 0 !important;
34
+ }
30
35
 
31
36
  // do this only when not in generate phase
32
37
  // mean that we use the mixin directly
33
38
  @if _gridle_is_in_generate_phase() == false {
34
39
  @each $stateName, $state in gridle_get_states() {
35
40
  @include gridle_state($state) {
36
- & #{str-replace(#{&},".state-#{gridle_get_state_var(name, $state)}","")} {
41
+ & #{str-replace(unquote("#{&}"),".state-#{gridle_get_state_var(name, $state)}","")} {
37
42
  margin-left: -#{gridle_get_state_var(gutter-left, $state)};
38
43
  margin-right: -#{gridle_get_state_var(gutter-right, $state)};
39
44
  }
@@ -353,7 +358,13 @@
353
358
  $clearWhat : both
354
359
  ) {
355
360
  @include _gridle_call(clear-each) {
356
- > *:nth-child(#{$clearEach}n+1) {
361
+ $grid : map-get($_gridle-packages, grid);
362
+ $sel : map-get($grid, generic-selector);
363
+ @if not $sel {
364
+ $sel : _gridle_get_generic_selector(grid);
365
+ }
366
+
367
+ > #{$sel}:nth-of-type(#{$clearEach}n+1) {
357
368
  clear : $clearWhat;
358
369
  }
359
370
  }
@@ -21,6 +21,12 @@
21
21
  padding-right: 0 !important;
22
22
  margin-left: -#{gridle_get_state_var(gutter-left)};
23
23
  margin-right: -#{gridle_get_state_var(gutter-right)};
24
+
25
+ // handle row in no-gutter
26
+ #{_gridle_get_generic_selector(no-gutter)} > & {
27
+ margin-left: 0 !important;
28
+ margin-right: 0 !important;
29
+ }
24
30
 
25
31
  // do this only when not in generate phase
26
32
  // mean that we use the mixin directly
@@ -719,7 +719,7 @@
719
719
  }
720
720
 
721
721
  // return generated class :
722
- @return $sel;
722
+ @return unquote($sel);
723
723
  }
724
724
 
725
725
 
@@ -798,10 +798,40 @@
798
798
 
799
799
 
800
800
  //
801
- // Check if is in generate mode
801
+ // Get generic selector for a class
802
802
  //
803
- @function _gridle_is_in_generate_phase() {
804
- @return $_gridle_is_in_generate_phase;
803
+ @function _gridle_get_generic_selector(
804
+ $package
805
+ ) {
806
+ $p : map-get($_gridle-packages, $package);
807
+ $sel : map-get($p, generic-selector);
808
+ @if $sel {
809
+ @return unquote($sel);
810
+ }
811
+ $sel : map-get($p, classname);
812
+ $generic : "";
813
+ $end : false;
814
+ $i : 1;
815
+ @each $part in $sel {
816
+ @if not $end {
817
+ // if we have a separator, check the next value to see if it's a variable
818
+ @if index($_gridle-names-separators, $part) and $i < length($sel) {
819
+ @if nth($sel,$i + 1) != '%state' {
820
+ $generic : #{$generic}#{$part};
821
+ } @else {
822
+ $end : true;
823
+ }
824
+ } @else {
825
+ @if str-slice($part,1,1) != '%' {
826
+ $generic : #{$generic}#{$part};
827
+ } @else {
828
+ $end : true;
829
+ }
830
+ }
831
+ }
832
+ $i : $i + 1;
833
+ }
834
+ @return unquote('[class*="#{$generic}"]');
805
835
  }
806
836
 
807
837
 
@@ -858,6 +888,9 @@
858
888
  $values : true;
859
889
  @if length($prop_values) > 0 {
860
890
  $values : $prop_values;
891
+ @if length($prop_values) == 1 {
892
+ $values : nth($prop_values,1);
893
+ }
861
894
  $prop_values : ();
862
895
  }
863
896
  $map : map-set($map, $prop_name, $values);
@@ -452,7 +452,7 @@ $_gridle_generateOnlyOnce : true; // keep track of generate once classes
452
452
  @if $classes {
453
453
 
454
454
  // debug
455
- @debug("Generate classes for state #{$stateName}");
455
+ // @debug("Generate classes for state #{$stateName}");
456
456
 
457
457
  // scope all the classes in a media query
458
458
  @include gridle_state($state, false) {
@@ -1,9 +1,9 @@
1
1
  // |------------------------------------------------------
2
2
  // |------------------------------------------------------
3
3
  // @created 25.03.13
4
- // @updated 03.11.15
4
+ // @updated 23.12.15
5
5
  // @author Olivier Bossel <olivier.bossel@gmail.com>
6
- // @version 2.0.43
6
+ // @version 2.0.44
7
7
  // |------------------------------------------------------
8
8
  // |------------------------------------------------------
9
9
 
@@ -16,7 +16,7 @@
16
16
  // |------------------------------------------------------
17
17
  // |------------------------------------------------------
18
18
 
19
- $_gridle-version : "2.0.43";
19
+ $_gridle-version : "2.0.44";
20
20
 
21
21
 
22
22
 
@@ -290,7 +290,7 @@
290
290
  // if is an existing gridle state
291
291
  @if gridle_has_state($stateName) {
292
292
  // extend the "at-root" version for the .state-{stateName} classes
293
- @if $states-classes and str-index(#{&}, unquote('.state-#{$_gridle_current_stateName}')) {
293
+ @if $states-classes and str-index(unquote("#{&}"), unquote('.state-#{$_gridle_current_stateName}')) {
294
294
  // @at-root (without: media) { // seems not needed here, cause issues with libsass
295
295
  // @debug("%at-root-#{$_gridle_current_stateName}-#{$package}");
296
296
  @extend %at-root-#{$_gridle_current_stateName}-#{$package} !optional;
@@ -438,8 +438,8 @@ $_gridle_applied_for : ();
438
438
  }
439
439
  } @else {
440
440
  @if $key != null and str-index($key, gridle) and mixin-exists($key) {
441
- $set-name : str-replace($key, "gridle_", "");
442
- $set-name : str-replace($set-name, "_", "-", 1);
441
+ $set-name : str-replace("#{$key}", "gridle_", "");
442
+ $set-name : str-replace("#{$set-name}", "_", "-", 1);
443
443
  @include _gridle_set((
444
444
  $set-name : $value
445
445
  ));
@@ -145,6 +145,22 @@
145
145
  }
146
146
 
147
147
 
148
+ //
149
+ // Set a generic selector
150
+ //
151
+ @mixin gridle_set_generic_selector(
152
+ $for,
153
+ $selector
154
+ ) {
155
+ // get the map
156
+ $map : map-get($_gridle-packages, $for);
157
+ // set the new classname
158
+ $map : map-set($map, generic-selector, $selector);
159
+ // set the classmap
160
+ $_gridle-packages : map-set($_gridle-packages, $for, $map) !global;
161
+ }
162
+
163
+
148
164
  //
149
165
  // Extend a gridle class
150
166
  //
@@ -113,6 +113,7 @@ $_gridle-packages : (
113
113
  ),
114
114
  no-gutter : (
115
115
  classname : ('no','-','gutter','-','%side','@','%state'),
116
+ generic-selector : '[class*="no-gutter"]',
116
117
  package : helpers no-gutter
117
118
  ),
118
119
  auto-height : (
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gridle
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.43
4
+ version: 2.0.44
5
5
  platform: ruby
6
6
  authors:
7
7
  - Olivier Bossel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-03 00:00:00.000000000 Z
11
+ date: 2015-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass
@@ -67,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
67
  version: 1.3.6
68
68
  requirements: []
69
69
  rubyforge_project: gridle
70
- rubygems_version: 2.3.0
70
+ rubygems_version: 2.0.14
71
71
  signing_key:
72
72
  specification_version: 4
73
73
  summary: Gridle is a set of complete and simple settings, mixins and classes that