gridle 1.3.12 → 1.3.21

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: 28c9e72856eab87288fc70d69b51a57817932236
4
- data.tar.gz: 502dbd41a4d3becb0228dd2321a3b04eb400c707
3
+ metadata.gz: ea4c0915e7052f99622cef67ce396983f41df735
4
+ data.tar.gz: 9706cdc43c93789bfd347a3d0938336e61d2d113
5
5
  SHA512:
6
- metadata.gz: 575712c715ce1f27c76bb2517a41739094158e2adba6fffc7e53d2dc792d9a45217320eed396e6594488aba4a9c0f54a18f9e5d85b6d3433f41f3287da4d1dba
7
- data.tar.gz: 5c1fc0fe8942bd530661885de8acdcb0e74ab8fc9b32fc7515f4b3c1c1d5f6adf144b5f7cd606840bf49023d1729135ae18c7471baa6893ad9bc91f096b41a71
6
+ metadata.gz: 54f54ab5f8366a1207c79c752b007a8338e285d196ed799f56caac619dc4122c9be2c98b0643a7913e300ffed2b5dde17177edaf758b9fda78b7ad0f3c32463b
7
+ data.tar.gz: be9d9217e689db9027fc2f629469b19993409e0fc39fd241b601df41fb80ac344ad19f2cb99909020efd42ba4ddb91ea6a78c516afef41b009867fd1b3bfbf66
@@ -16,8 +16,8 @@
16
16
  # a prerelease version
17
17
  # Date is in the form of YYYY-MM-DD
18
18
  module Extension
19
- VERSION = "1.3.12"
20
- DATE = "2013-05-16"
19
+ VERSION = "1.3.21"
20
+ DATE = "2014-05-22"
21
21
  end
22
22
 
23
23
  # This is where any custom SassScript should be placed. The functions will be
@@ -37,7 +37,8 @@
37
37
  direction:ltr;
38
38
  }
39
39
 
40
- padding:0 $gutter-width/2;
40
+ padding-left:$gutter-width/2;
41
+ padding-right:$gutter-width/2;
41
42
  }
42
43
 
