gabrielmansour-compass-960-plugin 0.9.6

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.
data/Manifest ADDED
@@ -0,0 +1,12 @@
1
+ lib/ninesixty/compass_plugin.rb
2
+ lib/ninesixty/sass_extensions.rb
3
+ lib/ninesixty.rb
4
+ Manifest
5
+ Rakefile
6
+ README.mkdn
7
+ sass/960/_grid.sass
8
+ sass/960/_text.sass
9
+ templates/project/grid.sass
10
+ templates/project/manifest.rb
11
+ templates/project/text.sass
12
+ VERSION
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 `+grid-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
+ +grid-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.6
@@ -0,0 +1,36 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{compass-960-plugin}
5
+ s.version = "0.9.6"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Chris Eppstein"]
9
+ s.date = %q{2009-06-03}
10
+ 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/}
11
+ s.email = %q{chris@eppsteins.net}
12
+ s.extra_rdoc_files = ["lib/ninesixty/compass_plugin.rb", "lib/ninesixty/sass_extensions.rb", "lib/ninesixty.rb", "README.mkdn"]
13
+ s.files = ["lib/ninesixty/compass_plugin.rb", "lib/ninesixty/sass_extensions.rb", "lib/ninesixty.rb", "Manifest", "Rakefile", "README.mkdn", "sass/960/_grid.sass", "sass/960/_text.sass", "templates/project/grid.sass", "templates/project/manifest.rb", "templates/project/text.sass", "VERSION", "compass-960-plugin.gemspec"]
14
+ s.homepage = %q{http://github.com/chriseppstein/compass-960-plugin}
15
+ s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Compass-960-plugin", "--main", "README.mkdn"]
16
+ s.require_paths = ["lib"]
17
+ s.rubyforge_project = %q{compass-960-plugin}
18
+ s.rubygems_version = %q{1.3.3}
19
+ s.summary = %q{Compass compatible Sass port of 960.gs.}
20
+
21
+ if s.respond_to? :specification_version then
22
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
23
+ s.specification_version = 3
24
+
25
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
26
+ s.add_runtime_dependency(%q<chriseppstein-compass>, [">= 0"])
27
+ s.add_development_dependency(%q<echoe>, [">= 0"])
28
+ else
29
+ s.add_dependency(%q<chriseppstein-compass>, [">= 0"])
30
+ s.add_dependency(%q<echoe>, [">= 0"])
31
+ end
32
+ else
33
+ s.add_dependency(%q<chriseppstein-compass>, [">= 0"])
34
+ s.add_dependency(%q<echoe>, [">= 0"])
35
+ end
36
+ 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)
@@ -0,0 +1,7 @@
1
+ require 'sass'
2
+
3
+ module Sass::Script::Functions
4
+ def enumerate(prefix, from_index, to_index)
5
+ Sass::Script::String.new(((from_index.value)..(to_index.value)).map{|i| "#{prefix}#{i}"}.join(", "))
6
+ end
7
+ end
data/lib/ninesixty.rb ADDED
@@ -0,0 +1,2 @@
1
+ require File.join(File.dirname(__FILE__), 'ninesixty', 'compass_plugin')
2
+ require File.join(File.dirname(__FILE__), 'ninesixty', 'sass_extensions')
@@ -0,0 +1,68 @@
1
+ !ninesixty_gutter_width ||= 20px
2
+ !ninesixty_grid_width ||= 960px
3
+ // defaults:
4
+ !ninesixty_columns ||= 12
5
+ !ninesixty_column_width ||= (!ninesixty_grid_width / !ninesixty_columns) - !ninesixty_gutter_width
6
+
7
+ =grid-container
8
+ :margin-left auto
9
+ :margin-right auto
10
+ :width= !ninesixty_grid_width
11
+
12
+ =grid-width(!n, !cols = !ninesixty_columns, !gutter_width = !ninesixty_gutter_width)
13
+ :width= (!ninesixty_grid_width / !cols) * !n - !gutter_width
14
+
15
+ =grid-unit-base(!gutter_width = !ninesixty_gutter_width)
16
+ :display inline
17
+ :float left
18
+ :margin
19
+ :left= !gutter_width / 2
20
+ :right= !gutter_width / 2
21
+
22
+ =grid(!n, !cols = !ninesixty_columns, !gutter_width = !ninesixty_gutter_width)
23
+ +grid-unit-base(!gutter_width)
24
+ +grid-width(!n, !cols, !gutter_width)
25
+
26
+ =alpha
27
+ :margin-left 0
28
+
29
+ =omega
30
+ :margin-right 0
31
+
32
+ =grids(!cols = !ninesixty_columns, !gutter_width = !ninesixty_gutter_width)
33
+ #{enumerate(".grid_",1,!cols)}
34
+ +grid-unit-base
35
+ @for !n from 1 through !cols
36
+ .grid_#{!n}
37
+ +grid-width(!n, !cols, !gutter_width)
38
+
39
+ =grid-prefix(!n, !cols = !ninesixty_columns)
40
+ :padding-left= (!ninesixty_grid_width / !cols) * !n
41
+
42
+ =grid-prefixes(!cols = !ninesixty_columns)
43
+ @for !n from 1 through !cols - 1
44
+ .prefix_#{!n}
45
+ +grid-prefix(!n, !cols = !ninesixty_columns)
46
+
47
+ =grid-suffix(!n, !cols = !ninesixty_columns)
48
+ :padding-right= (!ninesixty_grid_width / !cols) * !n
49
+
50
+ =grid-suffixes(!cols = !ninesixty_columns)
51
+ @for !n from 1 through !cols - 1
52
+ .suffix_#{!n}
53
+ +grid-suffix(!n, !cols)
54
+
55
+ =grid-children
56
+ .alpha
57
+ +alpha
58
+ .omega
59
+ +omega
60
+
61
+ =grid-system(!cols = !ninesixty_columns)
62
+ +grid-container
63
+ +grids(!cols)
64
+ +grid-prefixes(!cols)
65
+ +grid-suffixes(!cols)
66
+ // redefine variables, keep !ninesixty_column_width synched:
67
+ !ninesixty_columns = !cols
68
+ !ninesixty_column_width = (!ninesixty_grid_width / !ninesixty_columns) - !ninesixty_gutter_width
@@ -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,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)
@@ -0,0 +1,2 @@
1
+ stylesheet 'grid.sass', :media => "screen, projection"
2
+ stylesheet 'text.sass', :media => "screen, projection"
@@ -0,0 +1,10 @@
1
+ /*
2
+ 960 Grid System ~ Text CSS.
3
+ Learn more ~ http://960.gs/
4
+
5
+ Licensed under GPL and MIT.
6
+
7
+
8
+ @import 960/text.sass
9
+
10
+ +text
metadata ADDED
@@ -0,0 +1,93 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gabrielmansour-compass-960-plugin
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.9.6
5
+ platform: ruby
6
+ authors:
7
+ - Chris Eppstein
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-06-03 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: chriseppstein-compass
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: "0"
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: echoe
27
+ type: :development
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: "0"
34
+ version:
35
+ 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/
36
+ email: chris@eppsteins.net
37
+ executables: []
38
+
39
+ extensions: []
40
+
41
+ extra_rdoc_files:
42
+ - lib/ninesixty/compass_plugin.rb
43
+ - lib/ninesixty/sass_extensions.rb
44
+ - lib/ninesixty.rb
45
+ - README.mkdn
46
+ files:
47
+ - lib/ninesixty/compass_plugin.rb
48
+ - lib/ninesixty/sass_extensions.rb
49
+ - lib/ninesixty.rb
50
+ - Manifest
51
+ - Rakefile
52
+ - README.mkdn
53
+ - sass/960/_grid.sass
54
+ - sass/960/_text.sass
55
+ - templates/project/grid.sass
56
+ - templates/project/manifest.rb
57
+ - templates/project/text.sass
58
+ - VERSION
59
+ - compass-960-plugin.gemspec
60
+ has_rdoc: false
61
+ homepage: http://github.com/chriseppstein/compass-960-plugin
62
+ licenses:
63
+ post_install_message:
64
+ rdoc_options:
65
+ - --line-numbers
66
+ - --inline-source
67
+ - --title
68
+ - Compass-960-plugin
69
+ - --main
70
+ - README.mkdn
71
+ require_paths:
72
+ - lib
73
+ required_ruby_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: "0"
78
+ version:
79
+ required_rubygems_version: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: "1.2"
84
+ version:
85
+ requirements: []
86
+
87
+ rubyforge_project: compass-960-plugin
88
+ rubygems_version: 1.3.5
89
+ signing_key:
90
+ specification_version: 3
91
+ summary: Compass compatible Sass port of 960.gs.
92
+ test_files: []
93
+