neat-compass 1.4.0 → 1.5.0.pre

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,6 @@
1
1
  // Functions
2
2
  @import "functions/private";
3
3
  @import "functions/new-breakpoint";
4
- @import "functions/px-to-em";
5
4
 
6
5
  // Settings
7
6
  @import "settings/grid";
@@ -44,6 +44,24 @@
44
44
  }
45
45
  }
46
46
 
47
+ @function container-shift($shift: $shift) {
48
+ $parent-columns: $grid-columns !default;
49
+
50
+ @if length($shift) == 3 {
51
+ $container-columns: nth($shift, 3);
52
+ @return $container-columns;
53
+ }
54
+
55
+ @else if length($shift) == 2 {
56
+ $container-columns: nth($shift, 2);
57
+ @return $container-columns;
58
+ }
59
+
60
+ @else {
61
+ @return $parent-columns;
62
+ }
63
+ }
64
+
47
65
  // Generates a striped background
48
66
  @function gradient-stops($grid-columns, $color: $visual-grid-color) {
49
67
  $transparent: rgba(0,0,0,0);
@@ -1,4 +1,11 @@
1
1
  @mixin shift($n-columns: 1) {
2
+ @include shift-in-context($n-columns);
3
+ }
4
+
5
+ @mixin shift-in-context($shift: $columns of $container-columns) {
6
+ $n-columns: nth($shift, 1);
7
+ $parent-columns: container-shift($shift);
8
+
2
9
  $direction: get-direction($layout-direction, $default-layout-direction);
3
10
  $opposite-direction: get-opposite-direction($direction);
4
11
 
@@ -16,10 +16,17 @@
16
16
  padding-#{$direction}: $padding;
17
17
  width: flex-grid($columns, $container-columns) + $padding;
18
18
  } @else {
19
- display: block;
20
19
  float: #{$opposite-direction};
21
20
 
21
+ @if $display != no-display {
22
+ display: block;
23
+ }
24
+
22
25
  @if $display == collapse {
26
+ @warn "The 'collapse' argument will be deprecated. Use 'block-collapse' instead."
27
+ }
28
+
29
+ @if $display == collapse or $display == block-collapse {
23
30
  width: flex-grid($columns, $container-columns) + flex-gutter($container-columns);
24
31
 
25
32
  &:last-child {
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neat-compass
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
5
- prerelease:
4
+ version: 1.5.0.pre
5
+ prerelease: 6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jed Foster
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-08 00:00:00.000000000 Z
12
+ date: 2013-11-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: compass
@@ -70,7 +70,6 @@ files:
70
70
  - stylesheets/neat/_neat.scss
71
71
  - stylesheets/neat/functions/_new-breakpoint.scss
72
72
  - stylesheets/neat/functions/_private.scss
73
- - stylesheets/neat/functions/_px-to-em.scss
74
73
  - stylesheets/neat/grid/_fill-parent.scss
75
74
  - stylesheets/neat/grid/_grid.scss
76
75
  - stylesheets/neat/grid/_media.scss
@@ -101,9 +100,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
101
100
  required_rubygems_version: !ruby/object:Gem::Requirement
102
101
  none: false
103
102
  requirements:
104
- - - ! '>='
103
+ - - ! '>'
105
104
  - !ruby/object:Gem::Version
106
- version: '0'
105
+ version: 1.3.1
107
106
  requirements: []
108
107
  rubyforge_project:
109
108
  rubygems_version: 1.8.23
@@ -1,3 +0,0 @@
1
- @function em($pxval, $base: 16) {
2
- @return ($pxval / $base) * 1em;
3
- }