43
44
  @if $debug == true {
@@ -44,7 +44,7 @@
44
44
  $stateMap-or-stateName
45
45
  ) {
46
46
  // check if has a state named like this :
47
- @if (map-has-key($_gridle_states, $stateMap-or-stateName))
47
+ @if (map-has-key($_gridle_states, unquote($stateMap-or-stateName)))
48
48
  {
49
49
  @return map-get($_gridle_states, unquote($stateMap-or-stateName));
50
50
  }
@@ -228,22 +228,34 @@
228
228
  @if $var == '%count' and $count {
229
229
  $sel : "#{$sel}#{$count}";
230
230
  }
231
- @if $var != '%state' and $var != '%count' and $var != '%-' and $var != '%prefix' {
231
+ @if $var != '%state' and $var != '%count' and $var != '%-' and $var != '-' and $var != '--' and $var != '_' and $var != '__' and $var != '%prefix' {
232
232
  $sel : "#{$sel}#{$var}";
233
233
  }
234
234
 
235
235
  // handle separators :
236
- @if $var == '%-' and $i < length($pattern) {
236
+ @if ($var == '%-' or $var == '-' or $var == '--' or $var == '_' or $var == '__') and $i < length($pattern) {
237
237
  $index : $i + 1;
238
238
  $value : nth($pattern, $index);
239
- @if $value != '%state' and $value != '%count' and $value != '%-' and $value != '%prefix' {
240
- $sel : "#{$sel}#{$gridle-class-separator}";
239
+ @if $value != '%state' and $value != '%count' and $value != '%-' and $value != '-' and $value != '--' and $value != '_' and $value != '__' and $value != '%prefix' {
240
+ @if $var == '%-' {
241
+ $sel : "#{$sel}#{$gridle-class-separator}";
242
+ } @else {
243
+ $sel : "#{$sel}#{$var}";
244
+ }
241
245
  }
242
246
  @if $value == '%state' and $state {
243
- $sel : "#{$sel}#{$gridle-class-separator}";
247
+ @if $var == '%-' {
248
+ $sel : "#{$sel}#{$gridle-class-separator}";
249
+ } @else {
250
+ $sel : "#{$sel}#{$var}";
251
+ }
244
252
  }
245
253
  @if $value == '%count' and $count {
246
- $sel : "#{$sel}#{$gridle-class-separator}";
254
+ @if $var == '%-' {
255
+ $sel : "#{$sel}#{$gridle-class-separator}";
256
+ } @else {
257
+ $sel : "#{$sel}#{$var}";
258
+ }
247
259
  }
248
260
  }
249
261
 
@@ -4,111 +4,194 @@
4
4
  // |------------------------------------------------------
5
5
  // |------------------------------------------------------
6
6
 
7
+
8
+ /**
9
+ * Generate a custom class for all the states
10
+ *
11
+ * @param list $pattern The name pattern of the class
12
+ * @param list $statesNames The states names to generate
13
+ */
14
+ @mixin gridle_generate_custom_class(
15
+ $pattern,
16
+ $statesNames : null
17
+ ) {
18
+ // manage states to generate :
19
+ $states : ();
20
+ @if $statesNames == null {
21
+ // loop on each states to generate names list :
22
+ @each $stateName, $state in $_gridle_states {
23
+ $states : append($states, $stateName);
24
+ }
25
+ } @else {
26
+ $states : $statesNames;
27
+ }
28
+
29
+ // loop on each states :
30
+ @each $stateName in $states
31
+ {
32
+ // manage statename :
33
+ @if type-of($stateName) != string {
34
+ $stateName : map-get($stateName, name);
35
+ }
36
+
37
+ // genrate the classname :
38
+ @include gridle_state($stateName, false) {
39
+ #{_gridle_classname($pattern, $stateName)} {
40
+ @content;
41
+ }
42
+ }
43
+ }
44
+ }
45
+
7
46
  // Generate all helpers classes
8
47
  // All the classes generated are not wrapper in gridle_state
9
48
  // in this mixin... Just the names are generated accordingly to the
10
49
  // requested state
11
50
  @mixin _gridle_generate_helper_classes (
12
- $state : null
51
+ $state : null,
52
+ $what : null
13
53
  ) {
14
54
  // helpers :
15
- #{_gridle_classname($gridle-hide-name-pattern, $state)} {
16
- @include gridle_hide(null);
17
- }
18
- #{_gridle_classname($gridle-not-visible-name-pattern, $state)} {
19
- @include gridle_not_visible(null);
20
- }
21
- #{_gridle_classname($gridle-show-name-pattern, $state)} {
22
- @include gridle_show(null);
23
- }
24
- #{_gridle_classname($gridle-visible-name-pattern, $state)} {
25
- @include gridle_visible(null);
26
- }
27
- #{_gridle_classname($gridle-float-left-name-pattern, $state)} {
28
- @include gridle_float(left);
29
- }
30
- #{_gridle_classname($gridle-float-right-name-pattern, $state)} {
31
- @include gridle_float(right);
32
- }
33
- #{_gridle_classname($gridle-clear-name-pattern, $state)} {
34
- @include gridle_clear(both);
35
- }
36
- #{_gridle_classname($gridle-clear-left-name-pattern, $state)} {
37
- @include gridle_clear(left);
38
- }
39
- #{_gridle_classname($gridle-clear-right-name-pattern, $state)} {
40
- @include gridle_clear(right);
41
- }
42
- #{_gridle_classname($gridle-no-gutter-name-pattern, $state)},
43
- #{_gridle_classname($gridle-no-margin-name-pattern, $state)} {
44
- @include gridle_no_margin();
45
- }
46
- #{_gridle_classname($gridle-no-gutter-left-name-pattern, $state)},
47
- #{_gridle_classname($gridle-no-margin-left-name-pattern, $state)} {
48
- @include gridle_no_margin(left);
49
- }
50
- #{_gridle_classname($gridle-no-gutter-right-name-pattern, $state)},
51
- #{_gridle_classname($gridle-no-margin-right-name-pattern, $state)} {
52
- @include gridle_no_margin(right);
53
- }
54
- #{_gridle_classname($gridle-no-gutter-top-name-pattern, $state)},
55
- #{_gridle_classname($gridle-no-margin-top-name-pattern, $state)} {
56
- @include gridle_no_margin(top);
57
- }
58
- #{_gridle_classname($gridle-no-gutter-bottom-name-pattern, $state)},
59
- #{_gridle_classname($gridle-no-margin-bottom-name-pattern, $state)} {
60
- @include gridle_no_margin(bottom);
55
+ @if $what == null or index($what, float) or index($what, helpers) {
56
+ #{_gridle_classname($gridle-float-left-name-pattern, $state)} {
57
+ @include gridle_float(left);
58
+ }
59
+ #{_gridle_classname($gridle-float-right-name-pattern, $state)} {
60
+ @include gridle_float(right);
61
+ }
61
62
  }
