zen-grids 2.0.0.beta.3 → 2.0.0.beta.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8583a6425123fc8672fa50a06b101ed73999eaa6
4
- data.tar.gz: bb2addbe8d5e1faa50a630f50f373e2b96c423d6
3
+ metadata.gz: 640e160d3d90ce3d3a930b5740266c31d022cbd0
4
+ data.tar.gz: cf59ab172bb8f008b606da496e1f02e6d31a0093
5
5
  SHA512:
6
- metadata.gz: a587bf7b7969ef1b6e7eaf9414efc3450ac58a95a0ff7c08c61c3f3bfc246ab3647eb773cc88f34dc7074f8d1f9e565d4b7b8f37d3882a190df11e4a81e020db
7
- data.tar.gz: 84832d4948dfcc4799cd6e810d99c076efc98f194d0ab7b7ad0799cf9620ab17af565011d82ce619761b32f29ec7a1648c4b307f2ea09cd95452a0cb6becdfe0
6
+ metadata.gz: 45d2429e4d3cda23119af1b68449a56d0ed2e0184b75e70380945fbd49a6502e7ed5b21389aee9bfe69b9c7b63c34526762d98427d3679a16b30af70934e6346
7
+ data.tar.gz: 874e8c1b4eb80ed77f8ea8cfb9a001b0d38eb1f512ea05a88ca24a8319cb8a4049ea4c15adeae811804331d5c5224a59aeb17a9073c9c50d981f3d855db7a04a
data/README.md CHANGED
@@ -50,7 +50,7 @@ Zen Grids has built-in support for the Box-sizing Polyfill which adds `box-sizin
50
50
  Zen grids is distributed as a Ruby Gem. On your computer, simply run:
51
51
 
52
52
  ```sh
