compass-adaptive-grid-plugin 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.mkdn ADDED
@@ -0,0 +1,4 @@
1
+ 960 (Adaptive) Grid System - Compass Plugin
2
+ ===========================================
3
+
4
+ An adaptive Compass plugin based on the 960.gs grid system, heavily inspired by and ported from Matt Sanders' [compass-960-plugin](http://raw.github.com/nextmat/compass-960-plugin).
@@ -0,0 +1,29 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{compass-adaptive-grid-plugin}
5
+ s.version = "0.1.0"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 1.3.5")
8
+ s.authors = ["Garrett Murphey"]
9
+ s.date = %q{2012-08-21}
10
+ s.description = %q{The Compass Adaptive Grid plugin aims to make it easier to quickly build and deploy fluid layouts with Sass.}
11
+ s.email = %w{gmurphey@gmurphey.com}
12
+ s.has_rdoc = false
13
+ s.files = [
14
+ "compass-adaptive-grid-plugin.gemspec",
15
+ "README.mkdn",
16
+ "lib/adaptive-grid.rb",
17
+ "stylesheets/adaptive-grid/_grid.scss",
18
+ "stylesheets/adaptive-grid/_text.scss",
19
+ "templates/project/grid.scss",
20
+ "templates/project/manifest.rb",
21
+ "templates/project/text.scss"
22
+ ]
23
+ s.homepage = %q{https://github.com/gmurphey/compass-adaptive-grid-plugin}
24
+ s.require_paths = ["lib"]
25
+ s.rubyforge_project = %q{compass-adaptive-grid-plugin}
26
+ s.rubygems_version = %q{1.3.6}
27
+ s.summary = %q{Compass compatible Sass adaptive grid system.}
28
+ s.add_dependency(%q<compass>, [">= 0.10.0"])
29
+ end
@@ -0,0 +1,3 @@
1
+ require 'compass'
2
+
3
+ Compass::Frameworks.register("adaptive-grid", :path => "#{File.dirname(__FILE__)}/..")
@@ -0,0 +1,141 @@
1
+ $adaptive-grid-gutter-width: 20px !default;
2
+ $adaptive-grid-max-width: 960px !default;
3
+ $adaptive-grid-columns: 12 !default;
4
+ $adaptive-grid-class-separator: "-" !default;
5
+
6
+ @import "compass/css3/box-sizing";
7
+
8
+ @mixin grid-container($max-width: $adaptive-grid-max-width) {
9
+ margin-left: auto;
10
+ margin-right: auto;
11
+ max-width: $max-width;
12
+ width: 100%;
13
+ }
14
+
15
+ @mixin grid-width($n, $cols: $adaptive-grid-columns) {
16
+ width: percentage((1 / $cols) * $n);
17
+ }
18
+
19
+ @mixin grid-unit-base($gutter-width: $adaptive-grid-gutter-width) {
20
+ @include box-sizing(border-box);
21
+
22
+ display: inline;
23
+ float: left;
24
+ padding: {
25
+ left: $gutter-width / 2;
26
+ right: $gutter-width / 2;
27
+ }
28
+ }
29
+
30
+ @mixin grid($n, $cols: $adaptive-grid-columns, $gutter-width: $adaptive-grid-gutter-width) {
31
+ @include grid-unit-base($gutter-width);
32
+ @include grid-width($n, $cols);
33
+ }
34
+
35
+ @mixin alpha {
36
+ padding-left: 0;
37
+ }
38
+
39
+ @mixin omega {
40
+ padding-right: 0;
41
+ }
42
+
43
+ @mixin grids($cols: $adaptive-grid-columns, $gutter-width: $adaptive-grid-gutter-width) {
44
+ #{enumerate(".grid", 1, $cols, $adaptive-grid-class-separator)} {
45
+ @include grid-unit-base($gutter-width);
46
+ }
47
+
48
+ @for $n from 1 through $cols {
49
+ .grid#{$adaptive-grid-class-separator}#{$n} {
50
+ @include grid-width($n, $cols);
51
+ }
52
+ }
53
+ }
54
+
55
+ @mixin grid-prefix($n, $cols: $adaptive-grid-columns) {
56
+ padding-left: percentage((1 / $cols) * $n);
57
+ }
58
+
59
+ @mixin grid-prefixes($cols: $adaptive-grid-columns) {
60
+ @for $n from 1 through $cols - 1 {
61
+ .prefix#{$adaptive-grid-class-separator}#{$n} {
62
+ @include grid-prefix($n, $cols);
63
+ }
64
+ }
65
+ }
66
+
67
+ @mixin grid-suffix($n, $cols: $adaptive-grid-columns) {
68
+ padding-right: percentage((1 / $cols) * $n);
69
+ }
70
+
71
+ @mixin grid-suffixes($cols: $adaptive-grid-columns) {
72
+ @for $n from 1 through $cols - 1 {
73
+ .suffix#{$adaptive-grid-class-separator}#{$n} {
74
+ @include grid-suffix($n, $cols);
75
+ }
76
+ }
77
+ }
78
+
79
+ @mixin grid-children {
80
+ .alpha {
81
+ @include alpha;
82
+ }
83
+
84
+ .omega {
85
+ @include omega;
86
+ }
87
+ }
88
+
89
+ @mixin grid-move-base {
90
+ position: relative;
91
+ }
92
+
93
+ @mixin grid-move-push($n, $cols) {
94
+ left: (1 / $cols) * $n;
95
+ }
96
+
97
+ @mixin grid-move-pull($n, $cols) {
98
+ left: -(1 / $cols) * $n;
99
+ }
100
+
101
+ @mixin grid-push($n, $cols: $adaptive-grid-columns) {
102
+ @include grid-move-base;
103
+ @include grid-move-push($n, $cols);
104
+ }
105
+
106
+ @mixin grid-pull($n, $cols: $adaptive-grid-columns) {
107
+ @include grid-move-base;
108
+ @include grid-move-pull($n, $cols);
109
+ }
110
+
111
+ @mixin grid-movements($cols: $adaptive-grid-columns) {
112
+ #{enumerate(".push", 1, $cols - 1, $adaptive-grid-class-separator)},
113
+ #{enumerate(".pull", 1, $cols - 1, $adaptive-grid-class-separator)} {
114
+ @include grid-move-base;
115
+ }
116
+
117
+ @for $n from 1 through $cols - 1 {
118
+ .push#{$adaptive-grid-class-separator}#{$n} {
119
+ @include grid-move-push($n, $cols);
120
+ }
121
+
122
+ .pull#{$adaptive-grid-class-separator}#{$n} {
123
+ @include grid-move-pull($n, $cols);
124
+ }
125
+ }
126
+ }
127
+
128
+ @mixin grid-system($cols: $adaptive-grid-columns) {
129
+ @include grid-container;
130
+ @include grids($cols);
131
+ @include grid-prefixes($cols);
132
+ @include grid-suffixes($cols);
133
+ @include grid-children;
134
+ @include grid-movements($cols);
135
+ }
136
+
137
+ @mixin grid-system-complete($cols: $adaptive-grid-columns) {
138
+ .container#{$adaptive-grid-class-separator}#{$cols} {
139
+ @include grid-system($cols);
140
+ }
141
+ }
@@ -0,0 +1,73 @@
1
+ $ninesixty-font-family: unquote("Helvetica, Arial, 'Liberation Sans', FreeSans, sans-serif") !default;
2
+
3
+ @mixin text($font-family: $ninesixty-font-family) {
4
+ body {
5
+ font: unquote("13px/1.5") $font-family;
6
+ }
7
+
8
+ a:focus {
9
+ outline: 1px dotted invert;
10
+ }
11
+
12
+ hr {
13
+ border-color: #cccccc;
14
+ border-style: solid;
15
+ border-width: 1px 0 0;
16
+ clear: both;
17
+ height: 0;
18
+ }
19
+
20
+ h1 {
21
+ font-size: 25px;
22
+ }
23
+
24
+ h2 {
25
+ font-size: 23px;
26
+ }
27
+
28
+ h3 {
29
+ font-size: 21px;
30
+ }
31
+
32
+ h4 {
33
+ font-size: 19px;
34
+ }
35
+
36
+ h5 {
37
+ font-size: 17px;
38
+ }
39
+
40
+ h6 {
41
+ font-size: 15px;
42
+ }
43
+
44
+ ol {
45
+ list-style: decimal;
46
+ }
47
+
48
+ ul {
49
+ list-style: square;
50
+ }
51
+
52
+ li {
53
+ margin-left: 30px;
54
+ }
55
+
56
+ p,
57
+ dl,
58
+ hr,
59
+ h1,
60
+ h2,
61
+ h3,
62
+ h4,
63
+ h5,
64
+ h6,
65
+ ol,
66
+ ul,
67
+ pre,
68
+ table,
69
+ address,
70
+ fieldset {
71
+ margin-bottom: 20px;
72
+ }
73
+ }
@@ -0,0 +1,37 @@
1
+ /* 960 Grid System ~ Core CSS.
2
+ * Learn more ~ http://960.gs/
3
+ * *
4
+ * Licensed under GPL and MIT.
5
+ */
6
+
7
+ @import "compass/reset";
8
+ @import "adaptive-grid/grid";
9
+
10
+ // The following generates the default grids provided by the css version of 960.gs
11
+ .container_12 {
12
+ @include grid-system(12);
13
+ }
14
+
15
+ .container_16 {
16
+ @include grid-system(16);
17
+ }
18
+
19
+ // But most compass users prefer to construct semantic layouts like so (two column layout with header and footer):
20
+
21
+ $ninesixty-columns: 24;
22
+
23
+ .two-column {
24
+ @include grid-container;
25
+
26
+ #header, #footer {
27
+ @include grid(24);
28
+ }
29
+
30
+ #sidebar {
31
+ @include grid(8);
32
+ }
33
+
34
+ #main-content {
35
+ @include grid(16);
36
+ }
37
+ }
@@ -0,0 +1,17 @@
1
+ stylesheet 'grid.scss', :media => "screen, projection"
2
+ stylesheet 'text.scss', :media => "screen, projection"
3
+
4
+ description "The 960 Grid System."
5
+
6
+ help %Q{
7
+ Please see the 960 website for documentation:
8
+
9
+ http://960.gs/
10
+ }
11
+
12
+ welcome_message %Q{
13
+ Please see the 960 website for documentation:
14
+
15
+ http://960.gs/
16
+ }
17
+
@@ -0,0 +1,9 @@
1
+ /* 960 Grid System ~ Text CSS.
2
+ * Learn more ~ http://960.gs/
3
+ * *
4
+ * Licensed under GPL and MIT.
5
+ */
6
+
7
+ @import "adaptive-grid/text";
8
+
9
+ @include text;
metadata ADDED
@@ -0,0 +1,70 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: compass-adaptive-grid-plugin
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Garrett Murphey
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-08-21 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: compass
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 0.10.0
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: 0.10.0
30
+ description: The Compass Adaptive Grid plugin aims to make it easier to quickly build
31
+ and deploy fluid layouts with Sass.
32
+ email:
33
+ - gmurphey@gmurphey.com
34
+ executables: []
35
+ extensions: []
36
+ extra_rdoc_files: []
37
+ files:
38
+ - compass-adaptive-grid-plugin.gemspec
39
+ - README.mkdn
40
+ - lib/adaptive-grid.rb
41
+ - stylesheets/adaptive-grid/_grid.scss
42
+ - stylesheets/adaptive-grid/_text.scss
43
+ - templates/project/grid.scss
44
+ - templates/project/manifest.rb
45
+ - templates/project/text.scss
46
+ homepage: https://github.com/gmurphey/compass-adaptive-grid-plugin
47
+ licenses: []
48
+ post_install_message:
49
+ rdoc_options: []
50
+ require_paths:
51
+ - lib
52
+ required_ruby_version: !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ! '>='
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
+ none: false
60
+ requirements:
61
+ - - ! '>='
62
+ - !ruby/object:Gem::Version
63
+ version: 1.3.5
64
+ requirements: []
65
+ rubyforge_project: compass-adaptive-grid-plugin
66
+ rubygems_version: 1.8.24
67
+ signing_key:
68
+ specification_version: 3
69
+ summary: Compass compatible Sass adaptive grid system.
70
+ test_files: []