62
- #{_gridle_classname($gridle-gutter-name-pattern, $state)},
63
- #{_gridle_classname($gridle-margin-name-pattern, $state)} {
64
- @include gridle_margin(left right);
63
+
64
+ @if $what == null or index($what, clear) or index($what, helpers) {
65
+ #{_gridle_classname($gridle-clear-name-pattern, $state)} {
66
+ @include gridle_clear(both);
67
+ }
68
+ #{_gridle_classname($gridle-clear-left-name-pattern, $state)} {
69
+ @include gridle_clear(left);
70
+ }
71
+ #{_gridle_classname($gridle-clear-right-name-pattern, $state)} {
72
+ @include gridle_clear(right);
73
+ }
65
74
  }
66
- #{_gridle_classname($gridle-gutter-left-name-pattern, $state)},
67
- #{_gridle_classname($gridle-margin-left-name-pattern, $state)} {
68
- @include gridle_margin(left);
75
+
76
+ @if $what == null or index($what, no_gutter) or index($what, no_margin) or index($what, helpers) {
77
+ #{_gridle_classname($gridle-no-gutter-name-pattern, $state)},
78
+ #{_gridle_classname($gridle-no-margin-name-pattern, $state)} {
79
+ @include gridle_no_margin();
80
+ }
81
+ #{_gridle_classname($gridle-no-gutter-left-name-pattern, $state)},
82
+ #{_gridle_classname($gridle-no-margin-left-name-pattern, $state)} {
83
+ @include gridle_no_margin(left);
84
+ }
85
+ #{_gridle_classname($gridle-no-gutter-right-name-pattern, $state)},
86
+ #{_gridle_classname($gridle-no-margin-right-name-pattern, $state)} {
87
+ @include gridle_no_margin(right);
88
+ }
89
+ #{_gridle_classname($gridle-no-gutter-top-name-pattern, $state)},
90
+ #{_gridle_classname($gridle-no-margin-top-name-pattern, $state)} {
91
+ @include gridle_no_margin(top);
92
+ }
93
+ #{_gridle_classname($gridle-no-gutter-bottom-name-pattern, $state)},
94
+ #{_gridle_classname($gridle-no-margin-bottom-name-pattern, $state)} {
95
+ @include gridle_no_margin(bottom);
96
+ }
69
97
  }
70
- #{_gridle_classname($gridle-gutter-right-name-pattern, $state)},
71
- #{_gridle_classname($gridle-margin-right-name-pattern, $state)} {
72
- @include gridle_margin(right);
98
+
99
+ @if $what == null or index($what, gutter) or index($what, margin) or index($what, helpers) {
100
+ #{_gridle_classname($gridle-gutter-name-pattern, $state)},
101
+ #{_gridle_classname($gridle-margin-name-pattern, $state)} {
102
+ @include gridle_margin(left right);
103
+ }
104
+ #{_gridle_classname($gridle-gutter-left-name-pattern, $state)},
105
+ #{_gridle_classname($gridle-margin-left-name-pattern, $state)} {
106
+ @include gridle_margin(left);
107
+ }
108
+ #{_gridle_classname($gridle-gutter-right-name-pattern, $state)},
109
+ #{_gridle_classname($gridle-margin-right-name-pattern, $state)} {
110
+ @include gridle_margin(right);
111
+ }
112
+ #{_gridle_classname($gridle-gutter-top-name-pattern, $state)},
113
+ #{_gridle_classname($gridle-margin-top-name-pattern, $state)} {
114
+ @include gridle_margin(top);
115
+ }
116
+ #{_gridle_classname($gridle-gutter-bottom-name-pattern, $state)},
117
+ #{_gridle_classname($gridle-margin-bottom-name-pattern, $state)} {
118
+ @include gridle_margin(bottom);
119
+ }
73
120
  }
74
- #{_gridle_classname($gridle-gutter-top-name-pattern, $state)},
75
- #{_gridle_classname($gridle-margin-top-name-pattern, $state)} {
76
- @include gridle_margin(top);
121
+
122
+ @if $what == null or index($what, auto_height) or index($what, helpers) {
123
+ #{_gridle_classname($gridle-auto-height-name-pattern, $state)} {
124
+ height:inherit;
125
+ }
77
126
  }
