gridle 1.1.0 → 1.2.0
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 +4 -5
- data/stylesheets/gridle/_common-mixins.scss +84 -0
- data/stylesheets/gridle/_functions.scss +291 -0
- data/stylesheets/gridle/_generate-mixins.scss +515 -0
- data/stylesheets/gridle/_gridle.scss +28 -1653
- data/stylesheets/gridle/_mixins.scss +670 -0
- data/stylesheets/gridle/_settings-mixins.scss +143 -0
- data/stylesheets/gridle/_settings.scss +84 -0
- data/stylesheets/gridle/_silent-classes.scss +102 -0
- metadata +12 -39
- data/stylesheets/gridle/_12-columns-classes.scss +0 -9
- data/stylesheets/gridle/_12-columns-responsive-classes.scss +0 -9
- data/stylesheets/gridle/_12-columns-responsive.scss +0 -14
- data/stylesheets/gridle/_12-columns.scss +0 -9
- data/stylesheets/gridle/_16-columns-classes.scss +0 -9
- data/stylesheets/gridle/_16-columns-responsive-classes.scss +0 -9
- data/stylesheets/gridle/_16-columns-responsive.scss +0 -14
- data/stylesheets/gridle/_16-columns.scss +0 -9
- data/stylesheets/gridle/_24-columns-classes.scss +0 -9
- data/stylesheets/gridle/_24-columns-responsive-classes.scss +0 -9
- data/stylesheets/gridle/_24-columns-responsive.scss +0 -14
- data/stylesheets/gridle/_24-columns.scss +0 -9
- data/stylesheets/gridle/_960gs-classes.scss +0 -9
- data/stylesheets/gridle/_960gs-responsive-classes.scss +0 -9
- data/stylesheets/gridle/_960gs-responsive.scss +0 -23
- data/stylesheets/gridle/_960gs.scss +0 -18
- data/stylesheets/gridle/_unsementic-classes.scss +0 -9
- data/stylesheets/gridle/_unsementic-responsive-classes.scss +0 -9
- data/stylesheets/gridle/_unsementic-responsive.scss +0 -23
- data/stylesheets/gridle/_unsementic.scss +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71e08f9885a041db51b60a914ac2411666b3b0e3
|
4
|
+
data.tar.gz: eb4b7f044f51df465da61dd05d71119da427db38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9dfc7c0a874e48eb2d60ed6ab4c87598c7b520a9b3f08e0d3b872ee708aa80b59bbf222f0e9ef8ee4008b5dbdb3352412c1230ea3139c8ad1415167001f4298
|
7
|
+
data.tar.gz: 6e3d69c5886e0ff4b663a3db1bece9356bfbf342479c9d1f76da24c9ed25826084dc8cf4bd9ed83f2a876e0c3ccf3d85c5006925938a5d51b84fca0886696773
|
data/lib/gridle.rb
CHANGED
@@ -2,13 +2,12 @@
|
|
2
2
|
# These are the requires you would normally put in your config.rb file
|
3
3
|
# By default, you should always included Compass. Do not include your
|
4
4
|
# extension.
|
5
|
-
require 'compass'
|
6
5
|
|
7
6
|
# This tells Compass what your Compass extension is called, and where to find
|
8
7
|
# its files
|
9
8
|
# Replace 'extension' with the name of your extension. Spaces allowed.
|
10
|
-
extension_path = File.expand_path(File.join(File.dirname(__FILE__), ".."))
|
11
|
-
Compass::Frameworks.register('gridle', :path => extension_path)
|
9
|
+
# extension_path = File.expand_path(File.join(File.dirname(__FILE__), ".."))
|
10
|
+
# Compass::Frameworks.register('gridle', :path => extension_path)
|
12
11
|
|
13
12
|
# Version and date of version for your Compass extension.
|
14
13
|
# Replace Extension with the name of your extension
|
@@ -17,8 +16,8 @@ Compass::Frameworks.register('gridle', :path => extension_path)
|
|
17
16
|
# a prerelease version
|
18
17
|
# Date is in the form of YYYY-MM-DD
|
19
18
|
module Extension
|
20
|
-
VERSION = "1.
|
21
|
-
DATE = "
|
19
|
+
VERSION = "1.2.0"
|
20
|
+
DATE = "2014-05-13"
|
22
21
|
end
|
23
22
|
|
24
23
|
# This is where any custom SassScript should be placed. The functions will be
|
@@ -0,0 +1,84 @@
|
|
1
|
+
// |------------------------------------------------------
|
2
|
+
// |------------------------------------------------------
|
3
|
+
// | Common mixins
|
4
|
+
// |------------------------------------------------------
|
5
|
+
// |------------------------------------------------------
|
6
|
+
|
7
|
+
@mixin _gridle_container_common() {
|
8
|
+
@extend %gridle-simple-clearfix;
|
9
|
+
@extend %gridle-container-common;
|
10
|
+
// debug part :
|
11
|
+
@if ($gridle-debug == true) {
|
12
|
+
#{$gridle-debug-selector} {
|
13
|
+
@extend %gridle-container-debug-common;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
17
|
+
@mixin _gridle_grid_common() {
|
18
|
+
@extend %gridle-grid-common;
|
19
|
+
@if $gridle-direction == rtl {
|
20
|
+
float:right;
|
21
|
+
direction:rtl;
|
22
|
+
} @else {
|
23
|
+
float:left;
|
24
|
+
direction:ltr;
|
25
|
+
}
|
26
|
+
|
27
|
+
@if $gridle-gutter-type == padding {
|
28
|
+
// set padding :
|
29
|
+
padding:0 $gridle-gutter-width/2;
|
30
|
+
}
|
31
|
+
|
32
|
+
@if $gridle-debug == true {
|
33
|
+
#{$gridle-debug-selector} {
|
34
|
+
@extend %gridle-grid-debug-common;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|
38
|
+
@mixin _gridle_parent_common() {
|
39
|
+
@extend %gridle-clearfix;
|
40
|
+
@extend %gridle-parent-common;
|
41
|
+
}
|
42
|
+
@mixin _gridle_push_common() {
|
43
|
+
// extend common :
|
44
|
+
@extend %gridle-push-pull-common;
|
45
|
+
@if $gridle-debug == true {
|
46
|
+
#{$gridle-debug-selector} {
|
47
|
+
@extend %gridle-push-pull-debug-background-common;
|
48
|
+
background-color:#f4efdf !important;
|
49
|
+
@if $gridle-direction == ltr {
|
50
|
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cm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AQQSSACBBBJAIIEEEEggAQQSSAARJAIEEkgAgQQSQCCBBBBIIAEEEkgAgQQSQCCBBBBBAogggQQQSCABBBJIAIEEEkAggQQQSCABBBJIABEkgAiSwkgAgQQSQCCBBBBIIAEEEkgAgQQSQCCBBBBB0gARJEWRAAIJJIBAAgkgkEACCCSQACJIABEk+ZEAAgkkgEACCSCQQAIIJJAAojEkZ0gA0XiQACJIABEkH5G0IUAESWIkgEACCSCQQAKIIAFEkAAiSJIgAQQSSACBBJKJLzLnySPCFM2BRFYQCRBp0W4CDAAOV/Wfo7G12gAAAABJRU5ErkJggg==);
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
57
|
+
@mixin _gridle_pull_common() {
|
58
|
+
@extend %gridle-push-pull-common;
|
59
|
+
@if $gridle-debug == true {
|
60
|
+
#{$gridle-debug-selector} {
|
61
|
+
@extend %gridle-push-pull-debug-background-common;
|
62
|
+
background-color:#cfe4d5 !important;
|
63
|
+
@if $gridle-direction == ltr {
|
64
|
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRw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K5CYII=);
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|
70
|
+
}
|
71
|
+
@mixin _gridle_prefix_common() {
|
72
|
+
@if $gridle-debug == true {
|
73
|
+
#{$gridle-debug-selector} {
|
74
|
+
@extend %gridle-prefix-debug-common;
|
75
|
+
}
|
76
|
+
}
|
77
|
+
}
|
78
|
+
@mixin _gridle_suffix_common() {
|
79
|
+
@if $gridle-debug == true {
|
80
|
+
#{$gridle-debug-selector} {
|
81
|
+
@extend %gridle-suffix-debug-common;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
@@ -0,0 +1,291 @@
|
|
1
|
+
// |------------------------------------------------------
|
2
|
+
// |------------------------------------------------------
|
3
|
+
// | Functions
|
4
|
+
// |------------------------------------------------------
|
5
|
+
// |------------------------------------------------------
|
6
|
+
|
7
|
+
|
8
|
+
/**
|
9
|
+
* Map set
|
10
|
+
*
|
11
|
+
* @param Map $map The map to use
|
12
|
+
* @param String $key The key to update
|
13
|
+
* @param Mixed $value The new value
|
14
|
+
* @return Map The new map
|
15
|
+
*/
|
16
|
+
@function map-set($map, $key, $value) {
|
17
|
+
$new: ($key: $value);
|
18
|
+
@return map-merge($map, $new);
|
19
|
+
}
|
20
|
+
|
21
|
+
|
22
|
+
/**
|
23
|
+
* Get the column width in percent for the global or a specific context
|
24
|
+
*
|
25
|
+
* @param int $columns The number of columns to calculate
|
26
|
+
* @param int $context : $gridle-columns-count The context to use
|
27
|
+
* @return percentage The width in percent
|
28
|
+
*/
|
29
|
+
@function gridle_get_columns_width(
|
30
|
+
$columns : 1,
|
31
|
+
$context : $gridle-columns-count
|
32
|
+
) {
|
33
|
+
@return percentage(1 / $context * $columns);
|
34
|
+
}
|
35
|
+
@function gridle_get_column_width(
|
36
|
+
$columns : 1,
|
37
|
+
$context : $gridle-columns-count
|
38
|
+
) {
|
39
|
+
@return gridle_get_columns_width($columns, $context);
|
40
|
+
}
|
41
|
+
|
42
|
+
|
43
|
+
/**
|
44
|
+
* Get a state map
|
45
|
+
*/
|
46
|
+
@function _gridle_get_state(
|
47
|
+
$name
|
48
|
+
) {
|
49
|
+
// if name if not a string, return null :
|
50
|
+
@if type-of($name) != string
|
51
|
+
{
|
52
|
+
@return false;
|
53
|
+
}
|
54
|
+
|
55
|
+
// check if has a state named like this :
|
56
|
+
@if (map-has-key($_gridle_states, $name))
|
57
|
+
{
|
58
|
+
@return map-get($_gridle_states, unquote($name));
|
59
|
+
}
|
60
|
+
|
61
|
+
@return false;
|
62
|
+
}
|
63
|
+
|
64
|
+
|
65
|
+
/**
|
66
|
+
* Get the media queries variables :
|
67
|
+
*
|
68
|
+
* @param int $index The media query indes
|
69
|
+
* @param String $var The media query variable name
|
70
|
+
* @return String|int The variable value
|
71
|
+
*/
|
72
|
+
@function _gridle_get_state_var(
|
73
|
+
$stateName,
|
74
|
+
$var : "name"
|
75
|
+
) {
|
76
|
+
|
77
|
+
// get the state :
|
78
|
+
$state : _gridle_get_state($stateName);
|
79
|
+
|
80
|
+
// check ig state and if has the variable :
|
81
|
+
@if $state
|
82
|
+
and map-has-key($state,unquote($var))
|
83
|
+
{
|
84
|
+
@return map-get($state,unquote($var));
|
85
|
+
}
|
86
|
+
|
87
|
+
// nothing getted :
|
88
|
+
@return null;
|
89
|
+
}
|
90
|
+
|
91
|
+
|
92
|
+
/**
|
93
|
+
* Set a variable in a state
|
94
|
+
* @param Mixed $stateName-or-stateIndex The state name of state index
|
95
|
+
* @param String $var Variable name to assign
|
96
|
+
* @param Mixed $newValue The new value to assign
|
97
|
+
* @return List The states list (full)
|
98
|
+
*/
|
99
|
+
@function _gridle_set_state_var(
|
100
|
+
$stateName,
|
101
|
+
$var,
|
102
|
+
$newValue
|
103
|
+
) {
|
104
|
+
// get the state :
|
105
|
+
$state : _gridle_get_state($stateName);
|
106
|
+
|
107
|
+
// check ig state and if has the variable :
|
108
|
+
@if $state
|
109
|
+
and map-has-key($state,unquote($var))
|
110
|
+
{
|
111
|
+
// set new value in state :
|
112
|
+
$state : map-set($state, unquote($var), $newValue);
|
113
|
+
|
114
|
+
// set states :
|
115
|
+
$_gridle_states : map-set($_gridle_states, unquote($stateName), $state);
|
116
|
+
|
117
|
+
// return new state :
|
118
|
+
@return $state;
|
119
|
+
}
|
120
|
+
|
121
|
+
// nothing getted :
|
122
|
+
@return null;
|
123
|
+
}
|
124
|
+
|
125
|
+
|
126
|
+
/**
|
127
|
+
* Generate a column
|
128
|
+
*
|
129
|
+
* @param String $name The column name (often count)
|
130
|
+
* @param int $columns The column count that the column will take
|
131
|
+
* @param int $context The context on witch the with will be calculed
|
132
|
+
* @param Boolean $generateClasses Set if the column has to be generated in css
|
133
|
+
*/
|
134
|
+
@function _gridle_create_column(
|
135
|
+
$name,
|
136
|
+
$columns,
|
137
|
+
$context,
|
138
|
+
$generateClasses : true
|
139
|
+
) {
|
140
|
+
@return (
|
141
|
+
name : $name,
|
142
|
+
columns : $columns,
|
143
|
+
context : $context,
|
144
|
+
generateClasses : $generateClasses
|
145
|
+
);
|
146
|
+
}
|
147
|
+
|
148
|
+
|
149
|
+
/**
|
150
|
+
* Generate classname
|
151
|
+
*
|
152
|
+
* @param List $parrern The pattern to use to generate classname
|
153
|
+
* @param String $state The state
|
154
|
+
* @param int $count The column count
|
155
|
+
*/
|
156
|
+
@function _gridle_classname(
|
157
|
+
$pattern,
|
158
|
+
$state : null,
|
159
|
+
$count : null
|
160
|
+
) {
|
161
|
+
|
162
|
+
// init selector :
|
163
|
+
$sel : ".";
|
164
|
+
|
165
|
+
// add class prefix :
|
166
|
+
@if $gridle-class-prefix and $gridle-class-prefix != '' {
|
167
|
+
$sel : "#{$sel}#{$gridle-class-prefix}";
|
168
|
+
@if $gridle-class-separator {
|
169
|
+
$sel : "#{$sel}#{$gridle-class-separator}";
|
170
|
+
}
|
171
|
+
}
|
172
|
+
|
173
|
+
// construct class name :
|
174
|
+
$i : 1;
|
175
|
+
@each $var in $pattern {
|
176
|
+
|
177
|
+
// replace tokens :
|
178
|
+
@if $var == '%state' and $state {
|
179
|
+
$sel : "#{$sel}#{$state}";
|
180
|
+
}
|
181
|
+
@if $var == '%count' and $count {
|
182
|
+
$sel : "#{$sel}#{$count}";
|
183
|
+
}
|
184
|
+
@if $var != '%state' and $var != '%count' and $var != '%-' and $var != '%prefix' {
|
185
|
+
$sel : "#{$sel}#{$var}";
|
186
|
+
}
|
187
|
+
|
188
|
+
// handle separators :
|
189
|
+
@if $var == '%-' and $i < length($pattern) {
|
190
|
+
$index : $i + 1;
|
191
|
+
$value : nth($pattern, $index);
|
192
|
+
@if $value != '%state' and $value != '%count' and $value != '%-' and $value != '%prefix' {
|
193
|
+
$sel : "#{$sel}#{$gridle-class-separator}";
|
194
|
+
}
|
195
|
+
@if $value == '%state' and $state {
|
196
|
+
$sel : "#{$sel}#{$gridle-class-separator}";
|
197
|
+
}
|
198
|
+
@if $value == '%count' and $count {
|
199
|
+
$sel : "#{$sel}#{$gridle-class-separator}";
|
200
|
+
}
|
201
|
+
}
|
202
|
+
|
203
|
+
// update i :
|
204
|
+
$i : $i + 1;
|
205
|
+
}
|
206
|
+
|
207
|
+
// return generated class :
|
208
|
+
@return $sel;
|
209
|
+
}
|
210
|
+
|
211
|
+
|
212
|
+
/**
|
213
|
+
* Get the media query for a particular state, or with, etc...
|
214
|
+
*
|
215
|
+
* @param Mixed $state-or-min-width The state name of the min with
|
216
|
+
* @param Mixed $max-width The max width if first param is a min width
|
217
|
+
* @return String The media query string without the @media
|
218
|
+
*/
|
219
|
+
@function _get_media_query_for_state(
|
220
|
+
$state-or-min-width : null,
|
221
|
+
$max-width : null
|
222
|
+
) {
|
223
|
+
|
224
|
+
// get the index of state :
|
225
|
+
$state : _gridle_get_state($state-or-min-width);
|
226
|
+
|
227
|
+
// if there's an idx, the state requested is a registered one :
|
228
|
+
@if $state {
|
229
|
+
|
230
|
+
// get vars :
|
231
|
+
$name : map-get($state, name);
|
232
|
+
$min-width : map-get($state, min-width);
|
233
|
+
$max-width : map-get($state, max-width);
|
234
|
+
$classes : map-get($state, classes);
|
235
|
+
$query : map-get($state, query);
|
236
|
+
|
237
|
+
// check if exist :
|
238
|
+
@if $name {
|
239
|
+
|
240
|
+
// check if query exist :
|
241
|
+
@if $query {
|
242
|
+
@return $query;
|
243
|
+
} @else {
|
244
|
+
|
245
|
+
// write media query :
|
246
|
+
@if $min-width and $max-width {
|
247
|
+
@return "screen and (min-width: #{$min-width}) and (max-width: #{$max-width})";
|
248
|
+
} @else if $min-width == null and $max-width {
|
249
|
+
@return "screen and (max-width: #{$max-width})";
|
250
|
+
} @else if $min-width and $max-width == null {
|
251
|
+
@return "screen and (min-width: #{$min-width})";
|
252
|
+
} @else {
|
253
|
+
@return false;
|
254
|
+
}
|
255
|
+
}
|
256
|
+
} @else {
|
257
|
+
@return "not working";
|
258
|
+
}
|
259
|
+
} @else if $state-or-min-width == 'print' or $state-or-min-width == print {
|
260
|
+
@return "only print";
|
261
|
+
} @else if $state-or-min-width == 'tv' or $state-or-min-width == tv {
|
262
|
+
@return "only tv";
|
263
|
+
} @else if $state-or-min-width == 'portrait' or $state-or-min-width == portrait {
|
264
|
+
@return "only screen and (orientation: portrait)";
|
265
|
+
} @else if $state-or-min-width == 'landscape' or $state-or-min-width == landscape {
|
266
|
+
@return "only screen and (orientation: landscape)";
|
267
|
+
} @else if $state-or-min-width == 'retina' or $state-or-min-width == retina {
|
268
|
+
@return "only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx)";
|
269
|
+
} @else {
|
270
|
+
// check for min and max width :
|
271
|
+
@if $state-or-min-width and $max-width {
|
272
|
+
@return "screen and (min-width: #{$state-or-min-width}) and (max-width: #{$max-width})";
|
273
|
+
} @else if $state-or-min-width and $max-width == null {
|
274
|
+
@return "screen and (min-width: #{$state-or-min-width})";
|
275
|
+
} @else if $state-or-min-width == null and $max-width {
|
276
|
+
@return "screen and (max-width: #{$max-width})";
|
277
|
+
} @else {
|
278
|
+
@return null;
|
279
|
+
}
|
280
|
+
}
|
281
|
+
}
|
282
|
+
|
283
|
+
|
284
|
+
/**
|
285
|
+
* Get states count
|
286
|
+
*
|
287
|
+
* @return int The number of states defined
|
288
|
+
*/
|
289
|
+
@function _gridle_get_states_count() {
|
290
|
+
@return length($_gridle_states) / length($_gridle_states_vars_pattern);
|
291
|
+
}
|
@@ -0,0 +1,515 @@
|
|
1
|
+
// |------------------------------------------------------
|
2
|
+
// |------------------------------------------------------
|
3
|
+
// | Generate mixins
|
4
|
+
// |------------------------------------------------------
|
5
|
+
// |------------------------------------------------------
|
6
|
+
|
7
|
+
// Generate all helpers classes
|
8
|
+
// All the classes generated are not wrapper in gridle_state
|
9
|
+
// in this mixin... Just the names are generated accordingly to the
|
10
|
+
// requested state
|
11
|
+
@mixin _gridle_generate_helper_classes (
|
12
|
+
$state : null
|
13
|
+
) {
|
14
|
+
// 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-gutters-name-pattern, $state)},
|
43
|
+
#{_gridle_classname($gridle-no-margins-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);
|
61
|
+
}
|
62
|
+
#{_gridle_classname($gridle-gutters-name-pattern, $state)},
|
63
|
+
#{_gridle_classname($gridle-margins-name-pattern, $state)} {
|
64
|
+
@include gridle_margin(left right);
|
65
|
+
}
|
66
|
+
#{_gridle_classname($gridle-gutter-left-name-pattern, $state)},
|
67
|
+
#{_gridle_classname($gridle-margin-left-name-pattern, $state)} {
|
68
|
+
@include gridle_margin(left);
|
69
|
+
}
|
70
|
+
#{_gridle_classname($gridle-gutter-right-name-pattern, $state)},
|
71
|
+
#{_gridle_classname($gridle-margin-right-name-pattern, $state)} {
|
72
|
+
@include gridle_margin(right);
|
73
|
+
}
|
74
|
+
#{_gridle_classname($gridle-gutter-top-name-pattern, $state)},
|
75
|
+
#{_gridle_classname($gridle-margin-top-name-pattern, $state)} {
|
76
|
+
@include gridle_margin(top);
|
77
|
+
}
|
78
|
+
#{_gridle_classname($gridle-gutter-bottom-name-pattern, $state)},
|
79
|
+
#{_gridle_classname($gridle-margin-bottom-name-pattern, $state)} {
|
80
|
+
@include gridle_margin(bottom);
|
81
|
+
}
|
82
|
+
#{_gridle_classname($gridle-auto-height-name-pattern, $state)} {
|
83
|
+
height:inherit;
|
84
|
+
}
|
85
|
+
#{_gridle_classname($gridle-centered-name-pattern, $state)} {
|
86
|
+
@include gridle_centered(null);
|
87
|
+
}
|
88
|
+
#{_gridle_classname($gridle-parent-name-pattern, $state)} {
|
89
|
+
@include _gridle_parent();
|
90
|
+
}
|
91
|
+
#{_gridle_classname($gridle-parent-vertical-align-name-pattern, $state)} {
|
92
|
+
@include _gridle_parent_vertical_align();
|
93
|
+
}
|
94
|
+
|
95
|
+
/**
|
96
|
+
* Clear each class :
|
97
|
+
*/
|
98
|
+
@each $clearName, $clearMap in $_gridle_clear_classes {
|
99
|
+
// get count :
|
100
|
+
$clearCount : map-get($clearMap, clearEach);
|
101
|
+
// what to clear :
|
102
|
+
$clearWhat : map-get($clearMap, clearWhat);
|
103
|
+
// generate the class :
|
104
|
+
#{_gridle_classname($gridle-clear-each-pattern, $state, $clearCount)} {
|
105
|
+
@include _gridle_clear_each($clearCount, $clearWhat, $state);
|
106
|
+
}
|
107
|
+
}
|
108
|
+
|
109
|
+
// debug colors :
|
110
|
+
@if $gridle-debug {
|
111
|
+
// debug color classes :
|
112
|
+
#{_gridle_classname($gridle-debug-color-name-pattern, $state, 1)} {
|
113
|
+
#{$gridle-debug-selector} {
|
114
|
+
background-color : #edeeb2;
|
115
|
+
}
|
116
|
+
}
|
117
|
+
#{_gridle_classname($gridle-debug-color-name-pattern, $state, 2)} {
|
118
|
+
#{$gridle-debug-selector} {
|
119
|
+
background-color : #fae4a7;
|
120
|
+
}
|
121
|
+
}
|
122
|
+
#{_gridle_classname($gridle-debug-color-name-pattern, $state, 3)} {
|
123
|
+
#{$gridle-debug-selector} {
|
124
|
+
background-color : #f5eacc;
|
125
|
+
}
|
126
|
+
}
|
127
|
+
#{_gridle_classname($gridle-debug-color-name-pattern, $state, 4)} {
|
128
|
+
#{$gridle-debug-selector} {
|
129
|
+
background-color : #eebdb2;
|
130
|
+
}
|
131
|
+
}
|
132
|
+
#{_gridle_classname($gridle-debug-color-name-pattern, $state, 5)} {
|
133
|
+
#{$gridle-debug-selector} {
|
134
|
+
background-color : #d4b2ee;
|
135
|
+
}
|
136
|
+
}
|
137
|
+
#{_gridle_classname($gridle-debug-color-name-pattern, $state, 6)} {
|
138
|
+
#{$gridle-debug-selector} {
|
139
|
+
background-color : #b2d8ee;
|
140
|
+
}
|
141
|
+
}
|
142
|
+
}
|
143
|
+
}
|
144
|
+
|
145
|
+
|
146
|
+
// generate settings json :
|
147
|
+
@mixin gridle_generate_json_settings(
|
148
|
+
$scope : default
|
149
|
+
) {
|
150
|
+
|
151
|
+
// settings content :
|
152
|
+
$gridle-settings-states : "{";
|
153
|
+
|
154
|
+
// generate all classes for differents media queries :
|
155
|
+
@each $stateName, $state in $_gridle_states {
|
156
|
+
|
157
|
+
$name : $stateName;
|
158
|
+
|
159
|
+
$gridle-settings-states : "#{$gridle-settings-states} \"#{$name}\":{";
|
160
|
+
|
161
|
+
@each $varName, $var in $state {
|
162
|
+
|
163
|
+
$value : null;
|
164
|
+
@if $varName == "query" {
|
165
|
+
$value : _get_media_query_for_state($stateName);
|
166
|
+
} @else {
|
167
|
+
$value : map-get($state,$varName);
|
168
|
+
// $value : _gridle_get_state_var($i,$var);
|
169
|
+
}
|
170
|
+
|
171
|
+
@if $value == null {
|
172
|
+
$gridle-settings-states : "#{$gridle-settings-states} \"#{$varName}\" : null,";
|
173
|
+
} @elseif $var == 'context' or $var == 'classes' {
|
174
|
+
$gridle-settings-states : "#{$gridle-settings-states} \"#{$varName}\" : #{$value},";
|
175
|
+
} @else {
|
176
|
+
$gridle-settings-states : "#{$gridle-settings-states} \"#{$varName}\" : \"#{$value}\",";
|
177
|
+
}
|
178
|
+
}
|
179
|
+
|
180
|
+
$gridle-settings-states : "#{$gridle-settings-states} },";
|
181
|
+
|
182
|
+
}
|
183
|
+
|
184
|
+
// generate settings json :
|
185
|
+
$gridle-settings-states : "#{$gridle-settings-states}}";
|
186
|
+
$gridle-settings : "{";
|
187
|
+
$gridle-settings : "#{$gridle-settings} \"version\" : \"#{$_gridle-version}\"";
|
188
|
+
|
189
|
+
// states :
|
190
|
+
$gridle-settings : "#{$gridle-settings}, \"states\" : #{$gridle-settings-states}";
|
191
|
+
|
192
|
+
// debug devices :
|
193
|
+
$debug_devices : $_gridle_states_debug_devices;
|
194
|
+
@if length($_gridle_states_debug_devices) <= 0 {
|
195
|
+
$debug_devices : null;
|
196
|
+
}
|
197
|
+
$gridle-settings : "#{$gridle-settings}, \"debugDevices\" : { #{$debug_devices} }";
|
198
|
+
|
199
|
+
// settings :
|
200
|
+
$gridle-settings : "#{$gridle-settings}, \"columnsCount\" : #{$gridle-columns-count}";
|
201
|
+
$gridle-settings : "#{$gridle-settings}, \"gutterWidth\" : \"#{$gridle-gutter-width}\"";
|
202
|
+
$gridle-settings : "#{$gridle-settings}, \"nameMultiplicator\" : #{$gridle-name-multiplicator}";
|
203
|
+
$gridle-settings : "#{$gridle-settings}, \"direction\" : \"#{$gridle-direction}\"";
|
204
|
+
$gridle-settings : "#{$gridle-settings}, \"ie7Support\" : #{$gridle-ie7-support}";
|
205
|
+
$gridle-settings : "#{$gridle-settings}, \"debug\" : #{$gridle-debug}";
|
206
|
+
$gridle-settings : "#{$gridle-settings}, \"debugShowClassNames\" : #{$gridle-debug-show-class-names}";
|
207
|
+
$gridle-settings : "#{$gridle-settings}, \"htmlStatesClasses\" : #{$gridle-html-states-classes}";
|
208
|
+
$gridle-settings : "#{$gridle-settings}, \"generateHelpersClasses\" : #{$gridle-generate-helpers-classes}";
|
209
|
+
$gridle-settings : "#{$gridle-settings}, \"generatePushClasses\" : #{$gridle-generate-push-classes}";
|
210
|
+
$gridle-settings : "#{$gridle-settings}, \"generatePullClasses\" : #{$gridle-generate-pull-classes}";
|
211
|
+
$gridle-settings : "#{$gridle-settings}, \"generatePrefixClasses\" : #{$gridle-generate-prefix-classes}";
|
212
|
+
$gridle-settings : "#{$gridle-settings}, \"generateSuffixClasses\" : #{$gridle-generate-suffix-classes}";
|
213
|
+
$gridle-settings : "#{$gridle-settings}, \"classPrefix\" : \"#{$gridle-class-prefix}\"";
|
214
|
+
$gridle-settings : "#{$gridle-settings} }";
|
215
|
+
#gridle-settings-#{$scope} {
|
216
|
+
content : $gridle-settings;
|
217
|
+
}
|
218
|
+
}
|
219
|
+
|
220
|
+
|
221
|
+
// gridle mixin :
|
222
|
+
// Generate all the classes needed for a grid
|
223
|
+
@mixin gridle_generate_classes(
|
224
|
+
$scope : null
|
225
|
+
) {
|
226
|
+
// check if a scope exist :
|
227
|
+
@if $scope {
|
228
|
+
// wrapp grid into scope :
|
229
|
+
.#{$scope} {
|
230
|
+
@include _gridle_generate_classes(true);
|
231
|
+
}
|
232
|
+
} @else {
|
233
|
+
// generate classes :
|
234
|
+
@include _gridle_generate_classes(false);
|
235
|
+
}
|
236
|
+
}
|
237
|
+
@mixin _gridle_generate_classes(
|
238
|
+
$has-parent
|
239
|
+
) {
|
240
|
+
|
241
|
+
// check if debug is activated :
|
242
|
+
@if $gridle-debug {
|
243
|
+
$gridle-html-states-classes : true !global;
|
244
|
+
}
|
245
|
+
|
246
|
+
|
247
|
+
// | ------------------------
|
248
|
+
// | Windows 8 fix
|
249
|
+
// | ------------------------
|
250
|
+
|
251
|
+
// Windows 8 fix for snap mode :
|
252
|
+
@media screen and (max-width: 400px) {
|
253
|
+
@-ms-viewport { width: device-width; }
|
254
|
+
}
|
255
|
+
|
256
|
+
|
257
|
+
// | ------------------------
|
258
|
+
// | Container
|
259
|
+
// | ------------------------
|
260
|
+
|
261
|
+
// generate container class :
|
262
|
+
$container-selector : ();
|
263
|
+
$container-selector : append( $container-selector, unquote(_gridle_classname($gridle-container-name-pattern)), comma);
|
264
|
+
#{$container-selector} {
|
265
|
+
@include gridle_container();
|
266
|
+
}
|
267
|
+
|
268
|
+
|
269
|
+
// | ------------------------
|
270
|
+
// | Parent selector
|
271
|
+
// | ------------------------
|
272
|
+
|
273
|
+
// parent common css :
|
274
|
+
$parentSelector : _gridle_classname($gridle-parent-name-pattern,null,null);
|
275
|
+
#{$parentSelector} {
|
276
|
+
@extend %gridle-clearfix;
|
277
|
+
@extend %gridle-parent-common;
|
278
|
+
}
|
279
|
+
|
280
|
+
// | ------------------------
|
281
|
+
// | Store all the generated common selectors
|
282
|
+
// | ------------------------
|
283
|
+
|
284
|
+
// generate all selector for extends :
|
285
|
+
$common-selector : ();
|
286
|
+
$push-common-selector : ();
|
287
|
+
$pull-common-selector : ();
|
288
|
+
$prefix-common-selector : ();
|
289
|
+
$suffix-common-selector : ();
|
290
|
+
|
291
|
+
|
292
|
+
// | ------------------------
|
293
|
+
// | Default classes
|
294
|
+
// | ------------------------
|
295
|
+
|
296
|
+
// get specials columns :
|
297
|
+
$columnsMap : map-merge((), $_gridle_columns);
|
298
|
+
|
299
|
+
// register all default columns :
|
300
|
+
@for $i from 0 through $gridle-columns-count {
|
301
|
+
|
302
|
+
// name :
|
303
|
+
$columnName : "#{$i*$gridle-name-multiplicator}";
|
304
|
+
|
305
|
+
// create a column :
|
306
|
+
$col : _gridle_create_column($columnName, $i, $gridle-columns-count);
|
307
|
+
|
308
|
+
// add column in columns map :
|
309
|
+
$columnsMap : map-set($columnsMap, $columnName, $col);
|
310
|
+
}
|
311
|
+
|
312
|
+
// generate all classes for columns :
|
313
|
+
@each $columnName, $column in $columnsMap {
|
314
|
+
|
315
|
+
// variables :
|
316
|
+
$columnsCount : map-get($column, columns);
|
317
|
+
$context : map-get($column, context);
|
318
|
+
|
319
|
+
// classes :
|
320
|
+
#{_gridle_classname($gridle-grid-name-pattern, null, $columnName)} {
|
321
|
+
@include _gridle($columnsCount, null, $context);
|
322
|
+
}
|
323
|
+
@if $gridle-generate-push-classes == true {
|
324
|
+
#{_gridle_classname($gridle-push-name-pattern, null, $columnName)} {
|
325
|
+
@include _gridle_push($columnsCount, null, $context);
|
326
|
+
}
|
327
|
+
}
|
328
|
+
@if $gridle-generate-pull-classes == true {
|
329
|
+
#{_gridle_classname($gridle-pull-name-pattern, null, $columnName)} {
|
330
|
+
@include _gridle_pull($columnsCount, null, $context);
|
331
|
+
}
|
332
|
+
}
|
333
|
+
@if $gridle-generate-prefix-classes == true {
|
334
|
+
#{_gridle_classname($gridle-prefix-name-pattern, null, $columnName)} {
|
335
|
+
@include _gridle_prefix($columnsCount, null, $context);
|
336
|
+
}
|
337
|
+
}
|
338
|
+
@if $gridle-generate-suffix-classes == true {
|
339
|
+
#{_gridle_classname($gridle-suffix-name-pattern, null, $columnName)} {
|
340
|
+
@include _gridle_suffix($columnsCount, null, $context);
|
341
|
+
}
|
342
|
+
}
|
343
|
+
}
|
344
|
+
|
345
|
+
// helpers classes :
|
346
|
+
@if $gridle-generate-helpers-classes == true {
|
347
|
+
@include _gridle_generate_helper_classes();
|
348
|
+
}
|
349
|
+
|
350
|
+
// loop on each columns to generate common selector :
|
351
|
+
@each $columnName, $column in $columnsMap {
|
352
|
+
|
353
|
+
// selectors :
|
354
|
+
$common-selector : append( $common-selector, unquote(_gridle_classname($gridle-grid-name-pattern, null, $columnName)), comma );
|
355
|
+
$push-common-selector : append( $push-common-selector, unquote(_gridle_classname($gridle-push-name-pattern, null, $columnName)), comma );
|
356
|
+
$pull-common-selector : append( $pull-common-selector, unquote(_gridle_classname($gridle-pull-name-pattern, null, $columnName)), comma );
|
357
|
+
$prefix-common-selector : append( $prefix-common-selector, unquote(_gridle_classname($gridle-prefix-name-pattern, null, $columnName)), comma );
|
358
|
+
$suffix-common-selector : append( $suffix-common-selector, unquote(_gridle_classname($gridle-suffix-name-pattern, null, $columnName)), comma );
|
359
|
+
}
|
360
|
+
|
361
|
+
// | ------------------------
|
362
|
+
// | Media queries classes common selectors
|
363
|
+
// | ------------------------
|
364
|
+
|
365
|
+
// generate all classes for media queries :
|
366
|
+
@each $stateName, $state in $_gridle_states {
|
367
|
+
|
368
|
+
// setup vars :
|
369
|
+
$media : $stateName;
|
370
|
+
$classes : map-get($state, "classes");
|
371
|
+
$context : map-get($state, "context");
|
372
|
+
|
373
|
+
// generate classes :
|
374
|
+
@if $media and $classes == true and $context {
|
375
|
+
|
376
|
+
// get specials columns :
|
377
|
+
$columnsMap : map-merge((), $_gridle_columns);
|
378
|
+
|
379
|
+
// register each default columns :
|
380
|
+
@for $j from 0 through $context {
|
381
|
+
|
382
|
+
// name :
|
383
|
+
$columnName : "#{$j*$gridle-name-multiplicator}";
|
384
|
+
|
385
|
+
// // create a column :
|
386
|
+
$col : _gridle_create_column($columnName, $j, $context);
|
387
|
+
|
388
|
+
// // add column in columns map :
|
389
|
+
$columnsMap : map-set($columnsMap, $columnName, $col);
|
390
|
+
}
|
391
|
+
|
392
|
+
// loop on each columns to generate common selector :
|
393
|
+
@each $columnName, $column in $columnsMap {
|
394
|
+
|
395
|
+
// add selector :
|
396
|
+
$common-selector : append( $common-selector, unquote(_gridle_classname($gridle-grid-name-pattern, $media, $columnName)), comma );
|
397
|
+
$push-common-selector : append( $push-common-selector, unquote(_gridle_classname($gridle-push-name-pattern, $media, $columnName)), comma );
|
398
|
+
$pull-common-selector : append( $pull-common-selector, unquote(_gridle_classname($gridle-pull-name-pattern, $media, $columnName)), comma );
|
399
|
+
$prefix-common-selector : append( $prefix-common-selector, unquote(_gridle_classname($gridle-prefix-name-pattern, $media, $columnName)), comma );
|
400
|
+
$suffix-common-selector : append( $suffix-common-selector, unquote(_gridle_classname($gridle-suffix-name-pattern, $media, $columnName)), comma );
|
401
|
+
}
|
402
|
+
}
|
403
|
+
}
|
404
|
+
|
405
|
+
// common css :
|
406
|
+
#{$push-common-selector} {
|
407
|
+
@include _gridle_push_common();
|
408
|
+
}
|
409
|
+
#{$pull-common-selector} {
|
410
|
+
@include _gridle_pull_common();
|
411
|
+
}
|
412
|
+
#{$prefix-common-selector} {
|
413
|
+
@include _gridle_prefix_common();
|
414
|
+
}
|
415
|
+
#{$suffix-common-selector} {
|
416
|
+
@include _gridle_suffix_common();
|
417
|
+
}
|
418
|
+
#{$common-selector} {
|
419
|
+
@include _gridle_grid_common();
|
420
|
+
}
|
421
|
+
|
422
|
+
|
423
|
+
// | ------------------------
|
424
|
+
// | Media queries classes
|
425
|
+
// | ------------------------
|
426
|
+
|
427
|
+
// generate all classes for differents media queries :
|
428
|
+
@each $stateName, $state in $_gridle_states {
|
429
|
+
|
430
|
+
// setup vars :
|
431
|
+
$media : $stateName;
|
432
|
+
$classes : map-get($state, "classes");
|
433
|
+
$min-width : map-get($state, "min-width");
|
434
|
+
$max-width : map-get($state, "max-width");
|
435
|
+
$query : map-get($state, "query");
|
436
|
+
$context : map-get($state, "context");
|
437
|
+
|
438
|
+
// parent common css :
|
439
|
+
$parentSelector : _gridle_classname($gridle-parent-name-pattern,$media,null);
|
440
|
+
#{$parentSelector} {
|
441
|
+
@extend %gridle-clearfix;
|
442
|
+
@extend %gridle-parent-common;
|
443
|
+
}
|
444
|
+
|
445
|
+
// generate all media queries grid classes :
|
446
|
+
@if $media and $classes == true {
|
447
|
+
|
448
|
+
// generate all the classes :
|
449
|
+
@include gridle_state($media, null, $has-parent) {
|
450
|
+
|
451
|
+
// get specials columns :
|
452
|
+
$columnsMap : map-merge((), $_gridle_columns);
|
453
|
+
|
454
|
+
// register each default columns :
|
455
|
+
@for $j from 0 through $context {
|
456
|
+
|
457
|
+
// name :
|
458
|
+
$columnName : "#{$j*$gridle-name-multiplicator}";
|
459
|
+
|
460
|
+
// // create a column :
|
461
|
+
$col : _gridle_create_column($columnName, $j, $context);
|
462
|
+
|
463
|
+
// // add column in columns map :
|
464
|
+
$columnsMap : map-set($columnsMap, $columnName, $col);
|
465
|
+
}
|
466
|
+
|
467
|
+
// generate all classes for columns :
|
468
|
+
@each $columnName, $column in $columnsMap {
|
469
|
+
|
470
|
+
// variables :
|
471
|
+
$columnsCount : map-get($column, columns);
|
472
|
+
$context : map-get($column, context);
|
473
|
+
|
474
|
+
// classes :
|
475
|
+
#{_gridle_classname($gridle-grid-name-pattern, $media, $columnName)} {
|
476
|
+
@include _gridle($columnsCount, $media, $context);
|
477
|
+
}
|
478
|
+
@if $gridle-generate-push-classes == true {
|
479
|
+
#{_gridle_classname($gridle-push-name-pattern, $media, $columnName)} {
|
480
|
+
@include _gridle_push($columnsCount, $media, $context);
|
481
|
+
}
|
482
|
+
}
|
483
|
+
@if $gridle-generate-pull-classes == true {
|
484
|
+
#{_gridle_classname($gridle-pull-name-pattern, $media, $columnName)} {
|
485
|
+
@include _gridle_pull($columnsCount, $media, $context);
|
486
|
+
}
|
487
|
+
}
|
488
|
+
@if $gridle-generate-prefix-classes == true {
|
489
|
+
#{_gridle_classname($gridle-prefix-name-pattern, $media, $columnName)} {
|
490
|
+
@include _gridle_prefix($columnsCount, $media, $context);
|
491
|
+
}
|
492
|
+
}
|
493
|
+
@if $gridle-generate-suffix-classes == true {
|
494
|
+
#{_gridle_classname($gridle-suffix-name-pattern, $media, $columnName)} {
|
495
|
+
@include _gridle_suffix($columnsCount, $media, $context);
|
496
|
+
}
|
497
|
+
}
|
498
|
+
}
|
499
|
+
|
500
|
+
// media queries helpers classes :
|
501
|
+
@if $gridle-generate-helpers-classes == true and $media {
|
502
|
+
@include _gridle_generate_helper_classes($media);
|
503
|
+
}
|
504
|
+
}
|
505
|
+
}
|
506
|
+
}
|
507
|
+
|
508
|
+
|
509
|
+
// | ------------------------
|
510
|
+
// | JSON Settings
|
511
|
+
// | ------------------------
|
512
|
+
|
513
|
+
// generate json settings :
|
514
|
+
@include gridle_generate_json_settings();
|
515
|
+
}
|