Skip to content

Commit

Permalink
Dropped the .sass-cache from the repo and added to gitignore, cleaned…
Browse files Browse the repository at this point in the history
… up the test page. Dropped support for grid-prefix and grid-suffix using padding and now uses margin to support the feature instead
  • Loading branch information
adamstac committed Aug 14, 2011
1 parent 15af709 commit aea34bc
Show file tree
Hide file tree
Showing 72 changed files with 43 additions and 157 deletions.
3 changes: 2 additions & 1 deletion .gitignore
@@ -1 +1,2 @@
*.gem
*.gem
.sass-cache
5 changes: 3 additions & 2 deletions grid-coordinates.gemspec
Expand Up @@ -8,7 +8,7 @@ Gem::Specification.new do |s|
# Gem Details
s.name = "grid-coordinates"
s.description = %q{A highly configurable Sass based CSS Grid Framework Generator}
s.summary = %q{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.}
s.summary = %q{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.}
s.authors = ["Adam Stacoviak"]
s.email = "adam@stacoviak.com"
s.homepage = "http://grid-coordinates.com/"
Expand All @@ -20,9 +20,10 @@ Gem::Specification.new do |s|
]
s.files += Dir.glob("lib/**/*.*")
s.files += Dir.glob("stylesheets/**/*.*")
s.files += Dir.glob("test/**/*.*")

# Gem Bookkeeping
s.required_rubygems_version = ">= 1.3.6"
s.rubygems_version = %q{1.3.6}
s.add_dependency("compass", [">= 0.11.3"])
s.add_dependency("compass", [">= 0.11.5"])
end
4 changes: 1 addition & 3 deletions lib/grid-coordinates.rb
@@ -1,11 +1,9 @@
require 'compass'

# path from the library file to where you're keeping your compass stuff.
Compass::Frameworks.register("grid-coordinates", :path => "#{File.dirname(__FILE__)}/..")

module GridCoordinates

VERSION = "1.1.5"
DATE = "2011-07-14"
DATE = "2011-08-14"

end
20 changes: 4 additions & 16 deletions stylesheets/_grid-coordinates.sass
Expand Up @@ -44,15 +44,9 @@ $overflow: true !default
@for $i from 1 through $grid-columns - 1
.grid-prefix-#{$i}
+grid-prefix($i)
@for $i from 1 through $grid-columns - 1
.grid-prefix-margin-#{$i}
+grid-prefix($i,margin)
@for $i from 1 through $grid-columns - 1
.grid-suffix-#{$i}
+grid-suffix($i)
@for $i from 1 through $grid-columns - 1
.grid-suffix-margin-#{$i}
+grid-suffix($i,margin)
@for $i from 1 through $grid-columns - 1
.grid-push-#{$i}
+grid-push($i)
Expand Down Expand Up @@ -116,17 +110,11 @@ $overflow: true !default
@else
width: (($grid-columns * $grid-width) + ($grid-columns * $grid-gutter-width)) - $grid-gutter-width

=grid-prefix($grid-columns, $type: "padding")
@if $type == "padding"
padding-left: ($grid-columns * $grid-width) + ($grid-columns * $grid-gutter-width)
@else if $type == "margin"
margin-left: (($grid-columns * $grid-width) + ($grid-columns * $grid-gutter-width)) + ($grid-gutter-width / 2)
=grid-prefix($grid-columns)
margin-left: (($grid-columns * $grid-width) + ($grid-columns * $grid-gutter-width)) + ($grid-gutter-width / 2)

=grid-suffix($grid-columns, $type: "padding")
@if $type == "padding"
padding-right: ($grid-columns * $grid-width) + ($grid-columns * $grid-gutter-width)
@else
margin-right: (($grid-columns * $grid-width) + ($grid-columns * $grid-gutter-width)) + ($grid-gutter-width / 2)
=grid-suffix($grid-columns)
margin-right: (($grid-columns * $grid-width) + ($grid-columns * $grid-gutter-width)) + ($grid-gutter-width / 2)

=grid-push($grid-columns)
left: ($grid-columns * $grid-width) + ($grid-columns * $grid-gutter-width)
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
144 changes: 26 additions & 118 deletions test/public/stylesheets/screen.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion test/sass/_style.sass
@@ -1,7 +1,7 @@
@import "compass/layout/grid-background"

=demo-style
$grid-background-column-color: rgba(red,.10)
$grid-background-column-color: rgba(red,.05)
$grid-background-gutter-color: rgba(red,0)
$grid-background-total-columns: 12
$grid-background-column-width: 60px
Expand Down
9 changes: 4 additions & 5 deletions test/sass/screen.sass
Expand Up @@ -5,14 +5,13 @@
$grid-columns: 12
$grid-width: 60px
$grid-gutter-width: 20px
// $overflow: true
// @import grid-coordinates
// Route to local gem mixin file for development use only
// path to local mixin ~ for development use only
@import ../../stylesheets/grid-coordinates

+grid-coordinates

+demo-style

.grid-prefix-1, .grid-prefix-margin-1
text-align: left !important
+demo-style
13 changes: 2 additions & 11 deletions test/views/index.haml
Expand Up @@ -2,24 +2,15 @@
%html{html_attrs}
%head
%meta{ "http-equiv" => "content-type", "content" => "text/html; charset=utf-8" }
- if @description
%meta{ "name" => "description", "content" => @description }
- if @keywords
%meta{ "name" => "keywords", "content" => @keywords }
%title= @title
%link{ :href => "/stylesheets/screen.css", :media => "screen", :rel => "stylesheet", :type => "text/css" }
%script{:src => "http://cdnjs.cloudflare.com/ajax/libs/jquery/1.6.2/jquery.min.js"}
%script{:src => "/javascripts/site.js"}
%body{ :class => @body_class }
%body
#header.grid-container
#branding.grid-4
%p Branding
#navigation.grid-7.grid-prefix-margin-1
%p Navigation
#header.grid-container
#branding.grid-4
%p Branding
#navigation.grid-7.grid-prefix-1
#navigation.grid-8
%p Navigation
#page.grid-container
#page-body.grid-8
Expand Down

0 comments on commit aea34bc

Please sign in to comment.