neat-compass 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/stylesheets/neat/_neat.scss
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
// Bourbon Neat
|
1
|
+
// Bourbon Neat
|
2
2
|
// MIT Licensed
|
3
|
-
// Copyright (c)
|
3
|
+
// Copyright (c) 2012-2013 thoughtbot, inc.
|
4
4
|
|
5
5
|
// Helpers
|
6
6
|
@import "neat-helpers";
|
@@ -8,4 +8,5 @@
|
|
8
8
|
// Grid
|
9
9
|
@import "grid/global-variables";
|
10
10
|
@import "grid/grid";
|
11
|
+
@import "grid/omega";
|
11
12
|
@import "grid/visual-grid";
|
@@ -18,6 +18,15 @@
|
|
18
18
|
@return false;
|
19
19
|
}
|
20
20
|
|
21
|
+
// Contains display value
|
22
|
+
@function contains-display-value($query) {
|
23
|
+
@if belongs-to(table, $query) or belongs-to(block, $query) or belongs-to(inline-block, $query) or belongs-to(inline, $query) {
|
24
|
+
@return true;
|
25
|
+
}
|
26
|
+
|
27
|
+
@return false;
|
28
|
+
}
|
29
|
+
|
21
30
|
// Parses the first argument of span-columns()
|
22
31
|
@function container-span($span: $span) {
|
23
32
|
@if length($span) == 3 {
|
@@ -39,7 +39,7 @@ $fg-max-width: $max-width;
|
|
39
39
|
width: flex-grid($columns, $container-columns) + flex-gutter($container-columns);
|
40
40
|
|
41
41
|
&:last-child {
|
42
|
-
|
42
|
+
width: flex-grid($columns, $container-columns);
|
43
43
|
}
|
44
44
|
}
|
45
45
|
|
@@ -85,32 +85,12 @@ $fg-max-width: $max-width;
|
|
85
85
|
|
86
86
|
// Pad
|
87
87
|
@mixin pad($padding: flex-gutter()) {
|
88
|
-
padding:
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
@mixin omega($display: block, $direction: right) {
|
93
|
-
@if $display == table {
|
94
|
-
padding-#{$direction}: 0;
|
95
|
-
}
|
96
|
-
|
97
|
-
@else {
|
98
|
-
margin-#{$direction}: 0;
|
99
|
-
}
|
100
|
-
}
|
101
|
-
|
102
|
-
@mixin nth-omega($nth, $display: block, $direction: right) {
|
103
|
-
@if $display == table {
|
104
|
-
&:nth-child(#{$nth}) {
|
105
|
-
padding-#{$direction}: 0;
|
106
|
-
}
|
107
|
-
}
|
108
|
-
|
109
|
-
@else {
|
110
|
-
&:nth-child(#{$nth}) {
|
111
|
-
margin-#{$direction}: 0;
|
112
|
-
}
|
88
|
+
$padding-list: null;
|
89
|
+
@each $value in $padding {
|
90
|
+
$value: if($value == 'default', flex-gutter(), $value);
|
91
|
+
$padding-list: join($padding-list, $value);
|
113
92
|
}
|
93
|
+
padding: $padding-list;
|
114
94
|
}
|
115
95
|
|
116
96
|
// Fill 100% of parent
|
@@ -0,0 +1,68 @@
|
|
1
|
+
// Remove last element gutter
|
2
|
+
@mixin omega($query: block, $direction: right) {
|
3
|
+
$table: if(belongs-to(table, $query), true, false);
|
4
|
+
$auto: if(belongs-to(auto, $query), true, false);
|
5
|
+
|
6
|
+
@if length($query) == 1 {
|
7
|
+
@if $auto {
|
8
|
+
&:last-child {
|
9
|
+
margin-#{$direction}: 0;
|
10
|
+
}
|
11
|
+
}
|
12
|
+
|
13
|
+
@else if contains-display-value($query) {
|
14
|
+
@if $table {
|
15
|
+
padding-#{$direction}: 0;
|
16
|
+
}
|
17
|
+
|
18
|
+
@else {
|
19
|
+
margin-#{$direction}: 0;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
@else {
|
24
|
+
&:nth-child(#{$query}) {
|
25
|
+
margin-#{$direction}: 0;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
@else if length($query) == 2 {
|
31
|
+
@if $table {
|
32
|
+
@if $auto {
|
33
|
+
&:last-child {
|
34
|
+
padding-#{$direction}: 0;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
@else {
|
39
|
+
&:nth-child(#{nth($query, 1)}) {
|
40
|
+
padding-#{$direction}: 0;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
@else {
|
46
|
+
@if $auto {
|
47
|
+
&:last-child {
|
48
|
+
margin-#{$direction}: 0;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
@else {
|
53
|
+
&:nth-child(#{nth($query, 1)}) {
|
54
|
+
margin-#{$direction}: 0;
|
55
|
+
}
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
@else {
|
61
|
+
@warn "Too many arguments passed to the omega() mixin."
|
62
|
+
}
|
63
|
+
}
|
64
|
+
|
65
|
+
@mixin nth-omega($nth, $display: block, $direction: right) {
|
66
|
+
@warn "The nth-omega() mixin is deprecated. Please use omega() instead.";
|
67
|
+
@include omega($nth $display, $direction);
|
68
|
+
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neat-compass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-01-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: compass
|
@@ -73,6 +73,7 @@ files:
|
|
73
73
|
- stylesheets/neat/functions/_px-to-em.scss
|
74
74
|
- stylesheets/neat/grid/_global-variables.scss
|
75
75
|
- stylesheets/neat/grid/_grid.scss
|
76
|
+
- stylesheets/neat/grid/_omega.scss
|
76
77
|
- stylesheets/neat/grid/_visual-grid.scss
|
77
78
|
- stylesheets/neat/settings/_grid.scss
|
78
79
|
- stylesheets/neat/settings/_visual-grid.scss
|