neat 1.7.0.rc → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -0
- data/README.md +9 -5
- data/app/assets/stylesheets/_neat.scss +1 -1
- data/app/assets/stylesheets/functions/_new-breakpoint.scss +34 -31
- data/app/assets/stylesheets/functions/_private.scss +1 -1
- data/app/assets/stylesheets/grid/_direction-context.scss +18 -19
- data/app/assets/stylesheets/grid/_display-context.scss +18 -19
- data/app/assets/stylesheets/grid/_fill-parent.scss +15 -16
- data/app/assets/stylesheets/grid/_media.scss +54 -55
- data/app/assets/stylesheets/grid/_omega.scss +31 -32
- data/app/assets/stylesheets/grid/_outer-container.scss +28 -29
- data/app/assets/stylesheets/grid/_pad.scss +15 -16
- data/app/assets/stylesheets/grid/_row.scss +28 -29
- data/app/assets/stylesheets/grid/_shift.scss +32 -34
- data/app/assets/stylesheets/grid/_span-columns.scss +47 -48
- data/app/assets/stylesheets/grid/_to-deprecate.scss +33 -36
- data/app/assets/stylesheets/settings/_disable-warnings.scss +4 -5
- data/app/assets/stylesheets/settings/_grid.scss +40 -42
- data/app/assets/stylesheets/settings/_visual-grid.scss +16 -20
- data/bower.json +1 -1
- data/lib/neat/version.rb +1 -1
- data/test/_setup.scss +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db2a532bbbdb4620bed5cec00f5cd12415dba74c
|
4
|
+
data.tar.gz: ef585a637c353915fc522398898eb8405972c650
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fed84c2941a6d114a2c9465fcdfb154a48ba720ff1730d8f26a6965b423e60bdfd67c7f29f02d1aabedda9faa1d5db855715a7b4cc0cdfed957831b9b8c1b010
|
7
|
+
data.tar.gz: 8312d8b07774daad044001744440db8136c8f567cb272535ea1402107bbb4b7797d64867952199ed15d1036f5e6b9c146d937ce4ca754150b1a97ee50c64ce24
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
<img src="http://neat.bourbon.io/images/logotype.svg" width="250" />
|
2
2
|
|
3
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)
|
4
4
|
[![Code Climate](http://img.shields.io/codeclimate/github/thoughtbot/neat.svg?style=flat)](https://codeclimate.com/github/thoughtbot/neat)
|
@@ -17,9 +17,9 @@ Neat is a fluid grid framework built on [Bourbon](http://bourbon.io) with the ai
|
|
17
17
|
|
18
18
|
## Requirements
|
19
19
|
|
20
|
-
- [Sass](https://github.com/sass/sass) 3.3+
|
20
|
+
- [Sass](https://github.com/sass/sass) 3.3+ ([Use Neat
|
21
|
+
1.5.1](#installing-older-versions-of-neat) if you are still tied to Sass 3.2)
|
21
22
|
- [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).
|
23
23
|
|
24
24
|
## Installation
|
25
25
|
|
@@ -96,7 +96,7 @@ Neat uses the [RubyGems](https://rubygems.org) package manager to easily generat
|
|
96
96
|
2. Reinstall the Neat gem, using the `-v` flag to specify the version you need:
|
97
97
|
|
98
98
|
```bash
|
99
|
-
gem install neat -v 1.
|
99
|
+
gem install neat -v 1.7.0
|
100
100
|
```
|
101
101
|
|
102
102
|
3. Follow the [instructions above](#installation) to install Neat into your project.
|
@@ -244,9 +244,13 @@ At this point, writing an internal rounding mechanism is not high priority.
|
|
244
244
|
|
245
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
246
|
|
247
|
+
## Documentation
|
248
|
+
|
249
|
+
- [Full documentation](http://thoughtbot.github.io/neat-docs/latest/) (latest)
|
250
|
+
- Neat documentation is now available by default in [Dash](http://kapeli.com/dash)
|
251
|
+
|
247
252
|
## Links
|
248
253
|
|
249
|
-
- Add the docset to [Dash](http://kapeli.com/dash) 1.8+ (Preferences **>** Downloads **>** + *Add Docset Feed* **>** `http://neat.bourbon.io/docset/Neat.xml`)
|
250
254
|
- Ask questions on [Stack Overflow](http://stackoverflow.com/questions/tagged/neat). Don’t forget to tag them `bourbon` and `neat`.
|
251
255
|
- Suggest features or file bugs in [Issues](https://github.com/thoughtbot/neat/issues).
|
252
256
|
- Join `#bourbon-neat` on `irc.freenode.net`.
|
@@ -1,34 +1,37 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
1
|
+
/// 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.
|
2
|
+
///
|
3
|
+
/// @param {List} $query
|
4
|
+
/// A list of media query features and values. Each `$feature` should have a corresponding `$value`.
|
5
|
+
///
|
6
|
+
/// If there is only a single `$value` in `$query`, `$default-feature` is going to be used.
|
7
|
+
///
|
8
|
+
/// 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).
|
9
|
+
///
|
10
|
+
/// @param {Number (unitless)} $total-columns ($grid-columns)
|
11
|
+
/// - Number of columns to use in the new grid context. Can be set as a shorthand in the first parameter.
|
12
|
+
///
|
13
|
+
/// @example scss - Usage
|
14
|
+
/// $mobile: new-breakpoint(max-width 480px 4);
|
15
|
+
///
|
16
|
+
/// .element {
|
17
|
+
/// @include media($mobile) {
|
18
|
+
/// @include span-columns(4);
|
19
|
+
/// }
|
20
|
+
/// }
|
21
|
+
///
|
22
|
+
/// @example css - CSS Output
|
23
|
+
/// @media screen and (max-width: 480px) {
|
24
|
+
/// .element {
|
25
|
+
/// display: block;
|
26
|
+
/// float: left;
|
27
|
+
/// margin-right: 7.42297%;
|
28
|
+
/// width: 100%;
|
29
|
+
/// }
|
30
|
+
/// .element:last-child {
|
31
|
+
/// margin-right: 0;
|
32
|
+
/// }
|
33
|
+
/// }
|
34
|
+
|
32
35
|
@function new-breakpoint($query: $feature $value $columns, $total-columns: $grid-columns) {
|
33
36
|
@if length($query) == 1 {
|
34
37
|
$query: $default-feature nth($query, 1) $total-columns;
|
@@ -1,22 +1,21 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
*/
|
1
|
+
/// Changes the direction property used by other mixins called in the code block argument.
|
2
|
+
///
|
3
|
+
/// @param {String} $direction (left-to-right)
|
4
|
+
/// Layout direction to be used within the block. Can be `left-to-right` or `right-to-left`.
|
5
|
+
///
|
6
|
+
/// @example scss - Usage
|
7
|
+
/// @include direction(right-to-left) {
|
8
|
+
/// .right-to-left-block {
|
9
|
+
/// @include span-columns(6);
|
10
|
+
/// }
|
11
|
+
/// }
|
12
|
+
///
|
13
|
+
/// @example css - CSS Output
|
14
|
+
/// .right-to-left-block {
|
15
|
+
/// float: right;
|
16
|
+
/// ...
|
17
|
+
/// }
|
18
|
+
|
20
19
|
@mixin direction-context($direction: left-to-right) {
|
21
20
|
$scope-direction: $layout-direction;
|
22
21
|
|
@@ -1,22 +1,21 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
*/
|
1
|
+
/// Changes the display property used by other mixins called in the code block argument.
|
2
|
+
///
|
3
|
+
/// @param {String} $display (block)
|
4
|
+
/// Display value to be used within the block. Can be `table` or `block`.
|
5
|
+
///
|
6
|
+
/// @example scss
|
7
|
+
/// @include display(table) {
|
8
|
+
/// .display-table {
|
9
|
+
/// @include span-columns(6);
|
10
|
+
/// }
|
11
|
+
/// }
|
12
|
+
///
|
13
|
+
/// @example css
|
14
|
+
/// .display-table {
|
15
|
+
/// display: table-cell;
|
16
|
+
/// ...
|
17
|
+
/// }
|
18
|
+
|
20
19
|
@mixin display-context($display: block) {
|
21
20
|
$scope-display: $container-display-table;
|
22
21
|
$container-display-table: $display == table !global;
|
@@ -1,19 +1,18 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
*/
|
1
|
+
/// Forces the element to fill its parent container.
|
2
|
+
///
|
3
|
+
/// @example scss - Usage
|
4
|
+
/// .element {
|
5
|
+
/// @include fill-parent;
|
6
|
+
/// }
|
7
|
+
///
|
8
|
+
/// @example css - CSS Output
|
9
|
+
/// .element {
|
10
|
+
/// width: 100%;
|
11
|
+
/// -webkit-box-sizing: border-box;
|
12
|
+
/// -moz-box-sizing: border-box;
|
13
|
+
/// box-sizing: border-box;
|
14
|
+
/// }
|
15
|
+
|
17
16
|
@mixin fill-parent() {
|
18
17
|
width: 100%;
|
19
18
|
|
@@ -1,58 +1,57 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
*/
|
1
|
+
/// Outputs a media-query block with an optional grid context (the total number of columns used in the grid).
|
2
|
+
///
|
3
|
+
/// @param {List} $query
|
4
|
+
/// A list of media query features and values, where each `$feature` should have a corresponding `$value`.
|
5
|
+
/// For a list of valid values for `$feature`, click [here](http://www.w3.org/TR/css3-mediaqueries/#media1).
|
6
|
+
///
|
7
|
+
/// If there is only a single `$value` in `$query`, `$default-feature` is going to be used.
|
8
|
+
///
|
9
|
+
/// The number of total columns in the grid can be set by passing `$columns` at the end of the list (overrides `$total-columns`).
|
10
|
+
///
|
11
|
+
///
|
12
|
+
/// @param {Number (unitless)} $total-columns ($grid-columns)
|
13
|
+
/// - Number of columns to use in the new grid context. Can be set as a shorthand in the first parameter.
|
14
|
+
///
|
15
|
+
/// @example scss - Usage
|
16
|
+
/// .responsive-element {
|
17
|
+
/// @include media(769px) {
|
18
|
+
/// @include span-columns(6);
|
19
|
+
/// }
|
20
|
+
/// }
|
21
|
+
///
|
22
|
+
/// .new-context-element {
|
23
|
+
/// @include media(min-width 320px max-width 480px, 6) {
|
24
|
+
/// @include span-columns(6);
|
25
|
+
/// }
|
26
|
+
/// }
|
27
|
+
///
|
28
|
+
/// @example css - CSS Output
|
29
|
+
/// @media screen and (min-width: 769px) {
|
30
|
+
/// .responsive-element {
|
31
|
+
/// display: block;
|
32
|
+
/// float: left;
|
33
|
+
/// margin-right: 2.35765%;
|
34
|
+
/// width: 48.82117%;
|
35
|
+
/// }
|
36
|
+
///
|
37
|
+
/// .responsive-element:last-child {
|
38
|
+
/// margin-right: 0;
|
39
|
+
/// }
|
40
|
+
/// }
|
41
|
+
///
|
42
|
+
/// @media screen and (min-width: 320px) and (max-width: 480px) {
|
43
|
+
/// .new-context-element {
|
44
|
+
/// display: block;
|
45
|
+
/// float: left;
|
46
|
+
/// margin-right: 4.82916%;
|
47
|
+
/// width: 100%;
|
48
|
+
/// }
|
49
|
+
///
|
50
|
+
/// .new-context-element:last-child {
|
51
|
+
/// margin-right: 0;
|
52
|
+
/// }
|
53
|
+
/// }
|
54
|
+
|
56
55
|
@mixin media($query: $feature $value $columns, $total-columns: $grid-columns) {
|
57
56
|
@if length($query) == 1 {
|
58
57
|
@media screen and ($default-feature: nth($query, 1)) {
|
@@ -1,35 +1,34 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
*/
|
1
|
+
/// Removes the element's gutter margin, regardless of its position in the grid hierarchy or display property. It can target a specific element, or every `nth-child` occurrence. Works only with `block` layouts.
|
2
|
+
///
|
3
|
+
/// @param {List} $query (block)
|
4
|
+
/// List of arguments. Supported arguments are `nth-child` selectors (targets a specific pseudo element) and `auto` (targets `last-child`).
|
5
|
+
///
|
6
|
+
/// When passed an `nth-child` argument of type `*n` with `block` display, the omega mixin automatically adds a clear to the `*n+1` th element. Note that composite arguments such as `2n+1` do not support this feature.
|
7
|
+
///
|
8
|
+
/// **Deprecation warning**: The omega mixin will no longer take a `$direction` argument. To change the layout direction, use `row($direction)` or set `$default-layout-direction` instead.
|
9
|
+
///
|
10
|
+
/// @example scss - Usage
|
11
|
+
/// .element {
|
12
|
+
/// @include omega;
|
13
|
+
/// }
|
14
|
+
///
|
15
|
+
/// .nth-element {
|
16
|
+
/// @include omega(4n);
|
17
|
+
/// }
|
18
|
+
///
|
19
|
+
/// @example css - CSS Output
|
20
|
+
/// .element {
|
21
|
+
/// margin-right: 0;
|
22
|
+
/// }
|
23
|
+
///
|
24
|
+
/// .nth-element:nth-child(4n) {
|
25
|
+
/// margin-right: 0;
|
26
|
+
/// }
|
27
|
+
///
|
28
|
+
/// .nth-element:nth-child(4n+1) {
|
29
|
+
/// clear: left;
|
30
|
+
/// }
|
31
|
+
|
33
32
|
@mixin omega($query: block, $direction: default) {
|
34
33
|
$table: belongs-to(table, $query);
|
35
34
|
$auto: belongs-to(auto, $query);
|
@@ -1,32 +1,31 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
*/
|
1
|
+
/// Makes an element a outer container by centring it in the viewport, clearing its floats, and setting its `max-width`.
|
2
|
+
/// Although optional, using `outer-container` is recommended. The mixin can be called on more than one element per page, as long as they are not nested.
|
3
|
+
///
|
4
|
+
/// @param {Number (unit)} $local-max-width ($max-width)
|
5
|
+
/// Max width to be applied to the element. Can be a percentage or a measure.
|
6
|
+
///
|
7
|
+
/// @example scss - Usage
|
8
|
+
/// .element {
|
9
|
+
/// @include outer-container(100%);
|
10
|
+
/// }
|
11
|
+
///
|
12
|
+
/// @example css - CSS Output
|
13
|
+
/// .element {
|
14
|
+
/// *zoom: 1;
|
15
|
+
/// max-width: 100%;
|
16
|
+
/// margin-left: auto;
|
17
|
+
/// margin-right: auto;
|
18
|
+
/// }
|
19
|
+
///
|
20
|
+
/// .element:before, .element:after {
|
21
|
+
/// content: " ";
|
22
|
+
/// display: table;
|
23
|
+
/// }
|
24
|
+
///
|
25
|
+
/// .element:after {
|
26
|
+
/// clear: both;
|
27
|
+
/// }
|
28
|
+
|
30
29
|
@mixin outer-container($local-max-width: $max-width) {
|
31
30
|
@include clearfix;
|
32
31
|
max-width: $local-max-width;
|
@@ -1,19 +1,18 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
*/
|
1
|
+
/// Adds padding to the element.
|
2
|
+
///
|
3
|
+
/// @param {List} $padding (flex-gutter())
|
4
|
+
/// A list of padding value(s) to use. Passing `default` in the list will result in using the gutter width as a padding value.
|
5
|
+
///
|
6
|
+
/// @example scss - Usage
|
7
|
+
/// .element {
|
8
|
+
/// @include pad(30px -20px 10px default);
|
9
|
+
/// }
|
10
|
+
///
|
11
|
+
/// @example css - CSS Output
|
12
|
+
/// .element {
|
13
|
+
/// padding: 30px -20px 10px 2.35765%;
|
14
|
+
/// }
|
15
|
+
|
17
16
|
@mixin pad($padding: flex-gutter()) {
|
18
17
|
$padding-list: null;
|
19
18
|
@each $value in $padding {
|
@@ -1,32 +1,31 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
*/
|
1
|
+
/// Designates the element as a row of columns in the grid layout. It clears the floats on the element and sets its display property. Rows can't be nested, but there can be more than one row element—with different display properties—per layout.
|
2
|
+
///
|
3
|
+
/// @param {String} $display (default)
|
4
|
+
/// Sets the display property of the element and the display context that will be used by its children. Can be `block` or `table`.
|
5
|
+
///
|
6
|
+
/// @param {String} $direction ($default-layout-direction)
|
7
|
+
/// Sets the layout direction. Can be `LTR` (left-to-right) or `RTL` (right-to-left).
|
8
|
+
///
|
9
|
+
/// @example scss - Usage
|
10
|
+
/// .element {
|
11
|
+
/// @include row();
|
12
|
+
/// }
|
13
|
+
///
|
14
|
+
/// @example css - CSS Output
|
15
|
+
/// .element {
|
16
|
+
/// *zoom: 1;
|
17
|
+
/// display: block;
|
18
|
+
/// }
|
19
|
+
///
|
20
|
+
/// .element:before, .element:after {
|
21
|
+
/// content: " ";
|
22
|
+
/// display: table;
|
23
|
+
/// }
|
24
|
+
///
|
25
|
+
/// .element:after {
|
26
|
+
/// clear: both;
|
27
|
+
/// }
|
28
|
+
|
30
29
|
@mixin row($display: default, $direction: $default-layout-direction) {
|
31
30
|
@if $direction != $default-layout-direction {
|
32
31
|
@include -neat-warn("The $direction argument will be deprecated in future versions in favor of the direction(){...} mixin.");
|
@@ -1,41 +1,39 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
*/
|
1
|
+
/// Translates an element horizontally by a number of columns. Positive arguments shift the element to the active layout direction, while negative ones shift it to the opposite direction.
|
2
|
+
///
|
3
|
+
/// @param {Number (unitless)} $n-columns (1)
|
4
|
+
/// Number of columns by which the element shifts.
|
5
|
+
///
|
6
|
+
/// @example scss - Usage
|
7
|
+
/// .element {
|
8
|
+
/// @include shift(-3);
|
9
|
+
/// }
|
10
|
+
///
|
11
|
+
/// @example css - CSS output
|
12
|
+
/// .element {
|
13
|
+
/// margin-left: -25.58941%;
|
14
|
+
/// }
|
15
|
+
|
17
16
|
@mixin shift($n-columns: 1) {
|
18
17
|
@include shift-in-context($n-columns);
|
19
18
|
}
|
20
19
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
*/
|
20
|
+
/// Translates an element horizontally by a number of columns, in a specific nesting context.
|
21
|
+
///
|
22
|
+
/// @param {List} $shift
|
23
|
+
/// A list containing the number of columns to shift (`$columns`) and the number of columns of the parent element (`$container-columns`).
|
24
|
+
///
|
25
|
+
/// The two values can be separated with any string such as `of`, `/`, etc.
|
26
|
+
///
|
27
|
+
/// @example scss - Usage
|
28
|
+
/// .element {
|
29
|
+
/// @include shift(-3 of 6);
|
30
|
+
/// }
|
31
|
+
///
|
32
|
+
/// @example css - CSS output
|
33
|
+
/// .element {
|
34
|
+
/// margin-left: -52.41458%;
|
35
|
+
/// }
|
36
|
+
|
39
37
|
@mixin shift-in-context($shift: $columns of $container-columns) {
|
40
38
|
$n-columns: nth($shift, 1);
|
41
39
|
$parent-columns: container-shift($shift) !global;
|
@@ -1,52 +1,51 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
1
|
+
/// Specifies the number of columns an element should span. If the selector is nested the number of columns of its parent element should be passed as an argument as well.
|
2
|
+
///
|
3
|
+
/// @param {List} $span
|
4
|
+
/// A list containing `$columns`, the unitless number of columns the element spans (required), and `$container-columns`, the number of columns the parent element spans (optional).
|
5
|
+
///
|
6
|
+
/// If only one value is passed, it is assumed that it's `$columns` and that that `$container-columns` is equal to `$grid-columns`, the total number of columns in the grid.
|
7
|
+
///
|
8
|
+
/// The values can be separated with any string such as `of`, `/`, etc.
|
9
|
+
///
|
10
|
+
/// @param {String} $display (block)
|
11
|
+
/// Sets the display property of the element. By default it sets the display propert of the element to `block`.
|
12
|
+
///
|
13
|
+
/// If passed `block-collapse`, it also removes the margin gutter by adding it to the element width.
|
14
|
+
///
|
15
|
+
/// If passed `table`, it sets the display property to `table-cell` and calculates the width of the element without taking gutters into consideration. The result does not align with the block-based grid.
|
16
|
+
///
|
17
|
+
/// @example scss - Usage
|
18
|
+
/// .element {
|
19
|
+
/// @include span-columns(6);
|
20
|
+
///
|
21
|
+
/// .nested-element {
|
22
|
+
/// @include span-columns(2 of 6);
|
23
|
+
/// }
|
24
|
+
/// }
|
25
|
+
///
|
26
|
+
/// @example css - CSS Output
|
27
|
+
/// .element {
|
28
|
+
/// display: block;
|
29
|
+
/// float: left;
|
30
|
+
/// margin-right: 2.35765%;
|
31
|
+
/// width: 48.82117%;
|
32
|
+
/// }
|
33
|
+
///
|
34
|
+
/// .element:last-child {
|
35
|
+
/// margin-right: 0;
|
36
|
+
/// }
|
37
|
+
///
|
38
|
+
/// .element .nested-element {
|
39
|
+
/// display: block;
|
40
|
+
/// float: left;
|
41
|
+
/// margin-right: 4.82916%;
|
42
|
+
/// width: 30.11389%;
|
43
|
+
/// }
|
44
|
+
///
|
45
|
+
/// .element .nested-element:last-child {
|
46
|
+
/// margin-right: 0;
|
47
|
+
/// }
|
21
48
|
|
22
|
-
* .nested-element {
|
23
|
-
* @include span-columns(2 of 6);
|
24
|
-
* }
|
25
|
-
* }
|
26
|
-
*
|
27
|
-
* @example css - CSS Output
|
28
|
-
* .element {
|
29
|
-
* display: block;
|
30
|
-
* float: left;
|
31
|
-
* margin-right: 2.35765%;
|
32
|
-
* width: 48.82117%;
|
33
|
-
* }
|
34
|
-
*
|
35
|
-
* .element:last-child {
|
36
|
-
* margin-right: 0;
|
37
|
-
* }
|
38
|
-
*
|
39
|
-
* .element .nested-element {
|
40
|
-
* display: block;
|
41
|
-
* float: left;
|
42
|
-
* margin-right: 4.82916%;
|
43
|
-
* width: 30.11389%;
|
44
|
-
* }
|
45
|
-
*
|
46
|
-
* .element .nested-element:last-child {
|
47
|
-
* margin-right: 0;
|
48
|
-
* }
|
49
|
-
*/
|
50
49
|
@mixin span-columns($span: $columns of $container-columns, $display: block) {
|
51
50
|
$columns: nth($span, 1);
|
52
51
|
$container-columns: container-span($span);
|
@@ -56,52 +56,49 @@
|
|
56
56
|
@include omega($nth $display, $direction);
|
57
57
|
}
|
58
58
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
*/
|
59
|
+
/// Resets the active display property to `block`. Particularly useful when changing the display property in a single row.
|
60
|
+
///
|
61
|
+
/// @example scss - Usage
|
62
|
+
/// .element {
|
63
|
+
/// @include row(table);
|
64
|
+
/// // Context changed to table display
|
65
|
+
/// }
|
66
|
+
///
|
67
|
+
/// @include reset-display;
|
68
|
+
/// // Context is reset to block display
|
69
|
+
|
71
70
|
@mixin reset-display {
|
72
71
|
$container-display-table: false !global;
|
73
72
|
@include -neat-warn("Resetting $display will be deprecated in future versions in favor of the display(){...} mixin.");
|
74
73
|
}
|
75
74
|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
*/
|
75
|
+
/// Resets the active layout direction to the default value set in `$default-layout-direction`. Particularly useful when changing the layout direction in a single row.
|
76
|
+
///
|
77
|
+
/// @example scss - Usage
|
78
|
+
/// .element {
|
79
|
+
/// @include row($direction: RTL);
|
80
|
+
/// // Context changed to right-to-left
|
81
|
+
/// }
|
82
|
+
///
|
83
|
+
/// @include reset-layout-direction;
|
84
|
+
/// // Context is reset to left-to-right
|
85
|
+
|
88
86
|
@mixin reset-layout-direction {
|
89
87
|
$layout-direction: $default-layout-direction !global;
|
90
88
|
@include -neat-warn("Resetting $direction will be deprecated in future versions in favor of the direction(){...} mixin.");
|
91
89
|
}
|
92
90
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
*/
|
91
|
+
/// Resets both the active layout direction and the active display property.
|
92
|
+
///
|
93
|
+
/// @example scss - Usage
|
94
|
+
/// .element {
|
95
|
+
/// @include row(table, RTL);
|
96
|
+
/// // Context changed to table table and right-to-left
|
97
|
+
/// }
|
98
|
+
///
|
99
|
+
/// @include reset-all;
|
100
|
+
/// // Context is reset to block display and left-to-right
|
101
|
+
|
105
102
|
@mixin reset-all {
|
106
103
|
@include reset-display;
|
107
104
|
@include reset-layout-direction;
|
@@ -1,8 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
*/
|
1
|
+
/// Disable all deprecation warnings. Defaults to `false`. Set with a `!global` flag.
|
2
|
+
///
|
3
|
+
/// @type Bool
|
4
|
+
|
6
5
|
$disable-warnings: false !default;
|
7
6
|
|
8
7
|
@mixin -neat-warn($message) {
|
@@ -1,55 +1,53 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
*/
|
1
|
+
/// Sets the relative width of a single grid column. The unit used should be the same one used to define `$gutter`. To learn more about golden-ratio() see [Bourbon docs](http://bourbon.io/docs/#golden-ratio). Set with a `!global` flag.
|
2
|
+
///
|
3
|
+
/// @type Number (Unit)
|
4
|
+
|
6
5
|
$column: golden-ratio(1em, 3) !default;
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
*/
|
7
|
+
/// Sets the relative width of a single grid gutter. The unit used should be the same one used to define `$column`. To learn more about golden-ratio() see [Bourbon docs](http://bourbon.io/docs/#golden-ratio). Set with the `!global` flag.
|
8
|
+
///
|
9
|
+
/// @type Number (Unit)
|
10
|
+
|
13
11
|
$gutter: golden-ratio(1em, 1) !default;
|
14
12
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
*/
|
13
|
+
/// Sets the total number of columns in the grid. Its value can be overridden inside a media query using the `media()` mixin. Set with the `!global` flag.
|
14
|
+
///
|
15
|
+
/// @type Number (Unitless)
|
16
|
+
|
20
17
|
$grid-columns: 12 !default;
|
21
18
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
*/
|
19
|
+
/// Sets the max-width property of the element that includes `outer-container()`. To learn more about `em()` see [Bourbon docs](http://bourbon.io/docs/#px-to-em). Set with the `!global` flag.
|
20
|
+
///
|
21
|
+
/// @type Number (Unit)
|
22
|
+
///
|
27
23
|
$max-width: em(1088) !default;
|
28
24
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
25
|
+
/// When set to true, it sets the box-sizing property of all elements to `border-box`. Set with a `!global` flag.
|
26
|
+
///
|
27
|
+
/// @type Bool
|
28
|
+
///
|
29
|
+
/// @example css - CSS Output
|
30
|
+
/// html {
|
31
|
+
/// -webkit-box-sizing: border-box;
|
32
|
+
/// -moz-box-sizing: border-box;
|
33
|
+
/// box-sizing: border-box; }
|
34
|
+
///
|
35
|
+
/// *, *:before, *:after {
|
36
|
+
/// -webkit-box-sizing: inherit;
|
37
|
+
/// -moz-box-sizing: inherit;
|
38
|
+
/// box-sizing: inherit;
|
39
|
+
/// }
|
40
|
+
|
41
41
|
$border-box-sizing: true !default;
|
42
42
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
*/
|
43
|
+
/// Sets the default [media feature](http://www.w3.org/TR/css3-mediaqueries/#media) that `media()` and `new-breakpoint()` revert to when only a breakpoint value is passed. Set with a `!global` flag.
|
44
|
+
///
|
45
|
+
/// @type String
|
46
|
+
|
48
47
|
$default-feature: min-width; // Default @media feature for the breakpoint() mixin
|
49
48
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
*/
|
49
|
+
///Sets the default layout direction of the grid. Can be `LTR` or `RTL`. Set with a `!global` flag.
|
50
|
+
///
|
51
|
+
///@type String
|
52
|
+
|
55
53
|
$default-layout-direction: LTR !default;
|
@@ -1,29 +1,25 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
*/
|
1
|
+
/// Displays the visual grid when set to true. The overlaid grid may be few pixels off depending on the browser's rendering engine and pixel rounding algorithm. Set with the `!global` flag.
|
2
|
+
///
|
3
|
+
/// @type Bool
|
4
|
+
|
6
5
|
$visual-grid: false !default;
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
*/
|
7
|
+
/// Sets the visual grid color. Set with `!global` flag.
|
8
|
+
///
|
9
|
+
/// @type Color
|
10
|
+
|
13
11
|
$visual-grid-color: #EEE !default;
|
14
12
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
*/
|
13
|
+
/// Sets the `z-index` property of the visual grid. Can be `back` (behind content) or `front` (in front of content). Set with `!global` flag.
|
14
|
+
///
|
15
|
+
/// @type String
|
16
|
+
|
20
17
|
$visual-grid-index: back !default;
|
21
18
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
*/
|
19
|
+
/// Sets the opacity property of the visual grid. Set with `!global` flag.
|
20
|
+
///
|
21
|
+
/// @type Number (unitless)
|
22
|
+
|
27
23
|
$visual-grid-opacity: 0.4 !default;
|
28
24
|
|
29
25
|
$visual-grid-breakpoints: () !default;
|
data/bower.json
CHANGED
data/lib/neat/version.rb
CHANGED
data/test/_setup.scss
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.0
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyle Fiedler
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-10-
|
13
|
+
date: 2014-10-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: sass
|
@@ -231,9 +231,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
231
231
|
version: '0'
|
232
232
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
233
233
|
requirements:
|
234
|
-
- - "
|
234
|
+
- - ">="
|
235
235
|
- !ruby/object:Gem::Version
|
236
|
-
version:
|
236
|
+
version: '0'
|
237
237
|
requirements: []
|
238
238
|
rubyforge_project: neat
|
239
239
|
rubygems_version: 2.2.2
|