grid-coordinates 1.1.4 → 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.mdown CHANGED
@@ -1,14 +1,16 @@
1
1
  # Grid Coordinates
2
2
 
3
- ## Sass based CSS Grid Framework Generator (Compass Extension)
3
+ ## A Sass based CSS Grid Framework Generator
4
4
 
5
- Grid Coordinates is a Highly configurable [Sass](http://sass-lang.com/) based CSS Grid Framework Generator delivered as a [Compass](http://compass-style.org/) extension inspired by the [1kb CSS Grid](http://1kbgrid.com/) project by [Tyler Tate](http://twitter.com/tylertate).
5
+ Grid Coordinates is a highly configurable [Sass](http://sass-lang.com/) based CSS Grid Framework Generator, inspired by [960 Grid System](http://960.gs/) and [1kb CSS Grid](http://1kbgrid.com/). Grid Coordinates takes the "coordinates" (total columns, grid width, gutter width) and generates the styles required for your grid.
6
6
 
7
- ## Just the grid please.
7
+ Grid Coordinates can be used as a [Compass](http://compass-style.org/) [extension](http://compass-style.org/help/tutorials/extensions/) and is delivered as a [Ruby gem](http://rubygems.org/gems/grid-coordinates).
8
8
 
9
- Grid Coordinates is quite simple. It's just a grid. And it is able to generate styles for grids of any size - you control the coordinates and it generates the styles.
9
+ ## Just the grid
10
10
 
11
- It fully leverages classes, extends and mixins (if that's your preference) to set up the styles for your grid. It supports nested grids, prefix and suffix grid features as well as push and pull grid features.
11
+ Grid Coordinates does one job - provide a rock solid grid framework. It's able to generate styles for grids of any size - you control the coordinates and it generates the styles.
12
+
13
+ It fully leverages classes, extends and mixins to set up the styles for your grid. It supports nested grids, prefix and suffix grid features as well as push and pull grid features.
12
14
 
13
15
  ## Installation
14
16
 
@@ -18,59 +20,50 @@ Then add `require 'grid-coordinates'` to your Compass config file.
18
20
 
19
21
  ## Usage
20
22
 
21
- Grid-coordinates defaults to create a 960 pixel grid with 12 columns and a 60px gutter. You can override these defaults in your project if this grid doesn't suit your needs.
23
+ Grid Coordinates defaults to a 960px grid with 12 columns and a 60px gutter (perfect for fans of 960.gs). You can override these defaults in your project if this grid doesn't suit your needs.
22
24
 
23
- Use [1kbgrid.com](http://1kbgrid.com) or another grid generator for guidance on configuring your grid's settings.
25
+ Use the [variable grid system](http://grids.heroku.com/) to plot the course for your CSS grid. The coordinates generated are based on the 960 Grid System, which is one point of inspiration for Grid Coordinates.
24
26
 
25
27
  Take a peek at [grid-coordinates.com/.../demo.sass](https://github.com/adamstac/grid-coordinates.com/blob/master/themes/grid-coordinates/sass/demo.sass) for a demonstration of how to use Grid Coordinates as well its [output CSS](https://github.com/adamstac/grid-coordinates.com/blob/master/themes/grid-coordinates/public/grid-coordinates/css/demo.css).
26
28
 
27
29
  ### Configure as needed and import
28
30
 
29
31
  // Configure grid coordinates
30
- $grid-columns: 24
32
+ $grid-columns: 12
31
33
  $grid-width: 60px
32
- $grid-gutter-width: 10px
33
- // Set to true by default. Can be set to false to clip content that overflows a grid block.
34
- // $overflow: false
34
+ $grid-gutter-width: 20px
35
35
 
36
- @import grid-coordinates
36
+ @import "grid-coordinates"
37
37
 
38
- // Only needed if you're using the classes and `@extend` instead of the mixins (suggested)
39
38
  +grid-coordinates
40
-
41
- ...
42
39
 
43
- The `$overflow` setting controls which of Compass' two clearfix mixins to be used, `+clearfix` or `+pie-clearfix`. The default setting is set to `true` and will not clip any content that overflows a grid block. If for some reason you need to clip overflowing content update this setting to `false`.
40
+ You can also set `$overflow` to false (set to true by default) to control which of Compass' two clearfix mixins will be used, `+clearfix` or `+pie-clearfix`. The default setting is `true` and will not clip any content that overflows a grid block. If for some reason you need to clip overflowing content, set `$overflow` to false in your configuration.
44
41
 
45
42
  ### Using classes and `@extend`
46
43
 
47
- When you use the mixin `+grid-coordinates` you are able to leverage the classes in your HTML or use the Sass `extend` option to "extend" the classes in your Sass stylesheets.
44
+ When you use the mixin `+grid-coordinates` (as shown above) you are able to leverage the CSS class selectors in your HTML markup or use the Sass `extend` option to "extend" the class selectors in your Sass stylesheets.
48
45
 
49
- For an example of this in use, take a peek at [grid-coordinates.com/.../demo.sass](https://github.com/adamstac/grid-coordinates.com/blob/master/themes/grid-coordinates/sass/demo.sass).
46
+ For an example of this in use, look at [grid-coordinates.com/.../demo.sass](https://github.com/adamstac/grid-coordinates.com/blob/master/themes/grid-coordinates/sass/demo.sass).
50
47
 
51
48
  `@extend .grid-container`
52
49
 
53
50
  `@extend .nested-grid-container`
54
51
 
55
- `@extend .grid([columns])`
56
-
57
- `@extend .grid-prefix([columns])`
58
-
59
- `@extend .grid-prefix-margin-([columns])`
52
+ `@extend .grid-[columns]`
60
53
 
61
- `@extend .grid-suffix([columns])`
54
+ `@extend .grid-prefix-[columns]`
62
55
 
63
- `@extend .grid-suffix-margin-([columns])`
56
+ `@extend .grid-suffix-[columns]`
64
57
 
65
- `@extend .grid-push([columns])`
58
+ `@extend .grid-push-[columns]`
66
59
 
67
- `@extend .grid-pull([columns])`
60
+ `@extend .grid-pull-[columns]`
68
61
 
69
62
  `@extend .grid-full`
70
63
 
71
- ### Using the Mixins
64
+ ### Using mixins
72
65
 
73
- Use these mixins in your Sass stylesheets. Keep in mind that when you go the route of using mixins you are replicated much code in your output CSS. It's advised that you to learn the [Sass extend concept](http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#extend) and use that method vs mixins. Your output CSS code with thank you.
66
+ Regardless if go the route of using the mixin `+grid-coordinates` (as shown above) or not, you'll have access to use these mixins in your Sass stylesheets. Keep in mind that when you go the route of using mixins, you could end up replicating a lot of code in your output CSS. Learn more about the [Sass extend concept](http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#extend) to see if you should use that method or mixins. Either way, Grid Coordinates got your back.
74
67
 
75
68
  `+grid-container`
76
69
 
@@ -78,9 +71,9 @@ Use these mixins in your Sass stylesheets. Keep in mind that when you go the rou
78
71
 
79
72
  `+grid([columns])`
80
73
 
81
- `+grid-prefix([columns], [type])`
74
+ `+grid-prefix([columns])`
82
75
 
83
- `+grid-suffix([columns], [type])`
76
+ `+grid-suffix([columns])`
84
77
 
85
78
  `+grid-push([columns])`
86
79
 
@@ -1,11 +1,9 @@
1
1
  require 'compass'
2
-
3
- # path from the library file to where you're keeping your compass stuff.
4
2
  Compass::Frameworks.register("grid-coordinates", :path => "#{File.dirname(__FILE__)}/..")
5
3
 
6
4
  module GridCoordinates
7
5
 
8
- VERSION = "1.1.4".freeze
9
- DATE = "2011-03-13".freeze
6
+ VERSION = "1.1.5"
7
+ DATE = "2011-08-14"
10
8
 
11
9
  end
@@ -1,6 +1,7 @@
1
- @import compass/utilities
1
+ @import "compass/utilities"
2
+ @import "compass/css3"
2
3
 
3
- // Configure grid coordinates
4
+ // Configure Grid Coordinates
4
5
  $grid-columns: 12 !default
5
6
  $grid-width: 60px !default
6
7
  $grid-gutter-width: 20px !default
@@ -43,15 +44,9 @@ $overflow: true !default
43
44
  @for $i from 1 through $grid-columns - 1
44
45
  .grid-prefix-#{$i}
45
46
  +grid-prefix($i)
46
- @for $i from 1 through $grid-columns - 1
47
- .grid-prefix-margin-#{$i}
48
- +grid-prefix($i,margin)
49
47
  @for $i from 1 through $grid-columns - 1
50
48
  .grid-suffix-#{$i}
51
49
  +grid-suffix($i)
52
- @for $i from 1 through $grid-columns - 1
53
- .grid-suffix-margin-#{$i}
54
- +grid-suffix($i,margin)
55
50
  @for $i from 1 through $grid-columns - 1
56
51
  .grid-push-#{$i}
57
52
  +grid-push($i)
@@ -88,6 +83,7 @@ $overflow: true !default
88
83
 
89
84
  // Grid Block
90
85
  =grid-block-base
86
+ +box-sizing(border-box)
91
87
  +float-left
92
88
  position: relative
93
89
  margin: 0 ($grid-gutter-width / 2)
@@ -114,17 +110,11 @@ $overflow: true !default
114
110
  @else
115
111
  width: (($grid-columns * $grid-width) + ($grid-columns * $grid-gutter-width)) - $grid-gutter-width
116
112
 
117
- =grid-prefix($grid-columns, $type: "padding")
118
- @if $type == "padding"
119
- padding-left: ($grid-columns * $grid-width) + ($grid-columns * $grid-gutter-width)
120
- @else
121
- margin-left: (($grid-columns * $grid-width) + ($grid-columns * $grid-gutter-width)) + ($grid-gutter-width / 2)
113
+ =grid-prefix($grid-columns)
114
+ margin-left: (($grid-columns * $grid-width) + ($grid-columns * $grid-gutter-width)) + ($grid-gutter-width / 2)
122
115
 
123
- =grid-suffix($grid-columns, $type: "padding")
124
- @if $type == "padding"
125
- padding-right: ($grid-columns * $grid-width) + ($grid-columns * $grid-gutter-width)
126
- @else
127
- margin-right: (($grid-columns * $grid-width) + ($grid-columns * $grid-gutter-width)) + ($grid-gutter-width / 2)
116
+ =grid-suffix($grid-columns)
117
+ margin-right: (($grid-columns * $grid-width) + ($grid-columns * $grid-gutter-width)) + ($grid-gutter-width / 2)
128
118
 
129
119
  =grid-push($grid-columns)
130
120
  left: ($grid-columns * $grid-width) + ($grid-columns * $grid-gutter-width)
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grid-coordinates
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
5
- prerelease: false
6
- segments:
7
- - 1
8
- - 1
9
- - 4
10
- version: 1.1.4
4
+ prerelease:
5
+ version: 1.1.5
11
6
  platform: ruby
12
7
  authors:
13
8
  - Adam Stacoviak
@@ -15,27 +10,21 @@ autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
12
 
18
- date: 2011-03-13 00:00:00 -06:00
19
- default_executable:
13
+ date: 2011-08-14 00:00:00 Z
20
14
  dependencies:
21
15
  - !ruby/object:Gem::Dependency
22
16
  name: compass
23
- prerelease: false
24
17
  requirement: &id001 !ruby/object:Gem::Requirement
25
18
  none: false
26
19
  requirements:
27
20
  - - ">="
28
21
  - !ruby/object:Gem::Version
29
- hash: 61
30
- segments:
31
- - 0
32
- - 10
33
- - 5
34
- version: 0.10.5
22
+ version: 0.11.5
35
23
  type: :runtime
24
+ prerelease: false
36
25
  version_requirements: *id001
37
- description: Highly configurable Sass CSS Grid Framework Generator (Compass Extension)
38
- email: adam@adamstacoviak.com
26
+ description: A highly configurable Sass based CSS Grid Framework Generator
27
+ email: adam@stacoviak.com
39
28
  executables: []
40
29
 
41
30
  extensions: []
@@ -43,13 +32,10 @@ extensions: []
43
32
  extra_rdoc_files: []
44
33
 
45
34
  files:
46
- - Rakefile
47
35
  - README.mdown
48
36
  - lib/grid-coordinates.rb
49
37
  - stylesheets/_grid-coordinates.sass
50
- - stylesheets/_grid-coordinates.scss
51
- has_rdoc: true
52
- homepage: http://adamstacoviak.com/
38
+ homepage: http://grid-coordinates.com/
53
39
  licenses: []
54
40
 
55
41
  post_install_message:
@@ -62,7 +48,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
62
48
  requirements:
63
49
  - - ">="
64
50
  - !ruby/object:Gem::Version
65
- hash: 3
51
+ hash: 2643158280030478742
66
52
  segments:
67
53
  - 0
68
54
  version: "0"
@@ -71,18 +57,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
71
57
  requirements:
72
58
  - - ">="
73
59
  - !ruby/object:Gem::Version
74
- hash: 23
75
- segments:
76
- - 1
77
- - 3
78
- - 6
79
60
  version: 1.3.6
80
61
  requirements: []
81
62
 
82
63
  rubyforge_project:
83
- rubygems_version: 1.3.7
64
+ rubygems_version: 1.8.7
84
65
  signing_key:
85
66
  specification_version: 3
86
- summary: A Sass CSS Grid Framework Generator inspired by the 1kb CSS Grid project
67
+ summary: A highly configurable Sass based CSS Grid Framework Generator inspired by 960.gs and 1kb CSS Grid that takes the coordinates (total columns, grid width, gutter width) and generates the required styles.
87
68
  test_files: []
88
69
 
data/Rakefile DELETED
@@ -1,25 +0,0 @@
1
- require 'lib/grid-coordinates'
2
-
3
- namespace :sass do
4
-
5
- desc "Converts the Sass to SCSS"
6
- task :convert do
7
- puts "*** Converting Sass to SCSS ***"
8
- system "sass-convert stylesheets/*.sass stylesheets/*.scss"
9
- end
10
-
11
- end
12
-
13
- namespace :gem do
14
-
15
- desc "Build the gem"
16
- task :build do
17
- system "gem build *.gemspec"
18
- end
19
-
20
- desc "Build and release the gem"
21
- task :release => :build do
22
- system "gem push grid-coordinates-#{GridCoordinates::VERSION}.gem"
23
- end
24
-
25
- end
@@ -1,132 +0,0 @@
1
- @import "compass/utilities";
2
-
3
- // Configure grid coordinates
4
- $grid-columns: 12 !default;
5
- $grid-width: 60px !default;
6
- $grid-gutter-width: 20px !default;
7
- $overflow: true !default;
8
-
9
- @mixin grid-coordinates {
10
- @if $overflow {
11
- .grid-pie-clearfix {
12
- @include pie-clearfix; } }
13
- @else {
14
- .grid-clearfix {
15
- @include clearfix; } }
16
- .grid-container {
17
- @include grid-container-base;
18
- @if $overflow {
19
- @extend .grid-pie-clearfix; }
20
- @else {
21
- @extend .grid-clearfix; } }
22
- .nested-grid-container {
23
- @include nested-grid-container-base;
24
- @if $overflow {
25
- @extend .grid-pie-clearfix; }
26
- @else {
27
- @extend .grid-clearfix; } }
28
- .grid-block {
29
- @include grid-block-base;
30
- @if $overflow {
31
- @extend .grid-pie-clearfix; }
32
- @else {
33
- @extend .grid-clearfix; } }
34
- .grid-full {
35
- @include grid-base($grid-columns);
36
- @extend .grid-block; }
37
- // Loops
38
- @for $i from 1 through $grid-columns {
39
- .grid-#{$i} {
40
- @include grid-base($i);
41
- @extend .grid-block; } }
42
- @for $i from 1 through $grid-columns - 1 {
43
- .grid-prefix-#{$i} {
44
- @include grid-prefix($i); } }
45
- @for $i from 1 through $grid-columns - 1 {
46
- .grid-prefix-margin-#{$i} {
47
- @include grid-prefix($i, margin); } }
48
- @for $i from 1 through $grid-columns - 1 {
49
- .grid-suffix-#{$i} {
50
- @include grid-suffix($i); } }
51
- @for $i from 1 through $grid-columns - 1 {
52
- .grid-suffix-margin-#{$i} {
53
- @include grid-suffix($i, margin); } }
54
- @for $i from 1 through $grid-columns - 1 {
55
- .grid-push-#{$i} {
56
- @include grid-push($i); } }
57
- @for $i from 1 through $grid-columns - 1 {
58
- .grid-pull-#{$i} {
59
- @include grid-pull($i); } } }
60
-
61
- @mixin overflow {
62
- @if $overflow {
63
- @include pie-clearfix; }
64
- @else {
65
- @include clearfix; } }
66
-
67
- // Grid Container
68
- @mixin grid-container-base {
69
- margin: 0 auto;
70
- width: $grid-columns * $grid-width + $grid-columns * $grid-gutter-width; }
71
-
72
- @mixin grid-container {
73
- @include overflow;
74
- @include grid-container-base; }
75
-
76
- // Nested Container
77
- @mixin nested-grid-container-base {
78
- display: inline-block;
79
- margin: {
80
- left: -($grid-gutter-width / 2);
81
- right: -($grid-gutter-width / 2); };
82
- width: auto; }
83
-
84
- @mixin nested-grid-container {
85
- @include overflow;
86
- @include nested-grid-container-base; }
87
-
88
- // Grid Block
89
- @mixin grid-block-base {
90
- @include float-left;
91
- position: relative;
92
- margin: 0 $grid-gutter-width / 2; }
93
-
94
- @mixin grid-block {
95
- @include grid-block-base;
96
- @include overflow; }
97
-
98
- // Grid
99
- @mixin grid-base($grid-columns) {
100
- @include grid-width($grid-columns); }
101
-
102
- @mixin grid($grid-columns) {
103
- @include grid-base($grid-columns);
104
- @include grid-block; }
105
-
106
- @mixin grid-full {
107
- @include grid($grid-columns); }
108
-
109
- // Grid logic
110
- @mixin grid-width($grid-columns) {
111
- @if $grid-columns == 1 {
112
- width: $grid-width; }
113
- @else {
114
- width: $grid-columns * $grid-width + $grid-columns * $grid-gutter-width - $grid-gutter-width; } }
115
-
116
- @mixin grid-prefix($grid-columns, $type: "padding") {
117
- @if $type == "padding" {
118
- padding-left: $grid-columns * $grid-width + $grid-columns * $grid-gutter-width; }
119
- @else {
120
- margin-left: $grid-columns * $grid-width + $grid-columns * $grid-gutter-width + $grid-gutter-width / 2; } }
121
-
122
- @mixin grid-suffix($grid-columns, $type: "padding") {
123
- @if $type == "padding" {
124
- padding-right: $grid-columns * $grid-width + $grid-columns * $grid-gutter-width; }
125
- @else {
126
- margin-right: $grid-columns * $grid-width + $grid-columns * $grid-gutter-width + $grid-gutter-width / 2; } }
127
-
128
- @mixin grid-push($grid-columns) {
129
- left: $grid-columns * $grid-width + $grid-columns * $grid-gutter-width; }
130
-
131
- @mixin grid-pull($grid-columns) {
132
- left: -($grid-columns * $grid-width) + $grid-columns * $grid-gutter-width; }