neat-compass 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/stylesheets/neat/_neat.scss +1 -1
- data/stylesheets/neat/functions/_new-breakpoint.scss +1 -1
- data/stylesheets/neat/functions/_private.scss +1 -1
- data/stylesheets/neat/grid/_media.scss +18 -31
- data/stylesheets/neat/grid/_omega.scss +10 -28
- data/stylesheets/neat/grid/_private.scss +0 -7
- data/stylesheets/neat/grid/_span-columns.scss +1 -3
- metadata +2 -2
data/stylesheets/neat/_neat.scss
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
@mixin media($query:$feature $value $columns, $total-columns: $grid-columns) {
|
2
|
-
|
3
2
|
@if length($query) == 1 {
|
4
3
|
@media screen and ($default-feature: nth($query, 1)) {
|
5
4
|
$default-grid-columns: $grid-columns;
|
@@ -9,43 +8,31 @@
|
|
9
8
|
}
|
10
9
|
}
|
11
10
|
|
12
|
-
@else
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
$grid-columns: $default-grid-columns;
|
18
|
-
}
|
19
|
-
}
|
11
|
+
@else {
|
12
|
+
$loopTo: length($query);
|
13
|
+
$mediaQuery: 'screen and ';
|
14
|
+
$default-grid-columns: $grid-columns;
|
15
|
+
$grid-columns: $total-columns;
|
20
16
|
|
21
|
-
|
22
|
-
|
23
|
-
$
|
24
|
-
$grid-columns: nth($query, 3);
|
25
|
-
@content;
|
26
|
-
$grid-columns: $default-grid-columns;
|
17
|
+
@if length($query) % 2 != 0 {
|
18
|
+
$grid-columns: nth($query, $loopTo);
|
19
|
+
$loopTo: $loopTo - 1;
|
27
20
|
}
|
28
|
-
}
|
29
21
|
|
30
|
-
|
31
|
-
@
|
32
|
-
$
|
33
|
-
|
34
|
-
@
|
35
|
-
|
22
|
+
$i: 1;
|
23
|
+
@while $i <= $loopTo {
|
24
|
+
$mediaQuery: $mediaQuery + '(' + nth($query, $i) + ': ' + nth($query, $i + 1) + ') ';
|
25
|
+
|
26
|
+
@if ($i + 1) != $loopTo {
|
27
|
+
$mediaQuery: $mediaQuery + 'and ';
|
28
|
+
}
|
29
|
+
|
30
|
+
$i: $i + 2;
|
36
31
|
}
|
37
|
-
}
|
38
32
|
|
39
|
-
|
40
|
-
@media screen and (nth($query, 1): nth($query, 2)) and (nth($query, 3): nth($query, 4)) {
|
41
|
-
$default-grid-columns: $grid-columns;
|
42
|
-
$grid-columns: nth($query, 5);
|
33
|
+
@media #{$mediaQuery} {
|
43
34
|
@content;
|
44
35
|
$grid-columns: $default-grid-columns;
|
45
36
|
}
|
46
37
|
}
|
47
|
-
|
48
|
-
@else {
|
49
|
-
@warn "Wrong number of arguments for breakpoint(). Read the documentation for more details.";
|
50
|
-
}
|
51
38
|
}
|
@@ -9,6 +9,10 @@
|
|
9
9
|
$direction: get-direction($layout-direction, $default-layout-direction);
|
10
10
|
}
|
11
11
|
|
12
|
+
@if $table {
|
13
|
+
@warn "The omega mixin no longer removes padding in table layouts."
|
14
|
+
}
|
15
|
+
|
12
16
|
@if length($query) == 1 {
|
13
17
|
@if $auto {
|
14
18
|
&:last-child {
|
@@ -16,14 +20,8 @@
|
|
16
20
|
}
|
17
21
|
}
|
18
22
|
|
19
|
-
@else if contains-display-value($query) {
|
20
|
-
|
21
|
-
padding-#{$direction}: 0;
|
22
|
-
}
|
23
|
-
|
24
|
-
@else {
|
25
|
-
margin-#{$direction}: 0;
|
26
|
-
}
|
23
|
+
@else if contains-display-value($query) and $table == false {
|
24
|
+
margin-#{$direction}: 0;
|
27
25
|
}
|
28
26
|
|
29
27
|
@else {
|
@@ -32,30 +30,14 @@
|
|
32
30
|
}
|
33
31
|
|
34
32
|
@else if length($query) == 2 {
|
35
|
-
@if $
|
36
|
-
|
37
|
-
|
38
|
-
padding-#{$direction}: 0;
|
39
|
-
}
|
40
|
-
}
|
41
|
-
|
42
|
-
@else {
|
43
|
-
&:nth-child(#{nth($query, 1)}) {
|
44
|
-
padding-#{$direction}: 0;
|
45
|
-
}
|
33
|
+
@if $auto {
|
34
|
+
&:last-child {
|
35
|
+
margin-#{$direction}: 0;
|
46
36
|
}
|
47
37
|
}
|
48
38
|
|
49
39
|
@else {
|
50
|
-
@
|
51
|
-
&:last-child {
|
52
|
-
margin-#{$direction}: 0;
|
53
|
-
}
|
54
|
-
}
|
55
|
-
|
56
|
-
@else {
|
57
|
-
@include nth-child(nth($query, 1), $direction);
|
58
|
-
}
|
40
|
+
@include nth-child(nth($query, 1), $direction);
|
59
41
|
}
|
60
42
|
}
|
61
43
|
|
@@ -41,10 +41,3 @@ $layout-direction: nil !default;
|
|
41
41
|
|
42
42
|
@return $display-table;
|
43
43
|
}
|
44
|
-
|
45
|
-
@function get-padding-for-table-layout($columns, $total-columns) {
|
46
|
-
$total-padding: flex-gutter($total-columns) * ($columns - 1);
|
47
|
-
$padding: $total-padding / $columns;
|
48
|
-
|
49
|
-
@return $padding;
|
50
|
-
}
|
@@ -11,10 +11,8 @@
|
|
11
11
|
$display-table: is-display-table($container-display-table, $display);
|
12
12
|
|
13
13
|
@if $display-table {
|
14
|
-
$padding: get-padding-for-table-layout($columns, $container-columns);
|
15
14
|
display: table-cell;
|
16
|
-
|
17
|
-
width: flex-grid($columns, $container-columns) + $padding;
|
15
|
+
width: percentage($columns / $container-columns);
|
18
16
|
} @else {
|
19
17
|
float: #{$opposite-direction};
|
20
18
|
|
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.5.
|
4
|
+
version: 1.5.1
|
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: 2014-04-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: compass
|