78
- #{_gridle_classname($gridle-gutter-bottom-name-pattern, $state)},
79
- #{_gridle_classname($gridle-margin-bottom-name-pattern, $state)} {
80
- @include gridle_margin(bottom);
127
+
128
+ @if $what == null or index($what, centered) or index($what, helpers) {
129
+ #{_gridle_classname($gridle-centered-name-pattern, $state)} {
130
+ @include gridle_centered(null);
131
+ }
81
132
  }
82
- #{_gridle_classname($gridle-auto-height-name-pattern, $state)} {
83
- height:inherit;
133
+
134
+ @if $what == null or index($what, parent) or index($what, helpers) {
135
+ #{_gridle_classname($gridle-parent-name-pattern, $state)} {
136
+ @include _gridle_parent();
137
+ }
84
138
  }
85
- #{_gridle_classname($gridle-centered-name-pattern, $state)} {
86
- @include gridle_centered(null);
139
+
140
+ @if $what == null or index($what, vertical_align) or index($what, helpers) {
141
+ #{_gridle_classname($gridle-vertical-align-middle-name-pattern, $state)} {
142
+ @include _gridle_vertical_align();
143
+ }
144
+ #{_gridle_classname($gridle-vertical-align-top-name-pattern, $state)} {
145
+ @include _gridle_vertical_align(top);
146
+ }
147
+ #{_gridle_classname($gridle-vertical-align-bottom-name-pattern, $state)} {
148
+ @include _gridle_vertical_align(bottom);
149
+ }
87
150
  }
88
- #{_gridle_classname($gridle-parent-name-pattern, $state)} {
89
- @include _gridle_parent();
151
+
152
+ /**
153
+ * Visible, hide, etc...
154
+ */
155
+ @if $what == null or index($what, hide) or index($what, helpers) {
156
+ #{_gridle_classname($gridle-hide-name-pattern, $state)} {
157
+ @include gridle_hide(null);
158
+ }
90
159
  }
91
- #{_gridle_classname($gridle-vertical-align-middle-name-pattern, $state)} {
92
- @include _gridle_vertical_align();
160
+
161
+ @if $what == null or index($what, not_visible) or index($what, helpers) {
162
+ #{_gridle_classname($gridle-not-visible-name-pattern, $state)} {
163
+ @include gridle_not_visible(null);
164
+ }
93
165
  }
94
- #{_gridle_classname($gridle-vertical-align-top-name-pattern, $state)} {
95
- @include _gridle_vertical_align(top);
166
+
167
+ @if $what == null or index($what, show) or index($what, helpers) {
168
+ #{_gridle_classname($gridle-show-name-pattern, $state)} {
169
+ @include gridle_show(null);
170
+ }
171
+ #{_gridle_classname($gridle-show-inline-name-pattern, $state)} {
172
+ @include gridle_show_inline(null);
173
+ }
96
174
  }
97
- #{_gridle_classname($gridle-vertical-align-bottom-name-pattern, $state)} {
98
- @include _gridle_vertical_align(bottom);
175
+
176
+ @if $what == null or index($what, visible) or index($what, helpers) {
177
+ #{_gridle_classname($gridle-visible-name-pattern, $state)} {
178
+ @include gridle_visible(null);
179
+ }
99
180
  }
100
181
 
101
182
  /**
102
183
  * Clear each class :
103
184
  */
104
- @each $clearName, $clearMap in $_gridle_clear_classes {
105
- // get count :
106
- $clearCount : map-get($clearMap, clearEach);
107
- // what to clear :
108
- $clearWhat : map-get($clearMap, clearWhat);
109
- // generate the class :
110
- #{_gridle_classname($gridle-clear-each-pattern, $state, $clearCount)} {
111
- @include _gridle_clear_each($clearCount, $clearWhat, $state);
185
+ @if $what == null or index($what, clear_each) or index($what, helpers) {
186
+ @each $clearName, $clearMap in $_gridle_clear_classes {
187
+ // get count :
188
+ $clearCount : map-get($clearMap, clearEach);
189
+ // what to clear :
190
+ $clearWhat : map-get($clearMap, clearWhat);
191
+ // generate the class :
192
+ #{_gridle_classname($gridle-clear-each-pattern, $state, $clearCount)} {
193
+ @include _gridle_clear_each($clearCount, $clearWhat, $state);
194
+ }
112
195
  }
113
196
  }
114
197
 
@@ -151,14 +234,14 @@
151
234
 
152
235
 
153
236
  // generate settings json :
