chriseppstein-compass-960-plugin 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest +12 -0
- data/README.mkdn +56 -0
- data/Rakefile +22 -0
- data/VERSION +1 -0
- data/compass-960-plugin.gemspec +34 -0
- data/lib/ninesixty/compass_plugin.rb +5 -0
- data/lib/ninesixty/sass_extensions.rb +7 -0
- data/lib/ninesixty.rb +2 -0
- data/sass/960/_grid.sass +61 -0
- data/sass/960/_text.sass +59 -0
- data/templates/project/config.rb +1 -0
- data/templates/project/grid.sass +16 -0
- data/templates/project/text.sass +10 -0
- metadata +90 -0
data/Manifest
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
lib/ninesixty/compass_plugin.rb
|
2
|
+
lib/ninesixty/sass_extensions.rb
|
3
|
+
lib/ninesixty.rb
|
4
|
+
Rakefile
|
5
|
+
README.mkdn
|
6
|
+
sass/960/_grid.sass
|
7
|
+
sass/960/_text.sass
|
8
|
+
templates/project/config.rb
|
9
|
+
templates/project/grid.sass
|
10
|
+
templates/project/text.sass
|
11
|
+
VERSION
|
12
|
+
Manifest
|
data/README.mkdn
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
960 Grid System - Compass Plugin
|
2
|
+
================================
|
3
|
+
|
4
|
+
* Port of Version 1.0
|
5
|
+
* 2008-03-24
|
6
|
+
|
7
|
+
Created by Nathan Smith. See the official site for more info: <http://960.gs/>
|
8
|
+
|
9
|
+
---------
|
10
|
+
|
11
|
+
This plugin adds the 960 Grid System framework to [Compass](http://compass-style.org/).
|
12
|
+
|
13
|
+
Install
|
14
|
+
=======
|
15
|
+
|
16
|
+
sudo gem install chriseppstein-compass
|
17
|
+
sudo gem install chriseppstein-compass-960-plugin
|
18
|
+
|
19
|
+
Create a 960-based Compass Project
|
20
|
+
==================================
|
21
|
+
|
22
|
+
compass -r ninesixty -f 960 <project name>
|
23
|
+
|
24
|
+
Then edit your `grid.sass` and `text.sass` files accordingly. A reset is added into grid.sass automatically.
|
25
|
+
|
26
|
+
Customizing your Grid System
|
27
|
+
============================
|
28
|
+
|
29
|
+
To create a grid system with other number of columns use the `+grid-system` mixin to generate
|
30
|
+
the corresponding classes.
|
31
|
+
|
32
|
+
Example:
|
33
|
+
|
34
|
+
#wrap
|
35
|
+
+grid-system(24)
|
36
|
+
|
37
|
+
Making Semantic Grids
|
38
|
+
=====================
|
39
|
+
|
40
|
+
* Use the `+container` mixin to declare your container element.
|
41
|
+
* Use the `+grid` mixin to declare a grid element.
|
42
|
+
* Use the `+alpha` and `+omega` mixins to declare the first and last grid elements for a row.
|
43
|
+
* User the `+grid-prefix` and `+grid-suffix` mixins to add grid columns before or after a grid element.
|
44
|
+
|
45
|
+
Example:
|
46
|
+
|
47
|
+
#wrap
|
48
|
+
+container
|
49
|
+
#left-nav
|
50
|
+
+alpha
|
51
|
+
+grid(5,16)
|
52
|
+
#main-content
|
53
|
+
+grid-prefix(1,16)
|
54
|
+
+grid(10, 16)
|
55
|
+
+omega
|
56
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
require 'sass'
|
3
|
+
require 'lib/ninesixty/sass_extensions'
|
4
|
+
|
5
|
+
begin
|
6
|
+
require 'echoe'
|
7
|
+
|
8
|
+
Echoe.new('compass-960-plugin', open('VERSION').read) do |p|
|
9
|
+
# p.rubyforge_name = '960'
|
10
|
+
p.summary = "Compass compatible Sass port of 960.gs."
|
11
|
+
p.description = "The 960 Grid System is an effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. http://960.gs/"
|
12
|
+
p.url = "http://github.com/chriseppstein/compass-960-plugin"
|
13
|
+
p.author = ['Chris Eppstein']
|
14
|
+
p.email = "chris@eppsteins.net"
|
15
|
+
p.dependencies = ["chriseppstein-compass"]
|
16
|
+
p.has_rdoc = false
|
17
|
+
end
|
18
|
+
|
19
|
+
rescue LoadError => boom
|
20
|
+
puts "You are missing a dependency required for meta-operations on this gem."
|
21
|
+
puts "#{boom.to_s.capitalize}."
|
22
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.9.2
|
@@ -0,0 +1,34 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = %q{compass-960-plugin}
|
3
|
+
s.version = "0.9.2"
|
4
|
+
|
5
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
6
|
+
s.authors = ["Chris Eppstein"]
|
7
|
+
s.date = %q{2009-01-24}
|
8
|
+
s.description = %q{The 960 Grid System is an effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. http://960.gs/}
|
9
|
+
s.email = %q{chris@eppsteins.net}
|
10
|
+
s.extra_rdoc_files = ["lib/ninesixty/compass_plugin.rb", "lib/ninesixty/sass_extensions.rb", "lib/ninesixty.rb", "README.mkdn"]
|
11
|
+
s.files = ["lib/ninesixty/compass_plugin.rb", "lib/ninesixty/sass_extensions.rb", "lib/ninesixty.rb", "Rakefile", "README.mkdn", "sass/960/_grid.sass", "sass/960/_text.sass", "templates/project/config.rb", "templates/project/grid.sass", "templates/project/text.sass", "VERSION", "Manifest", "compass-960-plugin.gemspec"]
|
12
|
+
s.homepage = %q{http://github.com/chriseppstein/compass-960-plugin}
|
13
|
+
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Compass-960-plugin", "--main", "README.mkdn"]
|
14
|
+
s.require_paths = ["lib"]
|
15
|
+
s.rubyforge_project = %q{compass-960-plugin}
|
16
|
+
s.rubygems_version = %q{1.2.0}
|
17
|
+
s.summary = %q{Compass compatible Sass port of 960.gs.}
|
18
|
+
|
19
|
+
if s.respond_to? :specification_version then
|
20
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
21
|
+
s.specification_version = 2
|
22
|
+
|
23
|
+
if current_version >= 3 then
|
24
|
+
s.add_runtime_dependency(%q<chriseppstein-compass>, [">= 0"])
|
25
|
+
s.add_development_dependency(%q<echoe>, [">= 0"])
|
26
|
+
else
|
27
|
+
s.add_dependency(%q<chriseppstein-compass>, [">= 0"])
|
28
|
+
s.add_dependency(%q<echoe>, [">= 0"])
|
29
|
+
end
|
30
|
+
else
|
31
|
+
s.add_dependency(%q<chriseppstein-compass>, [">= 0"])
|
32
|
+
s.add_dependency(%q<echoe>, [">= 0"])
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,5 @@
|
|
1
|
+
options = Hash.new
|
2
|
+
options[:stylesheets_directory] = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'sass'))
|
3
|
+
options[:templates_directory] = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'templates'))
|
4
|
+
|
5
|
+
Compass::Frameworks.register('960', options)
|
data/lib/ninesixty.rb
ADDED
data/sass/960/_grid.sass
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
!ninesixty_gutter_width ||= 20px
|
2
|
+
|
3
|
+
=grid-container
|
4
|
+
:margin-left auto
|
5
|
+
:margin-right auto
|
6
|
+
:width 960px
|
7
|
+
|
8
|
+
=grid-width(!n, !cols, !gutter_width = !ninesixty_gutter_width)
|
9
|
+
:width= (960px / !cols) * !n - !gutter_width
|
10
|
+
|
11
|
+
=grid-unit-base(!gutter_width = !ninesixty_gutter_width)
|
12
|
+
:display inline
|
13
|
+
:float left
|
14
|
+
:margin
|
15
|
+
:left= !gutter_width / 2
|
16
|
+
:right= !gutter_width / 2
|
17
|
+
|
18
|
+
=grid(!n, !cols, !gutter_width = !ninesixty_gutter_width)
|
19
|
+
+grid-unit-base(!gutter_width)
|
20
|
+
+grid-width(!n, !cols, !gutter_width)
|
21
|
+
|
22
|
+
=alpha
|
23
|
+
:margin-left 0
|
24
|
+
|
25
|
+
=omega
|
26
|
+
:margin-right 0
|
27
|
+
|
28
|
+
=grids(!cols, !gutter_width = !ninesixty_gutter_width)
|
29
|
+
#{enumerate(".grid_",1,!cols)}
|
30
|
+
+grid-unit-base
|
31
|
+
@for !n from 1 through !cols
|
32
|
+
.grid_#{!n}
|
33
|
+
+grid-width(!n, !cols, !gutter_width)
|
34
|
+
|
35
|
+
=grid-prefix(!n, !cols)
|
36
|
+
:padding-left= (960px / !cols) * !n
|
37
|
+
|
38
|
+
=grid-prefixes(!cols)
|
39
|
+
@for !n from 1 through !cols - 1
|
40
|
+
.prefix_#{!n}
|
41
|
+
+grid-prefix(!n, !cols)
|
42
|
+
|
43
|
+
=grid-suffix(!n, !cols)
|
44
|
+
:padding-right= (960px / !cols) * !n
|
45
|
+
|
46
|
+
=grid-suffixes(!cols)
|
47
|
+
@for !n from 1 through !cols - 1
|
48
|
+
.suffix_#{!n}
|
49
|
+
+grid-suffix(!n, !cols)
|
50
|
+
|
51
|
+
=grid-children
|
52
|
+
.alpha
|
53
|
+
+alpha
|
54
|
+
.omega
|
55
|
+
+omega
|
56
|
+
|
57
|
+
=grid-system(!cols)
|
58
|
+
+grid-container
|
59
|
+
+grids(!cols)
|
60
|
+
+grid-prefixes(!cols)
|
61
|
+
+grid-suffixes(!cols)
|
data/sass/960/_text.sass
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
!ninesixty_font_family ||= "Helvetica, Arial, 'Liberation Sans', FreeSans, sans-serif"
|
2
|
+
|
3
|
+
=text(!font_family = !ninesixty_font_family)
|
4
|
+
body
|
5
|
+
:font= 13px/1.5 !ninesixty_font_family
|
6
|
+
|
7
|
+
a:focus
|
8
|
+
:outline 1px dotted invert
|
9
|
+
|
10
|
+
hr
|
11
|
+
:border-color #ccc
|
12
|
+
:border-style solid
|
13
|
+
:border-width 1px 0 0
|
14
|
+
:clear both
|
15
|
+
:height 0
|
16
|
+
|
17
|
+
h1
|
18
|
+
:font-size 25px
|
19
|
+
|
20
|
+
h2
|
21
|
+
:font-size 23px
|
22
|
+
|
23
|
+
h3
|
24
|
+
:font-size 21px
|
25
|
+
|
26
|
+
h4
|
27
|
+
:font-size 19px
|
28
|
+
|
29
|
+
h5
|
30
|
+
:font-size 17px
|
31
|
+
|
32
|
+
h6
|
33
|
+
:font-size 15px
|
34
|
+
|
35
|
+
ol
|
36
|
+
:list-style decimal
|
37
|
+
|
38
|
+
ul
|
39
|
+
:list-style square
|
40
|
+
|
41
|
+
li
|
42
|
+
:margin-left 30px
|
43
|
+
|
44
|
+
p,
|
45
|
+
dl,
|
46
|
+
hr,
|
47
|
+
h1,
|
48
|
+
h2,
|
49
|
+
h3,
|
50
|
+
h4,
|
51
|
+
h5,
|
52
|
+
h6,
|
53
|
+
ol,
|
54
|
+
ul,
|
55
|
+
pre,
|
56
|
+
table,
|
57
|
+
address,
|
58
|
+
fieldset
|
59
|
+
:margin-bottom 20px
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'ninesixty'
|
@@ -0,0 +1,16 @@
|
|
1
|
+
/*
|
2
|
+
960 Grid System ~ Core CSS.
|
3
|
+
Learn more ~ http://960.gs/
|
4
|
+
|
5
|
+
Licensed under GPL and MIT.
|
6
|
+
|
7
|
+
@import compass/utilities/general/reset.sass
|
8
|
+
@import 960/grid.sass
|
9
|
+
|
10
|
+
+global-reset
|
11
|
+
|
12
|
+
.container_12
|
13
|
+
+grid-system(12)
|
14
|
+
|
15
|
+
.container_16
|
16
|
+
+grid-system(16)
|
metadata
ADDED
@@ -0,0 +1,90 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: chriseppstein-compass-960-plugin
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.9.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Chris Eppstein
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-01-24 00:00:00 -08:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: chriseppstein-compass
|
17
|
+
version_requirement:
|
18
|
+
version_requirements: !ruby/object:Gem::Requirement
|
19
|
+
requirements:
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: "0"
|
23
|
+
version:
|
24
|
+
- !ruby/object:Gem::Dependency
|
25
|
+
name: echoe
|
26
|
+
version_requirement:
|
27
|
+
version_requirements: !ruby/object:Gem::Requirement
|
28
|
+
requirements:
|
29
|
+
- - ">="
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
version: "0"
|
32
|
+
version:
|
33
|
+
description: The 960 Grid System is an effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. http://960.gs/
|
34
|
+
email: chris@eppsteins.net
|
35
|
+
executables: []
|
36
|
+
|
37
|
+
extensions: []
|
38
|
+
|
39
|
+
extra_rdoc_files:
|
40
|
+
- lib/ninesixty/compass_plugin.rb
|
41
|
+
- lib/ninesixty/sass_extensions.rb
|
42
|
+
- lib/ninesixty.rb
|
43
|
+
- README.mkdn
|
44
|
+
files:
|
45
|
+
- lib/ninesixty/compass_plugin.rb
|
46
|
+
- lib/ninesixty/sass_extensions.rb
|
47
|
+
- lib/ninesixty.rb
|
48
|
+
- Rakefile
|
49
|
+
- README.mkdn
|
50
|
+
- sass/960/_grid.sass
|
51
|
+
- sass/960/_text.sass
|
52
|
+
- templates/project/config.rb
|
53
|
+
- templates/project/grid.sass
|
54
|
+
- templates/project/text.sass
|
55
|
+
- VERSION
|
56
|
+
- Manifest
|
57
|
+
- compass-960-plugin.gemspec
|
58
|
+
has_rdoc: false
|
59
|
+
homepage: http://github.com/chriseppstein/compass-960-plugin
|
60
|
+
post_install_message:
|
61
|
+
rdoc_options:
|
62
|
+
- --line-numbers
|
63
|
+
- --inline-source
|
64
|
+
- --title
|
65
|
+
- Compass-960-plugin
|
66
|
+
- --main
|
67
|
+
- README.mkdn
|
68
|
+
require_paths:
|
69
|
+
- lib
|
70
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: "0"
|
75
|
+
version:
|
76
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: "1.2"
|
81
|
+
version:
|
82
|
+
requirements: []
|
83
|
+
|
84
|
+
rubyforge_project: compass-960-plugin
|
85
|
+
rubygems_version: 1.2.0
|
86
|
+
signing_key:
|
87
|
+
specification_version: 2
|
88
|
+
summary: Compass compatible Sass port of 960.gs.
|
89
|
+
test_files: []
|
90
|
+
|