neat 1.7.0.pre → 1.7.0.rc
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +5 -13
- data/README.md +133 -106
- data/app/assets/stylesheets/_neat.scss +3 -3
- data/app/assets/stylesheets/functions/_new-breakpoint.scss +33 -3
- data/app/assets/stylesheets/functions/_private.scss +16 -22
- data/app/assets/stylesheets/grid/{_direction.scss → _direction-context.scss} +7 -8
- data/app/assets/stylesheets/grid/{_display.scss → _display-context.scss} +4 -5
- data/app/assets/stylesheets/grid/_fill-parent.scss +16 -0
- data/app/assets/stylesheets/grid/_media.scss +66 -11
- data/app/assets/stylesheets/grid/_omega.scss +34 -3
- data/app/assets/stylesheets/grid/_outer-container.scss +20 -21
- data/app/assets/stylesheets/grid/_pad.scss +16 -0
- data/app/assets/stylesheets/grid/_private.scss +2 -10
- data/app/assets/stylesheets/grid/_row.scss +29 -0
- data/app/assets/stylesheets/grid/_shift.scss +34 -0
- data/app/assets/stylesheets/grid/_span-columns.scss +49 -1
- data/app/assets/stylesheets/grid/_to-deprecate.scss +36 -0
- data/app/assets/stylesheets/grid/_visual-grid.scss +1 -1
- data/app/assets/stylesheets/settings/_disable-warnings.scss +0 -1
- data/app/assets/stylesheets/settings/_grid.scss +53 -5
- data/app/assets/stylesheets/settings/_visual-grid.scss +26 -2
- data/bower.json +3 -1
- data/lib/neat/version.rb +1 -1
- data/sache.json +5 -0
- data/spec/neat/direction_spec.rb +2 -2
- data/spec/neat/display_spec.rb +2 -2
- data/test/{direction.scss → direction-context.scss} +2 -2
- data/test/{display.scss → display-context.scss} +3 -3
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b996a39a49ee89437c9c66930f7fd860660e166e
|
4
|
+
data.tar.gz: 0e1980f94876d7b98af734c6fb440e15a276a402
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a3492e5b9833cd55345dfd0637328b8321ee1990940f78a3467f149c06de28504f25240ffc94d4486cfe7386d8f7540dd59f0b8fa18b1d33dab056da627a38d
|
7
|
+
data.tar.gz: 4c2cda58fd79e13d074f61133304433bbc61ca19234d9193b400027dc6e822a18656c7130417f85cd7b1d661568c48291185e9feb80321980b1d1abd5fd3b2e2
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,99 +1,130 @@
|
|
1
|
-
[![
|
2
|
-
|
3
|
-
-
|
1
|
+
[![Neat](http://neat.bourbon.io/images/logotype.svg)](http://neat.bourbon.io)
|
4
2
|
|
5
3
|
[![Gem Version](http://img.shields.io/gem/v/neat.svg?style=flat)](https://rubygems.org/gems/neat) [![Travis](http://img.shields.io/travis/thoughtbot/neat.svg?style=flat)](https://travis-ci.org/thoughtbot/neat)
|
6
4
|
[![Code Climate](http://img.shields.io/codeclimate/github/thoughtbot/neat.svg?style=flat)](https://codeclimate.com/github/thoughtbot/neat)
|
7
5
|
[![IRC](http://img.shields.io/badge/freenode-%23bourbon--neat-ae3dd2.svg?style=flat)](#)
|
8
6
|
[![Stack Overflow](http://img.shields.io/badge/stack%20overflow-neat-ae3dd2.svg?style=flat)](http://stackoverflow.com/questions/tagged/neat)
|
9
7
|
|
10
|
-
|
8
|
+
***
|
11
9
|
|
12
|
-
|
10
|
+
## A lightweight, semantic grid framework built on top of Bourbon
|
13
11
|
|
14
|
-
|
15
|
-
===
|
16
|
-
- Sass 3.3+
|
17
|
-
- Bourbon 3.1+
|
12
|
+
Neat is a fluid grid framework built on [Bourbon](http://bourbon.io) with the aim of being easy enough to use out of the box and flexible enough to customize down the road.
|
18
13
|
|
19
|
-
|
20
|
-
===
|
21
|
-
Install/update the dependencies first:
|
14
|
+
#### [Documentation & Demo](http://neat.bourbon.io)
|
22
15
|
|
23
|
-
|
24
|
-
gem install sass #or gem update sass
|
25
|
-
gem install bourbon #or gem update bourbon
|
26
|
-
```
|
27
|
-
Install Neat:
|
16
|
+
#### [Changelog](https://github.com/thoughtbot/neat/releases)
|
28
17
|
|
29
|
-
|
30
|
-
gem install neat
|
31
|
-
```
|
32
|
-
Then `cd` to your Sass directory and run:
|
18
|
+
## Requirements
|
33
19
|
|
34
|
-
|
35
|
-
bourbon
|
36
|
-
neat
|
37
|
-
```
|
20
|
+
- [Sass](https://github.com/sass/sass) 3.3+
|
21
|
+
- [Bourbon](https://github.com/thoughtbot/bourbon) 3.1+
|
22
|
+
- :warning: If you are using Neat with **LibSass**, **sass-rails**, **Compass**, **Foundation** or need **Sass 3.2 support**, you should [use Neat 1.5.1](#installing-older-versions-of-neat).
|
38
23
|
|
39
|
-
|
24
|
+
## Installation
|
40
25
|
|
41
|
-
|
42
|
-
@import 'bourbon/bourbon';
|
43
|
-
@import 'neat/neat';
|
44
|
-
```
|
26
|
+
Neat uses the [RubyGems](https://rubygems.org) package manager to easily generate a `neat` directory with all of the necessary files.
|
45
27
|
|
46
|
-
|
28
|
+
1. Install the Neat gem:
|
47
29
|
|
48
|
-
```bash
|
49
|
-
neat
|
50
|
-
```
|
30
|
+
```bash
|
31
|
+
gem install neat
|
32
|
+
```
|
51
33
|
|
52
|
-
|
34
|
+
2. Install or update Neat’s dependencies:
|
53
35
|
|
54
|
-
```bash
|
55
|
-
|
56
|
-
```
|
36
|
+
```bash
|
37
|
+
gem install sass # or gem update sass
|
38
|
+
```
|
39
|
+
```bash
|
40
|
+
gem install bourbon # or gem update bourbon
|
41
|
+
```
|
57
42
|
|
58
|
-
|
59
|
-
===
|
43
|
+
3. Install the Neat library into the current directory:
|
60
44
|
|
61
|
-
|
45
|
+
```bash
|
46
|
+
bourbon install # if not already installed
|
47
|
+
```
|
48
|
+
```bash
|
49
|
+
neat install
|
50
|
+
```
|
62
51
|
|
63
|
-
|
64
|
-
gem 'neat'
|
65
|
-
```
|
52
|
+
4. Import Neat in your stylesheet, after Bourbon:
|
66
53
|
|
67
|
-
|
54
|
+
```scss
|
55
|
+
@import "bourbon/bourbon";
|
56
|
+
@import "neat/neat";
|
57
|
+
```
|
68
58
|
|
69
|
-
|
59
|
+
It’s not recommended to add or modify the Neat files so that you can update them easily.
|
70
60
|
|
71
|
-
|
72
|
-
|
73
|
-
|
61
|
+
## Installation for Ruby on Rails
|
62
|
+
|
63
|
+
1. Add Neat to your Gemfile:
|
64
|
+
|
65
|
+
```ruby
|
66
|
+
gem 'neat'
|
67
|
+
```
|
68
|
+
|
69
|
+
2. Then run:
|
70
|
+
|
71
|
+
```bash
|
72
|
+
bundle install
|
73
|
+
```
|
74
|
+
|
75
|
+
If you see the error `Bundler could not find compatible versions for gem "sass"`, run:
|
76
|
+
|
77
|
+
```bash
|
78
|
+
bundle update sass
|
79
|
+
```
|
80
|
+
|
81
|
+
3. Import Neat in your `application.css.scss`, after Bourbon:
|
82
|
+
|
83
|
+
```scss
|
84
|
+
@import "bourbon";
|
85
|
+
@import "neat";
|
86
|
+
```
|
87
|
+
|
88
|
+
## Installing older versions of Neat
|
74
89
|
|
75
|
-
|
90
|
+
1. Uninstall any Neat gem versions you already have:
|
76
91
|
|
77
|
-
```
|
78
|
-
|
79
|
-
|
92
|
+
```bash
|
93
|
+
gem uninstall neat
|
94
|
+
```
|
95
|
+
|
96
|
+
2. Reinstall the Neat gem, using the `-v` flag to specify the version you need:
|
97
|
+
|
98
|
+
```bash
|
99
|
+
gem install neat -v 1.5.1
|
100
|
+
```
|
101
|
+
|
102
|
+
3. Follow the [instructions above](#installation) to install Neat into your project.
|
103
|
+
|
104
|
+
## Command line interface
|
105
|
+
|
106
|
+
```bash
|
107
|
+
neat install
|
108
|
+
neat update
|
109
|
+
neat remove
|
80
110
|
```
|
81
111
|
|
82
|
-
|
83
|
-
|
112
|
+
More information can be found in the [wiki](https://github.com/thoughtbot/neat/wiki/Command-Line-Interface).
|
113
|
+
|
114
|
+
## Using Neat
|
84
115
|
|
85
116
|
First off, if you are planning to override the default grid settings (12 columns), it is recommended to create a `_grid-settings.scss` file for that purpose. Make sure to import it right *before* importing Neat:
|
86
117
|
|
87
118
|
```scss
|
88
|
-
@import
|
89
|
-
@import
|
90
|
-
@import
|
119
|
+
@import "bourbon/bourbon"; // or "bourbon" when in Rails
|
120
|
+
@import "grid-settings";
|
121
|
+
@import "neat/neat"; // or "neat" when in Rails
|
91
122
|
```
|
92
123
|
|
93
124
|
In your newly created `_grid-settings.scss`, import `neat-helpers` if you are planning to use `new-breakpoint()`, then define your new variables:
|
94
125
|
|
95
126
|
```scss
|
96
|
-
@import
|
127
|
+
@import "neat/neat-helpers"; // or "neat-helpers" when in Rails
|
97
128
|
|
98
129
|
// Change the grid settings
|
99
130
|
$column: 90px;
|
@@ -124,7 +155,7 @@ div.element {
|
|
124
155
|
}
|
125
156
|
```
|
126
157
|
|
127
|
-
If the element
|
158
|
+
If the element’s parent isn’t the top-most container, you need to add the number of columns of the parent element to keep the right proportions:
|
128
159
|
|
129
160
|
```scss
|
130
161
|
div.container {
|
@@ -163,45 +194,27 @@ To make your layout responsive, use the `media()` mixin to modify both the grid
|
|
163
194
|
}
|
164
195
|
```
|
165
196
|
|
166
|
-
By setting `$visual-grid` to `true`, you can display the base grid in the background (default) or as an overlay. You can even change the color and opacity of the grid-lines by overriding the default settings as detailed in the section below.
|
197
|
+
By setting `$visual-grid` to `true`, you can display the base grid in the background (default) or as an overlay. You can even change the color and opacity of the grid-lines by overriding the default settings as detailed in the section below.
|
167
198
|
|
168
199
|
The visual grid reflects the changes applied to the grid via the `new-breakpoint()` mixin, as long as the media contexts are defined *before* importing Neat.
|
169
200
|
|
170
|
-
|
171
|
-
===
|
172
|
-
- Firefox 3.5+
|
173
|
-
- Safari 4.0+
|
174
|
-
- Chrome 4.0+
|
175
|
-
- Opera 9.5+
|
176
|
-
- IE 9+ (Visual grid is IE10 only)
|
177
|
-
- IE 8 with [selectivizr](http://selectivizr.com) (no `media()` support)
|
201
|
+
## FAQ
|
178
202
|
|
179
|
-
|
180
|
-
==========================
|
203
|
+
#### How do I use `omega()` in a mobile-first workflow?
|
181
204
|
|
182
|
-
|
183
|
-
|
184
|
-
Using `omega()` with an `nth-child` pseudo selector in a mobile-first workflow
|
185
|
-
will cause the style to be applied to wider-viewport media queries as well. That
|
205
|
+
Using `omega()` with an `nth-child` pseudo selector in a mobile-first workflow will cause the style to be applied to wider-viewport media queries as well. That
|
186
206
|
is the cascading nature of CSS.
|
187
207
|
|
188
|
-
One solution would be to provide an `omega-reset()` mixin that negates the
|
189
|
-
|
190
|
-
often the most suggested solution, it is also a lazy hack that outputs ugly code
|
191
|
-
and can quickly get out of hand in complex layouts. As a general rule, having to
|
192
|
-
*undo* CSS styles is a sign of poor stylesheet architecture (More about
|
193
|
-
[CSS code smells](http://csswizardry.com/2012/11/code-smells-in-css/)).
|
208
|
+
One solution would be to provide an `omega-reset()` mixin that negates the effect of `omega()` on that specific `nth-child` pseudo selector. While this is
|
209
|
+
often the most suggested solution, it is also a lazy hack that outputs ugly code and can quickly get out of hand in complex layouts. As a general rule, having to *undo* CSS styles is a sign of poor stylesheet architecture (more about [CSS code smells](http://csswizardry.com/2012/11/code-smells-in-css/)).
|
194
210
|
|
195
|
-
The other, more elegant, solution is to use mutually exclusive media queries,
|
196
|
-
|
197
|
-
splitting](http://simurai.com/blog/2012/08/29/media-query-splitting/). This
|
198
|
-
would guarantee that `omega()` styles are only applied where desired.
|
211
|
+
The other, more elegant, solution is to use mutually exclusive media queries, also referred to as [media-query
|
212
|
+
splitting](http://simurai.com/blog/2012/08/29/media-query-splitting). This would guarantee that `omega()` styles are only applied where desired.
|
199
213
|
|
200
214
|
```scss
|
201
215
|
$first-breakpoint-value: 400px;
|
202
216
|
$second-breakpoint-value: 700px;
|
203
|
-
$medium-viewport: new-breakpoint(min-width em($first-breakpoint-value) max-width
|
204
|
-
em($second-breakpoint-value));
|
217
|
+
$medium-viewport: new-breakpoint(min-width em($first-breakpoint-value) max-width em($second-breakpoint-value));
|
205
218
|
$large-viewport: new-breakpoint(min-width em($second-breakpoint-value + 1));
|
206
219
|
|
207
220
|
.element {
|
@@ -217,35 +230,49 @@ $large-viewport: new-breakpoint(min-width em($second-breakpoint-value + 1));
|
|
217
230
|
}
|
218
231
|
```
|
219
232
|
|
220
|
-
If, for some reason, you still think that `omega-reset` is the only way you want to go,
|
221
|
-
|
222
|
-
|
233
|
+
If, for some reason, you still think that `omega-reset` is the only way you want to go, check out Josh Fry’s [omega-reset](http://joshfry.me/blog/2013/05/13/omega-reset-for-bourbon-neat).
|
234
|
+
|
235
|
+
#### Why are the elements not properly aligned with the visual grid?
|
236
|
+
|
237
|
+
The visual grid is built using CSS gradients whose stops might contain decimal values depending on the default settings of your grid. In order to render the gradient, browsers round the pixel values since they can’t deal with pixel fractions.
|
238
|
+
|
239
|
+
As a result the viusal grid might be few pixels off in some browsers. The result is also inconsistent across browsers. For best results, preview your website on Firefox as it renders closest to the expected outcome.
|
223
240
|
|
224
|
-
|
241
|
+
At this point, writing an internal rounding mechanism is not high priority.
|
225
242
|
|
226
|
-
|
227
|
-
lightweight and simple compared to other grid frameworks, and strives to
|
228
|
-
remain so. We have plans for adding new features in future versions of the
|
229
|
-
framework, but these will be most likely to support new ways of working with
|
230
|
-
layouts on the Web, not patches to existing ones.
|
243
|
+
#### Framework X has this feature that Neat seems to be missing. Can you add it?
|
231
244
|
|
232
|
-
|
233
|
-
|
245
|
+
Unless you [open a pull request](https://github.com/thoughtbot/neat/compare/), the answer is most likely going to be no. Neat is lightweight and simple compared to other grid frameworks, and strives to remain so. We have plans for adding new features in future versions of the framework, but these will be most likely to support new ways of working with layouts on the Web, not patches to existing ones.
|
246
|
+
|
247
|
+
## Links
|
234
248
|
|
235
|
-
- Read the [online documentation](http://neat.bourbon.io/docs/).
|
236
249
|
- Add the docset to [Dash](http://kapeli.com/dash) 1.8+ (Preferences **>** Downloads **>** + *Add Docset Feed* **>** `http://neat.bourbon.io/docset/Neat.xml`)
|
237
|
-
- Ask questions on [Stack Overflow](http://stackoverflow.com/questions/tagged/neat). Don
|
250
|
+
- Ask questions on [Stack Overflow](http://stackoverflow.com/questions/tagged/neat). Don’t forget to tag them `bourbon` and `neat`.
|
238
251
|
- Suggest features or file bugs in [Issues](https://github.com/thoughtbot/neat/issues).
|
239
|
-
- Read the [contribution guidelines](https://github.com/thoughtbot/neat/blob/master/CONTRIBUTING.md).
|
240
|
-
- Say hi to [@kaishin](https://twitter.com/kaishin) and [@kylefiedler](https://twitter.com/kylefiedler).
|
241
252
|
- Join `#bourbon-neat` on `irc.freenode.net`.
|
242
253
|
|
254
|
+
## Browser support
|
243
255
|
|
244
|
-
|
245
|
-
|
256
|
+
- Chrome 4.0+
|
257
|
+
- Firefox 3.5+
|
258
|
+
- Internet Explorer 9+ (visual grid is IE 10 only)
|
259
|
+
- Internet Explorer 8 with [selectivizr](http://selectivizr.com) (no `media()` support)
|
260
|
+
- Opera 9.5+
|
261
|
+
- Safari 4.0+
|
262
|
+
|
263
|
+
## The Bourbon family
|
264
|
+
|
265
|
+
- [Bourbon](http://bourbon.io): A simple and lightweight mixin library for Sass
|
266
|
+
- [Neat](http://neat.bourbon.io): A lightweight semantic grid framework for Sass and Bourbon
|
267
|
+
- [Bitters](http://bitters.bourbon.io): Scaffold styles, variables and structure for Bourbon projects
|
268
|
+
- [Refills](http://refills.bourbon.io): Prepackaged patterns and components, built on top of Bourbon, Bitters & Neat
|
269
|
+
|
270
|
+
## Credits
|
246
271
|
|
247
272
|
![thoughtbot](http://thoughtbot.com/images/tm/logo.png)
|
248
273
|
|
249
|
-
|
274
|
+
Neat is maintained and funded by [thoughtbot, inc](http://thoughtbot.com). Tweet your questions or suggestions to [@bourbonsass](https://twitter.com/bourbonsass) and while you’re at it follow us too.
|
275
|
+
|
276
|
+
## License
|
250
277
|
|
251
|
-
|
278
|
+
Copyright © 2012–2014 [thoughtbot, inc](http://thoughtbot.com). Neat is free software, and may be redistributed under the terms specified in the [license](LICENSE.md).
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/* Neat 1.7.0.pre
|
2
2
|
* http://neat.bourbon.io
|
3
|
-
* Copyright 2012
|
3
|
+
* Copyright 2012-2014 thoughtbot, inc.
|
4
4
|
* MIT License */
|
5
5
|
|
6
6
|
// Helpers
|
@@ -19,5 +19,5 @@
|
|
19
19
|
@import "grid/media";
|
20
20
|
@import "grid/to-deprecate";
|
21
21
|
@import "grid/visual-grid";
|
22
|
-
@import "grid/display";
|
23
|
-
@import "grid/direction";
|
22
|
+
@import "grid/display-context";
|
23
|
+
@import "grid/direction-context";
|
@@ -1,10 +1,40 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
/**
|
2
|
+
* Returns a media context (media query / grid context) that can be stored in a variable and passed to `media()` as a single-keyword argument. Media contexts defined using `new-breakpoint` are used by the visual grid, as long as they are defined before importing Neat.
|
3
|
+
*
|
4
|
+
* @param {List} $query
|
5
|
+
* - A list of media query features and values. Each `$feature` should have a corresponding `$value`. If there is only a single `$value` in `$query`, `$default-feature` is going to be used. The number of total columns in the grid can be set by passing `$columns` at the end of the list (overrides `$total-columns`). For a list of valid values for `$feature`, click [here](http://www.w3.org/TR/css3-mediaqueries/#media1).
|
6
|
+
*
|
7
|
+
* @param {Number (unitless)} $total-columns ($grid-columns)
|
8
|
+
* - Number of columns to use in the new grid context. Can be set as a shorthand in the first parameter.
|
9
|
+
*
|
10
|
+
* @example scss - Usage
|
11
|
+
* $mobile: new-breakpoint(max-width 480px 4);
|
12
|
+
*
|
13
|
+
* .element {
|
14
|
+
* @include media($mobile) {
|
15
|
+
* @include span-columns(4);
|
16
|
+
* }
|
17
|
+
* }
|
18
|
+
*
|
19
|
+
* @example css - CSS Output
|
20
|
+
* @media screen and (max-width: 480px) {
|
21
|
+
* .element {
|
22
|
+
* display: block;
|
23
|
+
* float: left;
|
24
|
+
* margin-right: 7.42297%;
|
25
|
+
* width: 100%;
|
26
|
+
* }
|
27
|
+
* .element:last-child {
|
28
|
+
* margin-right: 0;
|
29
|
+
* }
|
30
|
+
* }
|
31
|
+
*/
|
32
|
+
@function new-breakpoint($query: $feature $value $columns, $total-columns: $grid-columns) {
|
3
33
|
@if length($query) == 1 {
|
4
34
|
$query: $default-feature nth($query, 1) $total-columns;
|
5
35
|
}
|
6
36
|
|
7
|
-
@else if length($query)
|
37
|
+
@else if is-even(length($query)) {
|
8
38
|
$query: append($query, $total-columns);
|
9
39
|
}
|
10
40
|
|
@@ -3,9 +3,13 @@
|
|
3
3
|
@return $int % 2 == 0
|
4
4
|
}
|
5
5
|
|
6
|
-
// Checks if an element belongs to a list
|
6
|
+
// Checks if an element belongs to a list or not
|
7
7
|
@function belongs-to($tested-item, $list) {
|
8
|
-
@return
|
8
|
+
@return not not-belongs-to($tested-item, $list);
|
9
|
+
}
|
10
|
+
|
11
|
+
@function not-belongs-to($tested-item, $list) {
|
12
|
+
@return not index($list, $tested-item);
|
9
13
|
}
|
10
14
|
|
11
15
|
// Contains display value
|
@@ -21,16 +25,12 @@
|
|
21
25
|
@if length($span) == 3 {
|
22
26
|
$container-columns: nth($span, 3);
|
23
27
|
@return $container-columns;
|
24
|
-
}
|
25
|
-
|
26
|
-
@else if length($span) == 2 {
|
28
|
+
} @else if length($span) == 2 {
|
27
29
|
$container-columns: nth($span, 2);
|
28
30
|
@return $container-columns;
|
29
31
|
}
|
30
32
|
|
31
|
-
@
|
32
|
-
@return $grid-columns;
|
33
|
-
}
|
33
|
+
@return $grid-columns;
|
34
34
|
}
|
35
35
|
|
36
36
|
@function container-shift($shift: $shift) {
|
@@ -39,16 +39,12 @@
|
|
39
39
|
@if length($shift) == 3 {
|
40
40
|
$container-columns: nth($shift, 3);
|
41
41
|
@return $container-columns;
|
42
|
-
}
|
43
|
-
|
44
|
-
@else if length($shift) == 2 {
|
42
|
+
} @else if length($shift) == 2 {
|
45
43
|
$container-columns: nth($shift, 2);
|
46
44
|
@return $container-columns;
|
47
45
|
}
|
48
46
|
|
49
|
-
@
|
50
|
-
@return $parent-columns;
|
51
|
-
}
|
47
|
+
@return $parent-columns;
|
52
48
|
}
|
53
49
|
|
54
50
|
// Generates a striped background
|
@@ -66,9 +62,7 @@
|
|
66
62
|
$values: append($values, $transparent $column-offset, comma);
|
67
63
|
$values: append($values, $color $column-offset, comma);
|
68
64
|
$column-offset: $column-offset + $column-width;
|
69
|
-
}
|
70
|
-
|
71
|
-
@else {
|
65
|
+
} @else {
|
72
66
|
$values: append($values, $color $column-offset, comma);
|
73
67
|
$values: append($values, $transparent $column-offset, comma);
|
74
68
|
$column-offset: $column-offset + $gutter-width;
|
@@ -80,9 +74,9 @@
|
|
80
74
|
|
81
75
|
// Layout direction
|
82
76
|
@function get-direction($layout, $default) {
|
83
|
-
$direction:
|
77
|
+
$direction: null;
|
84
78
|
|
85
|
-
@if $layout == LTR or $layout == RTL {
|
79
|
+
@if to-upper-case($layout) == "LTR" or to-upper-case($layout) == "RTL" {
|
86
80
|
$direction: direction-from-layout($layout);
|
87
81
|
} @else {
|
88
82
|
$direction: direction-from-layout($default);
|
@@ -92,9 +86,9 @@
|
|
92
86
|
}
|
93
87
|
|
94
88
|
@function direction-from-layout($layout) {
|
95
|
-
$direction:
|
89
|
+
$direction: null;
|
96
90
|
|
97
|
-
@if $layout == LTR {
|
91
|
+
@if to-upper-case($layout) == "LTR" {
|
98
92
|
$direction: right;
|
99
93
|
} @else {
|
100
94
|
$direction: left;
|
@@ -106,7 +100,7 @@
|
|
106
100
|
@function get-opposite-direction($direction) {
|
107
101
|
$opposite-direction: left;
|
108
102
|
|
109
|
-
@if $direction == left {
|
103
|
+
@if $direction == "left" {
|
110
104
|
$opposite-direction: right;
|
111
105
|
}
|
112
106
|
|