53
- sudo gem install zen-grids
53
+ gem install zen-grids
54
54
  ```
55
55
 
56
56
  If you are using Compass (and you should!) then you can add it to an existing project by editing the project's configuration file, config.rb, and adding this line:
@@ -1,12 +1,10 @@
1
1
  require 'compass'
2
2
 
3
3
  project_path = File.join(File.dirname(__FILE__), '..')
4
- stylesheets_path = File.join(project_path, 'stylesheets')
5
- templates_path = File.join(project_path, 'templates')
4
+ stylesheets_path = File.join(project_path, 'sass')
6
5
 
7
6
  Compass::Frameworks.register(
8
7
  'zen-grids',
9
8
  :path => project_path,
10
- :stylesheets_directory => stylesheets_path,
11
- :templates_directory => templates_path
9
+ :stylesheets_directory => stylesheets_path
12
10
  )
@@ -0,0 +1,6 @@
1
+ // Import the partials for Zen Grids.
2
+
3
+ @import "zen-grids/grids";
4
+ @import "zen-grids/flow";
5
+ @import "zen-grids/layout";
6
+ @import "zen-grids/undo";
@@ -0,0 +1,361 @@
1
+ // Layout module
2
+ //
3
+ // The "Layout" module for the Zen Grids system.
4
+ //
5
+ // When building a grid system for your site, properties (like number of columns or gutter size) will need different values at different viewport widths. In previous versions of Zen Grids, this meant changing the Zen Grids' global variables each time you wanted to build a layout at a different viewport size. With the layout module, you can instead set grid system properties that override your default global variables within the scope of the layout mixin.
6
+ //
7
+ // For example:
8
+ // ```
9
+ // $zen-columns: 1; // Default to one column for mobile layout.
10
+ // @include zen-layout($columns: 3) {
11
+ // // $zen-columns is set to 3 inside this block and can be used to build a
12
+ // // layout for the following breakpoint.
13
+ // @media screen and (min-width: 777px) {
14
+ // .sidebar {
15
+ // // The sidebar will span the first column of the 3 columns defined.
16
+ // @include zen-grid-item(1, 1);
17
+ // }
18
+ // }
19
+ // }
20
+ // // $zen-columns is back to 1 after the zen-layout() block.
21
+ // ```
22
+ //
23
+ // Style guide: layout
24
+
25
+ @import "./grids";
26
+
27
+ // zen-layout(...)
28
+ //
29
+ // Should be used to add a wrapping block where its parameters will override the
30
+ // corresponding global `$zen-` variables within it.
31
+ //
32
+ // $layout - Specify the name of the layout from $zen-columns to use.
33
+ // $columns - Defaults to $zen-columns.
34
+ // $gutters - Defaults to $zen-gutters
35
+ // $gutter-method - Defaults to $zen-gutter-method
36
+ // $grid-width - Defaults to $zen-grid-width
37
+ // $box-sizing - Defaults to $zen-box-sizing
38
+ // $direction - Defaults to $zen-direction
39
+ // $switch-direction - Defaults to $zen-switch-direction
40
+ // $auto-include-grid-item-base - Defaults to $zen-auto-include-grid-item-base
41
+ // $auto-include-flow-item-base - Defaults to $zen-auto-include-flow-item-base
42
+ // $grid-color - Defaults to $zen-grid-color
43
+ // $grid-numbers - Defaults to $zen-grid-numbers
44
+ //
45
+ // Style guide: layout.zen-layout
46
+ @mixin zen-layout(
47
+ $layout : null,
48
+ $columns : null,
49
+ $gutters : null,
50
+ $gutter-method : null,
51
+ $grid-width : null,
52
+ $box-sizing : null,
53
+ $direction : null,
54
+ $switch-direction : null,
55
+ $auto-include-grid-item-base : null,
56
+ $auto-include-flow-item-base : null,
57
+ $grid-color : null,
58
+ $grid-numbers : null
59
+ ) {
60
+
61
+ // Save the previous versions of Zen's global variables.
62
+ $global-vars : (
63
+ 'columns' : $zen-columns,
64
+ 'gutters' : $zen-gutters,
65
+ 'gutter-method' : $zen-gutter-method,
66
+ 'grid-width' : $zen-grid-width,
67
+ 'box-sizing' : $zen-box-sizing,
68
+ 'direction' : $zen-direction,
69
+ 'switch-direction' : $zen-switch-direction,
70
+ 'auto-include-grid-item-base' : $zen-auto-include-grid-item-base,
71
+ 'auto-include-flow-item-base' : $zen-auto-include-flow-item-base,
72
+ 'grid-color' : $zen-grid-color,
73
+ 'grid-numbers' : $zen-grid-numbers
74
+ );
75
+
76
+ // Grab a layout from $zen-layouts while defaulting to the global values.
77
+ $local-defaults: $global-vars;
78
+ @if type-of($layout) != 'null' and map-has-key($zen-layouts, $layout) {
79
+ $local-defaults: map-merge($local-defaults, map-get($zen-layouts, $layout));
80
+ }
81
+
82
+ // Ensure our local parameters all have a value.
83
+ @if type-of($columns) == 'null' {
84
+ $columns: map-get($local-defaults, 'columns');
85
+ }
86
+ @if type-of($gutters) == 'null' {
87
+ $gutters: map-get($local-defaults, 'gutters');
88
+ }
89
+ @if type-of($gutter-method) == 'null' {
90
+ $gutter-method: map-get($local-defaults, 'gutter-method');
91
+ }
92
+ @if type-of($grid-width) == 'null' {
93
+ $grid-width: map-get($local-defaults, 'grid-width');
94
+ }
95
+ @if type-of($box-sizing) == 'null' {
96
+ $box-sizing: map-get($local-defaults, 'box-sizing');
97
+ }
98
+ @if type-of($direction) == 'null' {
99
+ $direction: map-get($local-defaults, 'direction');
100
+ }
101
+ @if type-of($switch-direction) == 'null' {
102
+ $switch-direction: map-get($local-defaults, 'switch-direction');
103
+ }
104
+ @if type-of($auto-include-grid-item-base) == 'null' {
105
+ $auto-include-grid-item-base: map-get($local-defaults, 'auto-include-grid-item-base');
106
+ }
107
+ @if type-of($auto-include-flow-item-base) == 'null' {
108
+ $auto-include-flow-item-base: map-get($local-defaults, 'auto-include-flow-item-base');
109
+ }
110
+ @if type-of($grid-color) == 'null' {
111
+ $grid-color: map-get($local-defaults, 'grid-color');
112
+ }
113
+ @if type-of($grid-numbers) == 'null' {
114
+ $grid-numbers: map-get($local-defaults, 'grid-numbers');
115
+ }
116
+
117
+ // Temporarily override Zen's global variables.
118
+ $zen-columns : $columns !global;
119
+ $zen-gutters : $gutters !global;
120
+ $zen-gutter-method : $gutter-method !global;
121
+ $zen-grid-width : $grid-width !global;
122
+ $zen-box-sizing : $box-sizing !global;
123
+ $zen-direction : $direction !global;
124
+ $zen-switch-direction : $switch-direction !global;
125
+ $zen-auto-include-grid-item-base : $auto-include-grid-item-base !global;
126
+ $zen-auto-include-flow-item-base : $auto-include-flow-item-base !global;
127
+ $zen-grid-color : $grid-color !global;
128
+ $zen-grid-numbers : $grid-numbers !global;
129
+
130
+ // Generate the content in the new global context.
131
+ @content;
132
+
133
+ // Restore Zen's global variables.
134
+ $zen-columns : map-get($global-vars, 'columns') !global;
135
+ $zen-gutters : map-get($global-vars, 'gutters') !global;
136
+ $zen-gutter-method : map-get($global-vars, 'gutter-method') !global;
137
+ $zen-grid-width : map-get($global-vars, 'grid-width') !global;
138
+ $zen-box-sizing : map-get($global-vars, 'box-sizing') !global;
139
+ $zen-direction : map-get($global-vars, 'direction') !global;
140
+ $zen-switch-direction : map-get($global-vars, 'switch-direction') !global;
141
+ $zen-auto-include-grid-item-base : map-get($global-vars, 'auto-include-grid-item-base') !global;
142
+ $zen-auto-include-flow-item-base : map-get($global-vars, 'auto-include-flow-item-base') !global;
143
+ $zen-grid-color : map-get($global-vars, 'grid-color') !global;
144
+ $zen-grid-numbers : map-get($global-vars, 'grid-numbers') !global;
145
+ }
146
+
147
+ // zen-breakpoint(...)
148
+ //
149
+ // Combines zen-layout() with the Breakpoint module's breakpoint() mixin.
150
+ //
151
+ // Instead of nesting zen-layout() with breakpoint() like this:
152
+ // ```
153
+ // @include zen-layout($layout: 'm') {
154
+ // @include breakpoint($medium) {
155
+ // // Do something.
156
+ // }
157
+ // }
158
+ // ```
159
+ //
160
+ // You can use the zen-breakpoint() mixin like this:
161
+ // ```
162
+ // @include zen-breakpoint($medium, $layout: 'm') {
163
+ // // Do something.
164
+ // }
165
+ // ```
166
+ //
167
+ // $query - This parameter is passed on to the breakpoint() mixin.
168
+ // $no-query - This parameter is passed on to the breakpoint() mixin.
169
+ // $layout - Specify the name of the layout from $zen-columns to use.
170
+ // $columns - Defaults to $zen-columns.
171
+ // $gutters - Defaults to $zen-gutters
172
+ // $gutter-method - Defaults to $zen-gutter-method
173
+ // $grid-width - Defaults to $zen-grid-width
174
+ // $box-sizing - Defaults to $zen-box-sizing
175
+ // $direction - Defaults to $zen-direction
176
+ // $switch-direction - Defaults to $zen-switch-direction
177
+ // $auto-include-grid-item-base - Defaults to $zen-auto-include-grid-item-base
178
+ // $auto-include-flow-item-base - Defaults to $zen-auto-include-flow-item-base
179
+ // $grid-color - Defaults to $zen-grid-color
180
+ // $grid-numbers - Defaults to $zen-grid-numbers
181
+ //
182
+ // Style guide: layout.zen-breakpoint
183
+ @mixin zen-breakpoint(
184
+ $query,
185
+ $no-query: false,
186
+ $layout : null,
187
+ $columns : null,
188
+ $gutters : null,
189
+ $gutter-method : null,
190
+ $grid-width : null,
191
+ $box-sizing : null,
192
+ $direction : null,
193
+ $switch-direction : null,
194
+ $auto-include-grid-item-base : null,
195
+ $auto-include-flow-item-base : null,
196
+ $grid-color : null,
197
+ $grid-numbers : null
198
+ ) {
199
+
200
+ @if not mixin-exists('breakpoint') {
201
+ @error 'You need to @import the breakpoint mixin before using zen-breakpoint().';
202
+ }
203
+
204
+ @include zen-layout(
205
+ $layout,
206
+ $columns,
207
+ $gutters,
208
+ $gutter-method,
209
+ $grid-width,
210
+ $box-sizing,
211
+ $direction,
212
+ $switch-direction,
213
+ $auto-include-grid-item-base,
214
+ $auto-include-flow-item-base,
215
+ $grid-color,
216
+ $grid-numbers
217
+ ) {
218
+ @include breakpoint($query, $no-query) {
219
+ @content;
220
+ }
221
+ }
222
+ }
223
+
224
+ // zen-mq(...)
225
+ //
226
+ // An alias for the zen-breakpoint() mixin.
227
+ //
228
+ // Style guide: layout.zen-mq
229
+ @mixin zen-mq(
230
+ $query,
231
+ $no-query: false,
232
+ $layout : null,
233
+ $columns : null,
234
+ $gutters : null,
235
+ $gutter-method : null,
236
+ $grid-width : null,
237
+ $box-sizing : null,
238
+ $direction : null,
239
+ $switch-direction : null,
240
+ $auto-include-grid-item-base : null,
241
+ $auto-include-flow-item-base : null,
242
+ $grid-color : null,
243
+ $grid-numbers : null
244
+ ) {
245
+
246
+ @if not mixin-exists('mq') {
247
+ @error 'You need to @import the mq mixin before using zen-mq().';
248
+ }
249
+
250
+ @include zen-layout(
251
+ $layout,
252
+ $columns,
253
+ $gutters,
254
+ $gutter-method,
255
+ $grid-width,
256
+ $box-sizing,
257
+ $direction,
258
+ $switch-direction,
259
+ $auto-include-grid-item-base,
260
+ $auto-include-flow-item-base,
261
+ $grid-color,
262
+ $grid-numbers
263
+ ) {
264
+ @include mq($query, $no-query) {
265
+ @content;
266
+ }
267
+ }
268
+ }
269
+
270
+ // zen-respond-to(...)
271
+ //
272
+ // Combines zen-layout() with the Breakpoint module's respond-to() mixin.
273
+ //
274
+ // Instead of nesting zen-layout() with respond-to() like this:
275
+ // ```
276
+ // @include zen-layout($layout: 'm') {
277
+ // @include respond-to('m') {
278
+ // // Do something.
279
+ // }
280
+ // }
281
+ // ```
282
+ //
283
+ // You can use the zen-respond-to() mixin like this:
284
+ // ```
285
+ // @include zen-respond-to('m') {
286
+ // // Do something.
287
+ // }
288
+ // ```
289
+ //
290
+ // Note that the 'm' in the above example uses the same name in the
291
+ // $breakpoints map as is used in the $zen-layouts map.
292
+ //
293
+ // You can use a differently-named layout by explicitly specifying the $layout
294
+ // parameter like this:
295
+ // ```
296
+ // @include zen-respond-to('m', $layout: 'medium') {
297
+ // // Do something.
298
+ // }
299
+ // ```
300
+ //
301
+ // $layout - Specify the name of the layout from $zen-columns to use.
302
+ // $context - This parameter is passed on to the respond-to() mixin.
303
+ // $no-query - This parameter is passed on to the respond-to() mixin.
304
+ // $columns - Defaults to $zen-columns.
305
+ // $gutters - Defaults to $zen-gutters
306
+ // $gutter-method - Defaults to $zen-gutter-method
307
+ // $grid-width - Defaults to $zen-grid-width
308
+ // $box-sizing - Defaults to $zen-box-sizing
309
+ // $direction - Defaults to $zen-direction
310
+ // $switch-direction - Defaults to $zen-switch-direction
311
+ // $auto-include-grid-item-base - Defaults to $zen-auto-include-grid-item-base
312
+ // $auto-include-flow-item-base - Defaults to $zen-auto-include-flow-item-base
313
+ // $grid-color - Defaults to $zen-grid-color
314
+ // $grid-numbers - Defaults to $zen-grid-numbers
315
+ //
316
+ // Style guide: layout.zen-layout
317
+ @mixin zen-respond-to(
318
+ $context,
319
+ $no-query: false,
320
+ $layout : null,
321
+ $columns : null,
322
+ $gutters : null,
323
+ $gutter-method : null,
324
+ $grid-width : null,
325
+ $box-sizing : null,
326
+ $direction : null,
327
+ $switch-direction : null,
328
+ $auto-include-grid-item-base : null,
329
+ $auto-include-flow-item-base : null,
330
+ $grid-color : null,
331
+ $grid-numbers : null
332
+ ) {
333
+
334
+ @if not mixin-exists('respond-to') {
335
+ @error 'You need to @import the respond-to mixin before using zen-respond-to().';
336
+ }
337
+
338
+ // Allow the first parameter to control both $context and $layout.
339
+ @if type-of($layout) == 'null' and map-has-key($zen-layouts, $context) {
340
+ $layout: $context;
341
+ }
342
+
343
+ @include zen-layout(
344
+ $layout,
345
+ $columns,
346
+ $gutters,
347
+ $gutter-method,
348
+ $grid-width,
349
+ $box-sizing,
350
+ $direction,
351
+ $switch-direction,
352
+ $auto-include-grid-item-base,
353
+ $auto-include-flow-item-base,
354
+ $grid-color,
355
+ $grid-numbers
356
+ ) {
357
+ @include respond-to($context, $no-query) {
358
+ @content;
359
+ }
360
+ }
361
+ }
@@ -46,6 +46,12 @@ $zen-switch-direction : false !default;
46
46
  // @see http://next.zengrids.com/reference/flow/#zen-auto-include-flow-item-base