154
- @mixin gridle_generate_json_settings(
155
- $scope : default
156
- ) {
237
+ @mixin gridle_generate_json_settings() {
157
238
 
158
239
  // settings content :
159
240
  $gridle-settings-states : "{";
160
241
 
161
242
  // generate all classes for differents media queries :
243
+ $statesCount : length($_gridle_states);
244
+ $i : 0;
162
245
  @each $stateName, $state in $_gridle_states {
163
246
 
164
247
  $name : $stateName;
@@ -169,22 +252,30 @@
169
252
 
170
253
  $value : null;
171
254
  @if $varName == "query" {
172
- $value : _gridle_get_media_query_for_state($stateName);
255
+ $value : _gridle_get_media_query($stateName);
173
256
  } @else {
174
257
  $value : map-get($state,$varName);
175
- // $value : _gridle_get_state_var($i,$var);
176
258
  }
177
259
 
178
260
  @if $value == null {
179
261
  $gridle-settings-states : "#{$gridle-settings-states} \"#{$varName}\" : null,";
180
- } @elseif $var == 'context' or $var == 'classes' {
262
+ } @elseif type-of($value) == bool {
181
263
  $gridle-settings-states : "#{$gridle-settings-states} \"#{$varName}\" : #{$value},";
182
264
  } @else {
183
265
  $gridle-settings-states : "#{$gridle-settings-states} \"#{$varName}\" : \"#{$value}\",";
184
266
  }
185
267
  }
186
268
 
187
- $gridle-settings-states : "#{$gridle-settings-states} },";
269
+ $gridle-settings-states : "#{$gridle-settings-states} \"_gridle\" : true";
270
+
271
+ @if $i >= $statesCount - 1 {
272
+ $gridle-settings-states : "#{$gridle-settings-states} }";
273
+ } @else {
274
+ $gridle-settings-states : "#{$gridle-settings-states} },";
275
+ }
276
+
277
+ // update i :
278
+ $i : $i + 1;
188
279
 
189
280
  }
190
281
 
@@ -201,25 +292,12 @@
201
292
  @if length($_gridle_states_debug_devices) <= 0 {
202
293
  $debug_devices : null;
203
294
  }
204
- $gridle-settings : "#{$gridle-settings}, \"debugDevices\" : { #{$debug_devices} }";
295
+ // $gridle-settings : "#{$gridle-settings}, \"debugDevices\" : { #{$debug_devices} }";
205
296
 
206
297
  // settings :
207
- $gridle-settings : "#{$gridle-settings}, \"columnsCount\" : #{$gridle-columns-count}";
208
- $gridle-settings : "#{$gridle-settings}, \"gutterWidth\" : \"#{$gridle-gutter-width}\"";
209
- $gridle-settings : "#{$gridle-settings}, \"nameMultiplicator\" : #{$gridle-name-multiplicator}";
210
- $gridle-settings : "#{$gridle-settings}, \"direction\" : \"#{$gridle-direction}\"";
211
- $gridle-settings : "#{$gridle-settings}, \"ie7Support\" : #{$gridle-ie7-support}";
212
- $gridle-settings : "#{$gridle-settings}, \"debug\" : #{$gridle-debug}";
213
- $gridle-settings : "#{$gridle-settings}, \"debugShowClassNames\" : #{$gridle-debug-show-class-names}";
214
- $gridle-settings : "#{$gridle-settings}, \"htmlStatesClasses\" : #{$gridle-html-states-classes}";
215
- $gridle-settings : "#{$gridle-settings}, \"generateHelpersClasses\" : #{$gridle-generate-helpers-classes}";
216
- $gridle-settings : "#{$gridle-settings}, \"generatePushClasses\" : #{$gridle-generate-push-classes}";
217
- $gridle-settings : "#{$gridle-settings}, \"generatePullClasses\" : #{$gridle-generate-pull-classes}";
218
- $gridle-settings : "#{$gridle-settings}, \"generatePrefixClasses\" : #{$gridle-generate-prefix-classes}";
219
- $gridle-settings : "#{$gridle-settings}, \"generateSuffixClasses\" : #{$gridle-generate-suffix-classes}";
220
- $gridle-settings : "#{$gridle-settings}, \"classPrefix\" : \"#{$gridle-class-prefix}\"";
298
+ // $gridle-settings : "#{$gridle-settings}, \"classPrefix\" : \"#{$gridle-class-prefix}\"";
221
299
  $gridle-settings : "#{$gridle-settings} }";
222
- #gridle-settings-#{$scope} {
300
+ #gridle-settings {
223
301
  content : $gridle-settings;
224
302
  }
225
303
  }
