grater 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ .sass-cache
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source :rubygems
2
+
3
+ gemspec
@@ -0,0 +1,18 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ grater (0.1.0)
5
+ sass (>= 3.2.0.alpha.261)
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ rake (0.9.2.2)
11
+ sass (3.2.0.alpha.261)
12
+
13
+ PLATFORMS
14
+ ruby
15
+
16
+ DEPENDENCIES
17
+ grater!
18
+ rake
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2012 Sam Soffes
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,10 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
3
+
4
+ desc 'Compile the source file into a .css'
5
+ task :compile do
6
+ `bundle exec sass --scss --style=compressed vendor/assets/stylesheets/grater.css.scss grater.css`
7
+ puts 'Compiled to grater.css'
8
+ end
9
+
10
+ task default: :compile
@@ -0,0 +1,25 @@
1
+ # Grater
2
+
3
+ CSS grids as easy to use as a cheese grater.
4
+
5
+ Simply download [grater.css](https://github.com/samsoffes/grater/raw/master/grater.css) to get started. You can also install it as a gem if you are using Rails 3.1 or higher with the asset pipeline.
6
+
7
+ ## Gem Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ gem 'grater'
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ You may need to run `bundle update` since Rails comes with `sass-rails` which uses an older version of the Sass gem.
18
+
19
+ You can also install it yourself with:
20
+
21
+ $ gem install grater
22
+
23
+ ## Usage
24
+
25
+ Simply require `grater` like you would any other stylesheet using Sprockets.
@@ -0,0 +1,52 @@
1
+ // Row
2
+ section.grater {
3
+ // Columns
4
+ > section {
5
+ width: 300px;
6
+ margin: 0 0 2em;
7
+
8
+ // First column
9
+ &:first-child {
10
+ float: left;
11
+ }
12
+
13
+ // Second column
14
+ &:last-child {
15
+ float: right;
16
+ }
17
+ }
18
+
19
+ // When the `reverse` class is added, the columns are switch
20
+ &.reverse > section {
21
+ &:first-child {
22
+ float: right;
23
+ }
24
+
25
+ &:last-child {
26
+ float: left;
27
+ }
28
+ }
29
+
30
+ // Clearfix
31
+ zoom: 1;
32
+
33
+ &:before,
34
+ &:after {
35
+ content: "";
36
+ display: table;
37
+ }
38
+
39
+ &:after {
40
+ clear: both;
41
+ }
42
+
43
+ // Responsive
44
+ @media all and (max-width: 660px) {
45
+ margin-bottom: 1em;
46
+
47
+ > section {
48
+ float: none !important; // Shut up. I know, I know
49
+ margin: 0 auto 2em;
50
+ }
51
+ }
52
+ }
@@ -0,0 +1 @@
1
+ div.grate{zoom:1}div.grate>div{width:300px;margin:0 0 2em}div.grate>div:first-child{float:left}div.grate>div:last-child{float:right}div.grate.reverse>div:first-child{float:right}div.grate.reverse>div:last-child{float:left}div.grate:before,div.grate:after{content:"";display:table}div.grate:after{clear:both}@media all and (max-width: 660px){div.grate{margin-bottom:1em}div.grate>div{float:none !important;margin:0 auto 2em}}
@@ -0,0 +1,20 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/grater/version', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.authors = ['Sam Soffes']
6
+ gem.email = ['sam@samsoff.es']
7
+ gem.summary = 'CSS grids as easy to use as a cheese grater'
8
+ gem.description = 'This gem provides the grate CSS grid system for your Rails 3 application.'
9
+ gem.homepage = 'https://github.com/samsoffes/grater'
10
+
11
+ gem.files = `git ls-files`.split($\)
12
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
13
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
+ gem.name = 'grater'
15
+ gem.require_paths = ['lib']
16
+ gem.version = Grater::VERSION
17
+
18
+ gem.add_dependency 'sass', '>= 3.2.0.alpha.261' # Use alpha since we use @media syntax
19
+ gem.add_development_dependency 'rake'
20
+ end
@@ -0,0 +1,5 @@
1
+ require 'grater/version'
2
+ require 'grater/engine'
3
+
4
+ module Grater
5
+ end
@@ -0,0 +1,4 @@
1
+ module Grater
2
+ class Engine < Rails::Engine
3
+ end
4
+ end
@@ -0,0 +1,3 @@
1
+ module Grater
2
+ VERSION = '0.1.0'
3
+ end
metadata ADDED
@@ -0,0 +1,95 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: grater
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Sam Soffes
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-07-09 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: sass
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 3.2.0.alpha.261
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 3.2.0.alpha.261
30
+ - !ruby/object:Gem::Dependency
31
+ name: rake
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ description: This gem provides the grate CSS grid system for your Rails 3 application.
47
+ email:
48
+ - sam@samsoff.es
49
+ executables: []
50
+ extensions: []
51
+ extra_rdoc_files: []
52
+ files:
53
+ - .gitignore
54
+ - Gemfile
55
+ - Gemfile.lock
56
+ - LICENSE
57
+ - Rakefile
58
+ - Readme.markdown
59
+ - app/assets/stylesheets/grater.css.scss
60
+ - grater.css
61
+ - grater.gemspec
62
+ - lib/grater.rb
63
+ - lib/grater/engine.rb
64
+ - lib/grater/version.rb
65
+ homepage: https://github.com/samsoffes/grater
66
+ licenses: []
67
+ post_install_message:
68
+ rdoc_options: []
69
+ require_paths:
70
+ - lib
71
+ required_ruby_version: !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ segments:
78
+ - 0
79
+ hash: -617764701865611400
80
+ required_rubygems_version: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ segments:
87
+ - 0
88
+ hash: -617764701865611400
89
+ requirements: []
90
+ rubyforge_project:
91
+ rubygems_version: 1.8.23
92
+ signing_key:
93
+ specification_version: 3
94
+ summary: CSS grids as easy to use as a cheese grater
95
+ test_files: []