47
47
  $zen-auto-include-flow-item-base : true !default;
48
48
 
49
+ //
50
+ // Variables used by the layout module.
51
+ //
52
+
53
+ $zen-layouts : () !default;
54
+
49
55
  //
50
56
  // Variables used by the background module.
51
57
  //
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
9
9
  spec.homepage = 'http://zengrids.com'
10
10
  spec.rubyforge_project =
11
11
 
12
- spec.version = '2.0.0.beta.3'
13
- spec.date = '2014-09-03'
12
+ spec.version = '2.0.0.beta.4'
13
+ spec.date = '2015-10-26'
14
14
  spec.licenses = ['GPL-2']
15
15
 
16
16
  spec.authors = ['John Albin Wilkins']
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
 
19
19
  spec.add_runtime_dependency('sass', "~> 3.3")
20
20
 
21
- spec.files = `git ls-files`.split($/).select {|f| File.exist?(f) && f =~ %r{^(lib|stylesheets|templates)/} }
21
+ spec.files = `git ls-files`.split($/).select {|f| File.exist?(f) && f =~ %r{^(lib|sass)/} }
22
22
  spec.files += %w(
23
23
  LICENSE.txt
24
24
  README.md
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zen-grids
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.beta.3
4
+ version: 2.0.0.beta.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Albin Wilkins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-03 00:00:00.000000000 Z
11
+ date: 2015-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass
@@ -36,23 +36,16 @@ files:
36
36
  - LICENSE.txt
37
37
  - README.md
38
38
  - lib/zen-grids.rb
39
- - stylesheets/_zen-grids.scss
40
- - stylesheets/zen-grids/_background.scss
41
- - stylesheets/zen-grids/_flow.scss
42
- - stylesheets/zen-grids/_functions.scss
43
- - stylesheets/zen-grids/_grids.scss
44
- - stylesheets/zen-grids/_undo.scss
45
- - stylesheets/zen-grids/_variables.scss
46
- - stylesheets/zen-grids/internal/_functions-compass-polyfill.scss
47
- - stylesheets/zen-grids/internal/_variables-background.scss
48
- - templates/project/_base-elements.scss
49
- - templates/project/_components.scss
50
- - templates/project/_init.scss
51
- - templates/project/_layouts.scss
52
- - templates/project/_visually-hidden.scss
53
- - templates/project/example.html
54
- - templates/project/manifest.rb
55
- - templates/project/styles.scss
39
+ - sass/_zen-grids.scss
40
+ - sass/zen-grids/_background.scss
41
+ - sass/zen-grids/_flow.scss
42
+ - sass/zen-grids/_functions.scss
43
+ - sass/zen-grids/_grids.scss
44
+ - sass/zen-grids/_layout.scss
45
+ - sass/zen-grids/_undo.scss
46
+ - sass/zen-grids/_variables.scss
47
+ - sass/zen-grids/internal/_functions-compass-polyfill.scss
48
+ - sass/zen-grids/internal/_variables-background.scss
56
49
  - zen-grids.gemspec
57
50
  homepage: http://zengrids.com
58
51
  licenses:
@@ -73,8 +66,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
66
  - !ruby/object:Gem::Version
74
67
  version: 1.3.1
75
68
  requirements: []
76
- rubyforge_project: 2.0.0.beta.3
77
- rubygems_version: 2.4.1
69
+ rubyforge_project: 2.0.0.beta.4
70
+ rubygems_version: 2.4.8
78
71
  signing_key:
79
72
  specification_version: 4
80
73
  summary: A Compass plugin for Zen Grids, a fluid responsive grid system
@@ -1,3 +0,0 @@
1
- // Import the partials for Zen Grids.
2
-
3
- @import "zen-grids/grids";
@@ -1,22 +0,0 @@
1
- /**
2
- * @file
3
- * Base HTML element styles.
4
- */
5
-
6
- html {
7
- font-size: $base-font-size;
8
- line-height: $base-line-height;
9
- }
10
-
11
- body {
12
- margin: 0;
13
- }
14
-
15
- h1,
16
- h2,
17
- p {
18
- margin: {
19
- top: $vertical-rhythm;
20
- bottom: $vertical-rhythm;
21
- }
22
- }
@@ -1,73 +0,0 @@
1
- /**
2
- * @file
3
- * Component styles.
4
- */
5
-
6
- /* Skip link styling */
7
- .skip-link {
8
- margin: 0;
9
- }
10
- .skip-link__link {
11
- display: block;
12
- width: 100%;
13
- padding: 2px 0 3px 0;
14
- text-align: center;
15
-
16
- &,
17
- &:visited {
18
- color: #fff;
19
- background-color: #666;
20
- }
21
-
22
- /* The skip-link link will be completely hidden until a user tabs to the link. */
23
- @media all and (min-width: 444px) {
24
- @include visually-focusable();
25
- }
26
- }
27
-
28
- /* Source-order meta info */
29
- .meta {
30
- margin: 0 0 .5rem 0;
31
- display: block;
32
- + * {
33
- margin-top: 0;
34
- }
35
- font-family: sans-serif;
36
- font-size: 1rem;
37
- line-height: 1rem;
38
- }
39
- %meta__child {
40
- display: inline;
41
- font-style: normal;
42
- line-height: 1rem;
43
- }
44
- .meta__heading {
45
- @extend %meta__child;
46
- font-size: 1rem;
47
- font-weight: bold;
48
- }
49
- .meta__data {
50
- @extend %meta__child;
51
- font-size: 0.8rem;
52
- font-weight: normal;
53
- // text-transform: uppercase;
54
- color: #c00;
55
- }
56
-
57
- /* Pull-quotes */
58
- .pull-quote {
59
- @include zen-float();
60
- @include zen-flow-item-width(1, 2);
61
-
62
- margin: {
63
- bottom: $vertical-rhythm/2;
64
- }
65
-
66
- font-size: 1.2em;
67
- font-weight: bold;
68
- font-style: italic;
69
-
70
- @media all and (min-width: 999px) {
71
- @include zen-flow-item-width(1, 3);
72
- }
73
- }
@@ -1,32 +0,0 @@
1
- //
2
- // @file
3
- // This file sets up all our variables and loads all the modules we need for all
4
- // generated CSS in this project. To use it, simply: @import "init";
5
- //
6
-
7
- // Supported browsers variable for Compass.
8
- $browser-minimum-versions: (
9
- 'chrome': null,
10
- 'firefox': null,
11
- 'ie': "8",
12
- 'safari': null,
13
- 'opera': null
14
- );
15
-
16
- // Set up Zen Grids.
17
- $zen-columns : 1;
18
- $zen-gutters : 20px;
19
- $zen-auto-include-grid-item-base : false;
20
-
21
- // Set up a unit of vertical rhythm.
22
- $base-font-size : 16px;
23
- $base-line-height : 1.5em;
24
- $vertical-rhythm : 1rem*($base-line-height/1em);
25
-
26
- //
27
- // Import our modules.
28
- //
29
- @import "zen-grids";
30
- @import "zen-grids/background";
31
- @import "zen-grids/flow";
32
- @import "visually-hidden";
@@ -1,143 +0,0 @@
1
- /**
2
- * @file
3
- * Layout styles.
4
- *
5
- * We use example breakpoints of 27em, 41em, 49em, 63em and 69px. The right
6
- * breakpoints to use for your site depend on your content.
7
- * We use example breakpoints of 444px, 666px, 777px, 999px and 1111px. The
8
- * right breakpoints to use for your site depend on your content.
9
- */
10
-
11
- /* The container for our grid items. */
12
- .l-basic {
13
- @include zen-grid-container();
14
- @include zen-grid-background();
15
- // Center the layout and ensure it doesn't grow too wide.
16
- margin: {
17
- left: auto;
18
- right: auto;
19
- }
20
- // Add some padding so we can see the grid background numbers more easily.
21
- padding: {
22
- top: $vertical-rhythm;
23
- bottom: $vertical-rhythm;
24
- }
25
- max-width: 1111px;
26
- }
27
-
28
- $zen-columns: 1;
29
-
30
- /* Mobile layout; all grid items are one column wide. */
31
- .l-basic__header,
32
- .l-basic__main,
33
- .l-basic__menu,
34
- .l-basic__content,
35
- .l-basic__aside1,
36
- .l-basic__aside2,
37
- .l-basic__footer {
38
- /* Set the shared properties for all grid items. */
39
- /* Note: we set $zen-auto-include-grid-item-base to false in _init.scss. */
40
- @include zen-grid-item-base();
41
- }
42
-
43
- /* "main" is a grid-item (of .l-basic) that is also a nested grid container. */
44
- .l-basic__main {
45
- @include zen-grid-container(grid-item);
46
- }
47
-
48
- /* Horizontal navigation bar */
49
- @media all and (min-width: 444px) {
50
- $navbar-height: 5em;
51
-
52
- .l-basic__main {
53
- padding-top: $navbar-height;
54
- }
55
- .l-basic__menu {
56
- @include zen-grid-item(1, 1);
57
- margin-top: -$navbar-height;
58
- height: $navbar-height;
59
- }
60
- }
61
-
62
- $zen-columns: 2;
63
- @media all and (min-width: 444px) and (max-width: 665px) {
64
- .l-basic {
65
- @include zen-grid-background(); // Show the new 2-column background grid image.
66
- }
67
- .l-basic__content {
68
- @include zen-grid-item(2, 1);
69
- }
70
- .l-basic__aside1 {
71
- @include zen-new-row(); // Clear left-floated elements (.l-basic__content)
72
- @include zen-grid-item(1, 1);
73
- }
74
- .l-basic__aside2 {
75
- @include zen-grid-item(1, 2);
76
- }
77
- }
78
-
79
- @media all and (min-width: 444px) {
80
- .l-basic__columns {
81
- @include zen-grid-container(flow);
82
- }
83
- .l-basic__col1,
84
- .l-basic__col2 {
85
- @include zen-grid-item-base();
86
- margin: {
87
- top: 0;
88
- bottom: 0;
89
- }
90
- }
91
- .l-basic__col1 {
92
- @include zen-grid-item(1, 1);
93
- }
94
- .l-basic__col2 {
95
- @include zen-grid-item(1, 2);
96
- }
97
- }
98
-
99
- $zen-columns: 3;
100
- @media all and (min-width: 666px) and (max-width: 998px) {
101
- .l-basic {
102
- @include zen-grid-background(); // Show the new 3-column background grid image.
103
- }
104
- .l-basic__content {
105
- @include zen-grid-item(2, 1);
106
- }
107
- .l-basic__aside1 {
108
- @include zen-grid-item(1, 1, right); // Position from the right
109
- }
110
- .l-basic__aside2 {
111
- @include zen-new-row(); // Clear left-floated elements (.l-basic__content)
112
- @include zen-grid-item(2, 1);
113
- }
114
- }
115
-
116
- @media all and (min-width: 777px) and (max-width: 998px) {
117
- .l-basic__aside2 {
118
- @include zen-new-row(right); // Clear right-floated elements (.l-basic__aside1)
119
- @include zen-grid-item(1, 1, right);
120
- }
121
- }
122
-
123
- $zen-columns: 5;
124
- @media all and (min-width: 999px) {
125
- .l-basic {
126
- @include zen-grid-background(); // Show the new 5-column background grid image.
127
- }
128
- .l-basic__content {
129
- @include zen-grid-item(3, 2);
130
- }
131
- .l-basic__aside1 {
132
- @include zen-grid-item(1, 1);
133
- }
134
- .l-basic__aside2 {
135
- @include zen-grid-item(1, 5);
136
- }
137
- .l-basic__col1 {
138
- @include zen-grid-item(2, 1, $columns: 3);
139
- }
140
- .l-basic__col2 {
141
- @include zen-grid-item(1, 3, $columns: 3);
142
- }
143
- }
@@ -1,35 +0,0 @@
1
- //
2
- // @file
3
- // This is an accessibility module.
4
- //
5
-
6
- // As defined by http://snook.ca/archives/html_and_css/hiding-content-for-accessibility
7
- @mixin visually-hidden {
8
- position: absolute !important;
9
- height: 1px;
10
- width: 1px;
11
- overflow: hidden;
12
- @if support-legacy-browser(ie, "7") {
13
- clip: rect(1px 1px 1px 1px); // IE6 and IE7 use the wrong syntax.
14
- }
15
- clip: rect(1px, 1px, 1px, 1px);
16
- }
17
-
18
- // Turns off the visually-hidden effect.
19
- @mixin visually-hidden-off {
20
- position: static !important;
21
- clip: auto;
22
- height: auto;
23
- width: auto;
24
- overflow: auto;
25
- }
26
-
27
- // Makes an element visually hidden, except when it receives focus.
28
- @mixin visually-focusable {
29
- @include visually-hidden();
30
-
31
- &:active,
32
- &:focus {
33
- @include visually-hidden-off();
34
- }
35
- }
@@ -1,100 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <title>Zen Grids: sample usage</title>
6
- <link rel="stylesheet" href="stylesheets/styles.css" media="all">
7
- </head>
8
- <body>
9
-
10
- <p class="skip-link">
11
- <a href="#main-menu" class="skip-link__link">Jump to main menu</a>
12
- </p>
13
-
14
- <div class="l-basic">
15
-
16
- <header class="l-basic__header">
17
- <p class="meta">
18
- <span class="meta__heading">Header</span>
19
- <span class="meta__data">HTML source order: 1</span>
20
- </p>
21
- <h1 class="header__title">Zen Grids: sample usage</h1>
22
- </header>
23
-
24
- <div class="l-basic__main">
25
-
26
- <article class="l-basic__content" role="main">
27
- <header class="meta">
28
- <h1 class="meta__heading">Main content</h1>
29
- <p class="meta__data">HTML source order: 2</p>
30
- </header>
31
- <p>Alice did not quite know what to say to this: so she helped herself to some tea and bread-and-butter, and then turned to the Dormouse, and repeated her question. ‘Why did they live at the bottom of a well?’</p>
32
- <aside class="pull-quote">
33
- <span class="meta">
34
- <span class="meta__heading">Pull quote</span>
35
- <span class="meta__data">HTML source order: 2.1</span>
36
- </span>
37
- ‘There’s no such thing!’
38
- </aside>
39
- <p>The Dormouse again took a minute or two to think about it, and then said, ‘It was a treacle-well.’ ‘There’s no such thing!’ Alice was beginning very angrily, but the Hatter and the March Hare went ‘Sh! sh!’ and the Dormouse sulkily remarked, ‘If you can’t be civil, you’d better finish the story for yourself.’</p>
40
- <div class="l-basic__columns">
41
- <p class="l-basic__col1">
42
- <span class="meta">
43
- <span class="meta__heading">Nested column 1</span>
44
- <span class="meta__data">HTML source order: 2.2.1</span>
45
- </span>
46
- At some breakpoints, this is a nested grid. At some breakpoints, this is a nested grid. At some breakpoints, this is a nested grid. At some breakpoints, this is a nested grid.
47
- </p>
48
- <p class="l-basic__col2">
49
- <span class="meta">
50
- <span class="meta__heading">Nested column 2</span>
51
- <span class="meta__data">HTML source order: 2.2.2</span>
52
- </span>
53
- At some breakpoints, this is a nested grid. At some breakpoints, this is a nested grid.
54
- </p>
55
- </div>
56
- <p>‘No, please go on!’ Alice said very humbly; ‘I won’t interrupt again. I dare say there may be ONE.’</p>
57
- </article>
58
-
59
- <nav class="l-basic__menu" role="navigation" id="main-menu">
60
- <header class="meta">
61
- <h2 class="meta__heading">Menu</h2>
62
- <p class="meta__data">HTML source order: 3</p>
63
- </header>
64
- <a href="#">Alice</a> ★
65
- <a href="#">Mad Hatter</a> ★
66
- <a href="#">The Queen</a> ★
67
- <a href="#">Tom Petty</a>
68
- </nav>
69
-
70
- <aside class="l-basic__aside1">
71
- <header class="meta">
72
- <h2 class="meta__heading">Aside</h2>
73
- <p class="meta__data">HTML source order: 4</p>
74
- </header>
75
- <p>‘Have some wine,’ the March Hare said in an encouraging tone.</p>
76
- </aside>
77
-
78
- <aside class="l-basic__aside2">
79
- <header class="meta">
80
- <h2 class="meta__heading">Aside</h2>
81
- <p class="meta__data">HTML source order: 5</p>
82
- </header>
83
- <p>‘Please would you tell me,’ said Alice, a little timidly, for she was not quite sure whether it was good manners for her to speak first, ‘why your cat grins like that?’</p>
84
- <p>‘It’s a Cheshire cat,’ said the Duchess, ‘and that’s why. Pig!’</p>
85
- </aside>
86
-
87
- </div>
88
-
89
- <footer class="l-basic__footer">
90
- <p class="meta">
91
- <span class="meta__heading">Footer</span>
92
- <span class="meta__data">HTML source order: 6</span>
93
- </p>
94
- <small>The small print.™</small>
95
- </footer>
96
-
97
- </div>
98
-
99
- </body>
100
- </html>
@@ -1,25 +0,0 @@
1
- description "The Zen Grids system."
2
-
3
- stylesheet '_init.scss', :media => 'all'
4
- stylesheet '_base-elements.scss', :media => 'all'
5
- stylesheet '_layouts.scss', :media => 'all'
6
- stylesheet '_components.scss', :media => 'all'
7
- stylesheet '_visually-hidden.scss', :media => 'all'
8
- stylesheet 'styles.scss', :media => 'all'
9
-
10
- html 'example.html'
11
-
12
- help %Q{
13
- Zen Grids is an intuitive, flexible grid system that leverages the natural source order of your content to make it easier to create fluid responsive designs. With an easy-to-use Sass mixin set, the Zen Grids system can be applied to an infinite number of layouts, including responsive, adaptive, fluid and fixed-width layouts. To learn more, visit:
14
-
15
- http://zengrids.com
16
- }
17
-
18
- welcome_message %Q{
19
- You rock! The Zen Grids system is now installed on your computer. Go check out
20
- how to use the system at:
21
-
22
- http://zengrids.com
23
-
24
- It's easy!
25
- }
@@ -1,7 +0,0 @@
1
- // Import the initialization partial.
2
- @import "init";
3
-
4
- // Aggregate all the stylesheets into one file.
5
- @import "base-elements";
6
- @import "layouts";
7
- @import "components";