@@ -228,62 +306,100 @@
228
306
  // gridle mixin :
229
307
  // Generate all the classes needed for a grid
230
308
  @mixin gridle_generate_classes(
309
+ $stateName : null,
310
+ $what : null,
231
311
  $scope : null
232
312
  ) {
233
313
  // check if a scope exist :
234
314
  @if $scope {
235
315
  // wrapp grid into scope :
236
316
  .#{$scope} {
237
- @include _gridle_generate_classes(true);
317
+ @include _gridle_generate_classes($stateName, $what, true);
238
318
  }
239
319
  } @else {
240
320
  // generate classes :
241
- @include _gridle_generate_classes(false);
321
+ @include _gridle_generate_classes($stateName, $what, false);
242
322
  }
243
323
  }
324
+ $_gridle_generateOnlyOnce : true; // keep track of generate once classes
244
325
  @mixin _gridle_generate_classes(
245
- $has-parent
326
+ $stateName : null,
327
+ $what : null,
328
+ $has-parent : false
246
329
  ) {
247
330
 
248
- // | ------------------------
249
- // | Windows 8 fix
250
- // | ------------------------
251
-
252
- // Windows 8 fix for snap mode :
253
- @media screen and (max-width: 400px) {
254
- @-ms-viewport { width: device-width; }
255
- }
331
+ // generate these classes only once :
332
+ @if $_gridle_generateOnlyOnce
333
+ {
256
334
 
335
+ // update status :
336
+ $_gridle_generateOnlyOnce : false;
337
+
338
+ // | ------------------------
339
+ // | Windows 8 fix
340
+ // | ------------------------
341
+
342
+ // Windows 8 fix for snap mode :
343
+ @media screen and (max-width: 400px) {
344
+ @-ms-viewport { width: device-width; }
345
+ }
346
+
347
+
348
+ // | ------------------------
349
+ // | Container
350
+ // | ------------------------
351
+
352
+ // generate container class :
353
+ @if $what == null or index($what, container)
354
+ {
355
+ $container-selector : ();
356
+ $container-selector : append( $container-selector, unquote(_gridle_classname($gridle-container-name-pattern)), comma);
357
+ #{$container-selector} {
358
+ @include gridle_container();
359
+ }
360
+ }
361
+
362
+
363
+ // | ------------------------
364
+ // | Parent selector
365
+ // | ------------------------
366
+
367
+ // parent common css :
368
+ @if $what == null or index($what, parent)
369
+ {
370
+ $parentSelector : _gridle_classname($gridle-parent-name-pattern,null,null);
371
+ #{$parentSelector} {
372
+ @extend %gridle-clearfix;
373
+ @extend %gridle-parent-common;
374
+ }
375
+ }
376
+
377
+
378
+ // // | ------------------------
379
+ // // | JSON Settings
380
+ // // | ------------------------
381
+
382
+ // // generate json settings :
383
+ @include gridle_generate_json_settings();
257
384
 
258
- // | ------------------------
259
- // | Container
260
- // | ------------------------
261
-
262
- // generate container class :
263
- $container-selector : ();
264
- $container-selector : append( $container-selector, unquote(_gridle_classname($gridle-container-name-pattern)), comma);
265
- #{$container-selector} {
266
- @include gridle_container();
267
385
  }
268
386
 
269
387
 
270
388
  // | ------------------------
271
- // | Parent selector
389
+ // | Set the list of states to generate
272
390
  // | ------------------------
273
-
274
- // parent common css :
275
- $parentSelector : _gridle_classname($gridle-parent-name-pattern,null,null);
276
- #{$parentSelector} {
277
- @extend %gridle-clearfix;
278
- @extend %gridle-parent-common;
391
+ $states : $_gridle_states;
392
+ @if $stateName and _gridle_has_state($stateName) {
393
+ $states : map-set((), $stateName, _gridle_get_state($stateName));
279
394
  }
280
395
 
396
+
281
397
  // | ------------------------
282
398
  // | Store all the generated common selectors
283
399
  // | ------------------------
284
400
 
285
401
  // generate all selector for extends :
286
- $common-selector : ();
402
+ $grid-common-selector : ();
287
403
  $push-common-selector : ();
288
404
  $pull-common-selector : ();
289
405
  $prefix-common-selector : ();
@@ -295,7 +411,7 @@
295
411
  // | ------------------------
296
412
 
297
413
  // generate all classes for media queries :
