stipe 0.0.6.1 → 0.0.6.2

Sign up to get free protection for your applications and to get access to all the features.
data/readme.md CHANGED
@@ -12,6 +12,13 @@ To use the Stipe gem, using Bundler `gem 'stipe'`
12
12
  Stipe is a Compass Extension, so Compass is a dependency. You will need to include `require 'stipe'` in your config.rb file.
13
13
 
14
14
  # Stipe Changelog
15
+
16
+ ###0.0.6.2
17
+ * Make `push`/`pull` grid mixins accept context arguments. Useful for nested, percentage-based grids.
18
+
19
+ ###0.0.6.1
20
+ * Tweak `the_grid` to work with 24 column default setting
21
+
15
22
  ###0.0.6.0
16
23
  * Updated `@clearfix` to remove redundant CSS output.
17
24
  * Added some additional @media query-scoped grid placeholders.
@@ -39,7 +39,8 @@ $grid_child: none !default; // sets parent child relationship
39
39
  $grid_align: default !default; // by default grids float left. Optional argument is ``center``
40
40
  $col_base: 10 !default; // equal to 10px in the standard 960.gs
41
41
  $col_gutter: $col_base * 2 !default; // sets default grid gutter width
42
- $grid_960: 960 / 100% !default; // grid math for percentages
42
+ $grid_max_width: 960 !default;
43
+ $grid_960: $grid_max_width / 100% !default; // grid math for percentages
43
44
 
44
45
 
45
46
  // the_grid calculates all the variables to define with width of the grid column
@@ -33,30 +33,30 @@ $border_place: '';
33
33
 
34
34
  ///////// prefix value accounts for a full column in the grid ////////////
35
35
  // -----------------------------------------------------------------------
36
- @mixin prefix($grid_type, $col_count, $grid_uom: $grid_uom, $move: prefix) {
37
- @include ppps ($grid_type, $col_count, $grid_uom, $move);
36
+ @mixin prefix($grid_type, $col_count, $grid_uom: $grid_uom, $grid_context: $grid_type, $move: prefix) {
37
+ @include ppps ($grid_type, $col_count, $grid_uom, $move, $grid_context);
38
38
  }
39
39
 
40
40
  ///////// suffix value accounts for a full column in the grid ////////////
41
41
  // -----------------------------------------------------------------------
42
42
 
43
- @mixin suffix($grid_type, $col_count, $grid_uom: $grid_uom, $move: suffix) {
44
- @include ppps ($grid_type, $col_count, $grid_uom, $move);
43
+ @mixin suffix($grid_type, $col_count, $grid_uom: $grid_uom, $grid_context: $grid_type, $move: suffix) {
44
+ @include ppps ($grid_type, $col_count, $grid_uom, $move, $grid_context);
45
45
  }
46
46
 
47
47
  ///////// push value accounts for a full column in the grid ////////////
48
48
  // -----------------------------------------------------------------------
49
49
 
50
- @mixin push($grid_type, $col_count, $grid_uom: $grid_uom, $move: push) {
51
- @include ppps ($grid_type, $col_count, $grid_uom, $move);
50
+ @mixin push($grid_type, $col_count, $grid_uom: $grid_uom, $grid_context: $grid_type, $move: push) {
51
+ @include ppps ($grid_type, $col_count, $grid_uom, $move, $grid_context);
52
52
  position: relative;
53
53
  }
54
54
 
55
55
  ///////// pull value accounts for a full column in the grid ////////////
56
56
  // -----------------------------------------------------------------------
57
57
 
58
- @mixin pull($grid_type, $col_count, $grid_uom: $grid_uom, $move: pull) {
59
- @include ppps ($grid_type, $col_count, $grid_uom, $move);
58
+ @mixin pull($grid_type, $col_count, $grid_uom: $grid_uom, $grid_context: $grid_type, $move: pull) {
59
+ @include ppps ($grid_type, $col_count, $grid_uom, $move, $grid_context);
60
60
  position: relative;
61
61
  }
62
62
 
@@ -1,6 +1,6 @@
1
1
  // Sass math that will determine the width of the push, pull, prefix and suffix and write appropiate CSS
2
2
  // ---------------------------- //
3
- @mixin push_logic ($col_count, $grid_uom, $move, $width_gutter) {
3
+ @mixin push_logic ($col_count, $grid_uom, $move, $width_gutter, $grid_context_width) {
4
4
  @if $grid_uom == em {
5
5
  $padding_width: #{($width_gutter * $col_count) / $em}em;
6
6
  @if $move == suffix {
@@ -17,8 +17,7 @@
17
17
  }
18
18
  }
19
19
  @else if $grid_uom == percent {
20
- $grid_width: ($width_gutter * $col_count) / $grid_960;
21
- $padding_width: #{($width_gutter * $col_count) / $grid_960};
20
+ $padding_width: #{($width_gutter * $col_count) / $grid_context_width * 100%};
22
21
  @if $move == suffix {
23
22
  padding-right: $padding_width;
24
23
  }
@@ -26,10 +25,10 @@
26
25
  padding-left: $padding_width;
27
26
  }
28
27
  @else if $move == push {
29
- left: ($width_gutter * $col_count) / $grid_960;
28
+ left: $padding_width;
30
29
  }
31
30
  @else if $move == pull {
32
- right: ($width_gutter * $col_count) / $grid_960;
31
+ right: $padding_width;
33
32
  }
34
33
  }
35
34
  }
@@ -39,13 +38,23 @@
39
38
  // Paired down reusable logic, based on $type will determine width + gutter and
40
39
  // send values to the push_logic mixin to determine the value of the Push, Pull, Prefix or Suffix
41
40
  // ------------------------------------------------------------------ //
42
- @mixin ppps ($type, $col_count, $grid_uom, $move) {
43
- @if $type == 12 {
41
+ @mixin ppps ($type, $col_count, $grid_uom, $move, $grid_context) {
42
+ @if $type == 12 {
44
43
  $width_gutter: 80;
45
- @include push_logic ($col_count, $grid_uom, $move, $width_gutter);
44
+ $grid_context_width: $grid_context * $width_gutter;
45
+
46
+ @include push_logic ($col_count, $grid_uom, $move, $width_gutter, $grid_context_width);
46
47
  }
47
48
  @else if $type == 16 {
48
49
  $width_gutter: 60;
49
- @include push_logic ($col_count, $grid_uom, $move, $width_gutter);
50
+ $grid_context_width: $grid_context * $width_gutter;
51
+
52
+ @include push_logic ($col_count, $grid_uom, $move, $width_gutter, $grid_context_width);
53
+ }
54
+ @else if $type == 24 {
55
+ $width_gutter: 40;
56
+ $grid_context_width: $grid_context * $width_gutter;
57
+
58
+ @include push_logic ($col_count, $grid_uom, $move, $width_gutter, $grid_context_width);
50
59
  }
51
60
  }
@@ -150,7 +150,7 @@ pre, code, kbd, samp {
150
150
  }
151
151
 
152
152
 
153
- .clickable, label {
153
+ .clickable {
154
154
  @extend %stipe-cursor-pointer;
155
155
  }
156
156
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stipe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6.1
4
+ version: 0.0.6.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-06-27 00:00:00.000000000 Z
13
+ date: 2013-07-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: compass