298
- @each $stateName, $state in $_gridle_states {
414
+ @each $stateName, $state in $states {
299
415
 
300
416
  // setup vars :
301
417
  $media : $stateName;
@@ -330,17 +446,19 @@
330
446
  @each $columnName, $column in $columnsMap {
331
447
 
332
448
  // add selector :
333
- $common-selector : append( $common-selector, unquote(_gridle_classname($gridle-grid-name-pattern, $media, $columnName)), comma );
334
- @if $generate-push-classes {
449
+ @if $what == null or index($what, grid) {
450
+ $grid-common-selector : append( $grid-common-selector, unquote(_gridle_classname($gridle-grid-name-pattern, $media, $columnName)), comma );
451
+ }
452
+ @if $generate-push-classes and ($what == null or index($what, push)) {
335
453
  $push-common-selector : append( $push-common-selector, unquote(_gridle_classname($gridle-push-name-pattern, $media, $columnName)), comma );
336
454
  }
337
- @if $generate-pull-classes {
455
+ @if $generate-pull-classes and ($what == null or index($what, pull)) {
338
456
  $pull-common-selector : append( $pull-common-selector, unquote(_gridle_classname($gridle-pull-name-pattern, $media, $columnName)), comma );
339
457
  }
340
- @if $generate-prefix-classes {
458
+ @if $generate-prefix-classes and ($what == null or index($what, prefix)) {
341
459
  $prefix-common-selector : append( $prefix-common-selector, unquote(_gridle_classname($gridle-prefix-name-pattern, $media, $columnName)), comma );
342
460
  }
343
- @if $generate-suffix-classes {
461
+ @if $generate-suffix-classes and ($what == null or index($what, suffix)) {
344
462
  $suffix-common-selector : append( $suffix-common-selector, unquote(_gridle_classname($gridle-suffix-name-pattern, $media, $columnName)), comma );
345
463
  }
346
464
  }
@@ -348,20 +466,30 @@
348
466
  }
349
467
 
350
468
  // common css :
351
- #{$push-common-selector} {
352
- @include _gridle_push_common();
469
+ @if $what == null or index($what, grid) {
470
+ #{$grid-common-selector} {
471
+ @include _gridle_grid_common();
472
+ }
353
473
  }
354
- #{$pull-common-selector} {
355
- @include _gridle_pull_common();
474
+ @if $what == null or index($what, push) {
475
+ #{$push-common-selector} {
476
+ @include _gridle_push_common();
477
+ }
356
478
  }
357
- #{$prefix-common-selector} {
358
- @include _gridle_prefix_common();
479
+ @if $what == null or index($what, pull) {
480
+ #{$pull-common-selector} {
481
+ @include _gridle_pull_common();
482
+ }
359
483
  }
360
- #{$suffix-common-selector} {
361
- @include _gridle_suffix_common();
484
+ @if $what == null or index($what, prefix) {
485
+ #{$prefix-common-selector} {
486
+ @include _gridle_prefix_common();
487
+ }
362
488
  }
363
- #{$common-selector} {
364
- @include _gridle_grid_common();
489
+ @if $what == null or index($what, suffix) {
490
+ #{$suffix-common-selector} {
491
+ @include _gridle_suffix_common();
492
+ }
365
493
  }
366
494
 
367
495
 
@@ -370,7 +498,7 @@
370
498
  // | ------------------------
371
499
 
372
500
  // generate all classes for differents media queries :
373
- @each $stateName, $state in $_gridle_states {
501
+ @each $stateName, $state in $states {
374
502
 
375
503
  // setup vars :
376
504
  $classes : _gridle_get_var_value(classes, $state);
@@ -424,25 +552,27 @@
424
552
  ));
425
553
 
426
554
  // classes :
427
- #{_gridle_classname($gridle-grid-name-pattern, $stateName, $columnName)} {
428
- @include _gridle($columnsCount, $extendedState);
555
+ @if $what == null or index($what, grid) {
556
+ #{_gridle_classname($gridle-grid-name-pattern, $stateName, $columnName)} {
557
+ @include _gridle($columnsCount, $extendedState);
558
+ }
429
559
  }
430
- @if $generate-push-classes == true {
560
+ @if $generate-push-classes == true and ($what == null or index($what, push)) {
431
561
  #{_gridle_classname($gridle-push-name-pattern, $stateName, $columnName)} {
432
562
  @include _gridle_push($columnsCount, $extendedState);
433
563
  }
434
564
  }
435
- @if $generate-pull-classes == true {
565
+ @if $generate-pull-classes == true and ($what == null or index($what, pull)) {
436
566
  #{_gridle_classname($gridle-pull-name-pattern, $stateName, $columnName)} {
437
567
  @include _gridle_pull($columnsCount, $extendedState);
438
568
  }
439
569
  }
440
- @if $generate-prefix-classes == true {
570
+ @if $generate-prefix-classes == true and ($what == null or index($what, prefix)) {
441
571
  #{_gridle_classname($gridle-prefix-name-pattern, $stateName, $columnName)} {
442
572
  @include _gridle_prefix($columnsCount, $extendedState);
443
573
  }
444
574
  }
445
- @if $generate-suffix-classes == true {
575
+ @if $generate-suffix-classes == true and ($what == null or index($what, suffix)) {
446
576
  #{_gridle_classname($gridle-suffix-name-pattern, $stateName, $columnName)} {
447
577
  @include _gridle_suffix($columnsCount, $extendedState);
448
578
  }
@@ -451,17 +581,9 @@
451
581
 
452
582
  // media queries helpers classes :
453
583
  @if $generate-helpers-classes == true {
454
- @include _gridle_generate_helper_classes($stateName);
584
+ @include _gridle_generate_helper_classes($stateName, $what);
455
585
  }
456
586
  }
457
587
  }
458
588
  }
459
-
460
-
461
- // // | ------------------------
462
- // // | JSON Settings
463
- // // | ------------------------
464
-
465
- // // generate json settings :
466
- // @include gridle_generate_json_settings();
467
589
  }
@@ -29,13 +29,13 @@
29
29
  // |------------------------------------------------------
30
30
  // |------------------------------------------------------
31
31
  // @created 25.03.13
32
- // @updated 15.05.14
32
+ // @updated 21.05.14
33
33
  // @author Olivier Bossel <olivier.bossel@gmail.com>
34
- // @version 1.3.1
34
+ // @version 1.3.2
35
35
  // |------------------------------------------------------
36
36
  // |------------------------------------------------------
37
37
 
38
- $_gridle-version : "1.3.1";
38
+ $_gridle-version : "1.3.2";
39
39
 
40
40
 
41
41
 
@@ -560,6 +560,28 @@
560
560
  }
561
561
 
562
562
 
563
+ /**
564
+ * Show inline
565
+ *
566
+ * @param String $state The state name
567
+ */
568
+ @mixin gridle_show_inline(
569
+ $state : null
570
+ ) {
571
+ // check if need media query :
572
+ @if $state {
573
+ @include gridle_state($state) {
574
+ @include _gridle_show_inline();
575
+ }
576
+ } @else {
577
+ @include _gridle_show_inline();
578
+ }
579
+ }
580
+ @mixin _gridle_show_inline() {
581
+ display:inline-block;
582
+ }
583
+
584
+
563
585
  // Visible on :
564
586
  // @param String $media On what state
565
587
  @mixin gridle_visible(
@@ -11,6 +11,7 @@
11
11
  $settings : ()
12
12
  ) {
13
13
  $_gridle-settings : map-merge((
14
+ name : default,
14
15
  min-width : null,
15
16
  max-width : 99999999px,
16
17
  query : null,
@@ -54,7 +55,7 @@
54
55
  /**
55
56
  * Register a clear each class
56
57
  */
57
- @mixin gridle_register_clear_each (
58
+ @mixin gridle_register_clear_each(
58
59
  $count,
59
60
  $clearWhat
60
61
  ) {
@@ -26,6 +26,7 @@ $gridle-vertical-align-bottom-name-pattern : ('vertical','%-','align','%-','%s
26
26
 
27
27
  $gridle-hide-name-pattern : ('hide','%-','%state') !default;
28
28
  $gridle-show-name-pattern : ('show','%-','%state') !default;
29
+ $gridle-show-inline-name-pattern : ('show','%-','inline','%-','%state') !default;
29
30
  $gridle-not-visible-name-pattern : ('not','%-','visible','%-','%state') !default;
30
31
  $gridle-visible-name-pattern : ('visible','%-','%state') !default;
31
32
 
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: 1.3.12
4
+ version: 1.3.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Olivier Bossel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-16 00:00:00.000000000 Z
11
+ date: 2014-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
61
61
  version: 1.3.6
62
62
  requirements: []
63
63
  rubyforge_project: gridle
64
- rubygems_version: 2.0.3
64
+ rubygems_version: 2.0.14
65
65
  signing_key:
66
66
  specification_version: 4
67
67
  summary: Gridle is a set of complete and simple settings, mixins and classes that