fishnet 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,139 @@
1
+
2
+ $fn-box-bg-color: #ff80ff !default
3
+ $fn-box-color: #666 !default
4
+ $fn-box-height: 30px !default
5
+ $fn-box-margin-bottom: $gutter-width !default
6
+ $fn-box-border: 0 solid transparent !default
7
+
8
+ .fn-box
9
+ background-color: $fn-box-bg-color
10
+ border: $fn-box-border
11
+ overflow: hidden
12
+ color: $fn-box-color
13
+ font-weight: bold
14
+ line-height: $fn-box-height
15
+ text-align: center
16
+ margin-bottom: $fn-box-margin-bottom
17
+ height: $fn-box-height
18
+ &.alt
19
+ background-color: lighten($fn-box-bg-color, 10%)
20
+
21
+ .nested-outer
22
+ +column(6)
23
+ +clearfixer
24
+ background-color: $fn-box-bg-color
25
+ border: $fn-box-border
26
+ height: $fn-box-height * 2
27
+
28
+ .nested-inner-pull,
29
+ .nested-inner-push
30
+ background-color: lighten($fn-box-bg-color, 10%)
31
+ border: 1px solid blue
32
+ height: $fn-box-height
33
+ margin-top: $fn-box-height * 0.5
34
+ color: $fn-box-color
35
+ font-weight: bold
36
+ line-height: $fn-box-height
37
+ text-align: center
38
+
39
+ .nested-inner-pull
40
+ +column-pull(3,6)
41
+ &:after
42
+ content: "nested pulled"
43
+ .nested-inner-push
44
+ +column-push(3,6)
45
+ &:after
46
+ content: "nested pushed"
47
+
48
+ @mixin mesh-message($value, $prefix:"", $postfix:"")
49
+ &:after
50
+ content: "#{$prefix}#{$value}#{$postfix}"
51
+
52
+ // ### Typical Columns
53
+ @mixin add-guide-column-classes($columns:$columns)
54
+ @for $i from 1 through $columns
55
+ .fn-col-#{$i}
56
+ @extend .fn-box
57
+ +column($i, $columns)
58
+ +mesh-message($i, "col-")
59
+
60
+ @mixin add-guide-column-pull-classes($columns:$columns, $resize:true)
61
+ @for $i from 1 through $columns
62
+ .fn-col-pull-#{$i}
63
+ @extend .fn-box
64
+ +column-pull($i, $columns, $resize)
65
+ +mesh-message($i, "col-pull-")
66
+
67
+ @mixin add-guide-column-push-classes($columns:$columns, $resize:true)
68
+ @for $i from 1 through $columns
69
+ .fn-col-push-#{$i}
70
+ @extend .fn-box
71
+ +column-push($i, $columns, $resize)
72
+ +mesh-message($i, "col-push-")
73
+
74
+ @mixin add-guide-column-full-classes($columns:$columns)
75
+ @for $i from 1 through $columns
76
+ .fn-col-full-#{$i}
77
+ @extend .fn-box
78
+ +column-full($i, $columns)
79
+ +mesh-message($i, "col-full-")
80
+
81
+
82
+ // ### Offset Columns
83
+
84
+ @mixin add-guide-column-offset-left-classes($columns:$columns)
85
+ @for $i from 1 through $columns
86
+ .fn-col-offset-left-#{$i}
87
+ @extend .fn-box
88
+ +column-offset-left($i, $columns - $i, $columns)
89
+ +mesh-message($i, "left ", "x#{$columns - $i}" )
90
+
91
+ @mixin add-guide-column-offset-left-pull-classes($columns:$columns, $resize:true)
92
+ @for $i from 1 through $columns
93
+ .fn-col-offset-left-pull-#{$i}
94
+ @extend .fn-box
95
+ +column-offset-left-pull($i, $columns - $i, $columns, $resize)
96
+ +mesh-message($i, "left pull ", "x#{$columns - $i}" )
97
+
98
+ @mixin add-guide-column-offset-left-push-classes($columns:$columns, $resize:true)
99
+ @for $i from 1 through $columns
100
+ .fn-col-offset-left-push-#{$i}
101
+ @extend .fn-box
102
+ +column-offset-left-push($i, $columns - $i, $columns, $resize)
103
+ +mesh-message($i, "left push ", "x#{$columns - $i}" )
104
+
105
+ @mixin add-guide-column-offset-left-full-classes($columns:$columns)
106
+ @for $i from 1 through $columns
107
+ .fn-col-offset-left-full-#{$i}
108
+ @extend .fn-box
109
+ +column-offset-left-full($i, $columns - $i, $columns)
110
+ +mesh-message($i, "left full ", "x#{$columns - $i}" )
111
+
112
+ @mixin add-guide-column-offset-right-classes($columns:$columns)
113
+ @for $i from 1 through $columns
114
+ .fn-col-offset-right-#{$i}
115
+ @extend .fn-box
116
+ +column-offset-right($i, $columns - $i, $columns)
117
+ +mesh-message($i, "right ", "x#{$columns - $i}" )
118
+
119
+ @mixin add-guide-column-offset-right-pull-classes($columns:$columns, $resize:true)
120
+ @for $i from 1 through $columns
121
+ .fn-col-offset-right-pull-#{$i}
122
+ @extend .fn-box
123
+ +column-offset-right-pull($i, $columns - $i, $columns, $resize)
124
+ +mesh-message($i, "right pull ", "x#{$columns - $i}" )
125
+
126
+ @mixin add-guide-column-offset-right-push-classes($columns:$columns, $resize:true)
127
+ @for $i from 1 through $columns
128
+ .fn-col-offset-right-push-#{$i}
129
+ @extend .fn-box
130
+ +column-offset-right-push($i, $columns - $i, $columns, $resize)
131
+ +mesh-message($i, "right push ", "x#{$columns - $i}" )
132
+
133
+ @mixin add-guide-column-offset-right-full-classes($columns:$columns)
134
+ @for $i from 1 through $columns
135
+ .fn-col-offset-right-full-#{$i}
136
+ @extend .fn-box
137
+ +column-offset-right-full($i, $columns - $i, $columns)
138
+ +mesh-message($i, "right full ", "x#{$columns - $i}" )
139
+
@@ -0,0 +1,36 @@
1
+
2
+ // Fills a background color and darkens the border based off a percentage
3
+ @mixin background-darken-border($color, $percentage:20%)
4
+ background-color: $color
5
+ border: 1px solid darken($color, $percentage)
6
+
7
+ // Base notification used for @extends
8
+ .base-notification
9
+ -webkit-border-radius: $radii
10
+ -moz-border-radius: $radii
11
+ border-radius: $radii
12
+ +background-darken-border($standard)
13
+ position: relative
14
+ padding: 0.75em
15
+ margin: 1em 0
16
+ a
17
+ text-decoration: underline
18
+
19
+ // Main notification message
20
+ .notification
21
+ @extend .base-notification
22
+ text-shadow: $text_drop_lite
23
+ &.info, &.notice
24
+ +background-darken-border(lighten($grey9, 20%))
25
+ &.important
26
+ +background-darken-border(lighten($blue, 40%))
27
+ color: $blue
28
+ &.success
29
+ +background-darken-border(lighten($green, 40%))
30
+ color: $green
31
+ &.warning
32
+ +background-darken-border(lighten($yellow, 30%))
33
+ color: darken($yellow, 15%)
34
+ &.danger
35
+ +background-darken-border(lighten($red, 40%))
36
+ color: $red
@@ -0,0 +1,101 @@
1
+
2
+ // Tables
3
+ table
4
+ margin: 0.5em 0
5
+ width: 100%
6
+
7
+ caption
8
+ font-size: 0.85em
9
+ font-weight: bold
10
+ text-align: left
11
+ margin-bottom: .5em
12
+
13
+ th, td
14
+ border-top: 1px solid $greyC
15
+ line-height: 1
16
+ text-align: left
17
+ padding: 0.6em
18
+
19
+ th
20
+ font-weight: bold
21
+ vertical-align: bottom
22
+
23
+ thead:first-child tr th,
24
+ thead:first-child tr td
25
+ border-top: 0
26
+
27
+ tbody td > a:hover
28
+ text-decoration: underline
29
+
30
+ tfoot
31
+ font-size: 0.85em
32
+
33
+ tbody + tbody
34
+ border-top: 2px solid $greyC
35
+
36
+ th .ascending .caret
37
+ margin-top: 6px
38
+ th .descending .caret
39
+ margin-top: 2px
40
+
41
+ th .ascending:hover .caret,
42
+ th .unsorted:hover .caret-north-south:after
43
+ border-top-color: $blue
44
+
45
+ th .descending:hover .caret,
46
+ th .unsorted:hover .caret-north-south
47
+ border-bottom-color: $blue
48
+
49
+ // Outer box
50
+ table.box
51
+ thead tr
52
+ border: 1px solid $greyC
53
+ tbody tr
54
+ border: 1px solid $greyC
55
+ tfoot tr
56
+ border: 1px solid $greyC
57
+
58
+ thead th
59
+ &:first-child
60
+ border-left-color: $greyC !important
61
+ &:last-child
62
+ border-right-color: $greyC !important
63
+ tbody td
64
+ &:first-child
65
+ border-left-color: $greyC !important
66
+ &:last-child
67
+ border-right-color: $greyC !important
68
+
69
+ // Vertical borders
70
+ table.vborder
71
+ thead th
72
+ border-left: 1px solid $greyC
73
+ border-right: 1px solid $greyC
74
+ &:first-child
75
+ border-left-color: transparent
76
+ &:last-child
77
+ border-right-color: transparent
78
+
79
+ tbody td
80
+ border-left: 1px solid $greyC
81
+ border-right: 1px solid $greyC
82
+ &:first-child
83
+ border-left-color: transparent
84
+ &:last-child
85
+ border-right-color: transparent
86
+
87
+ // Banded table
88
+ table.banded tbody tr
89
+ &:nth-child(odd), &.odd
90
+ background-color: transparent
91
+ &:nth-child(even), &.even
92
+ background-color: $greyE
93
+
94
+ // Colorize the table header background
95
+ table.thead-decorate thead
96
+ background-color: darken($greyE, 5%)
97
+
98
+ // Colorize the table footer background
99
+ table.tfoot-decorate tfoot
100
+ background-color: $off_white
101
+
@@ -0,0 +1,14 @@
1
+
2
+ .well
3
+ -webkit-border-radius: $radii
4
+ -moz-border-radius: $radii
5
+ border-radius: $radii
6
+ border: 1px solid $greyC
7
+ background-color: transparent
8
+ margin-bottom: 1.25em
9
+ padding: 1.25em
10
+ &.lite
11
+ background-color: $off_white
12
+ &.dark
13
+ background-color: $off_grey
14
+
@@ -0,0 +1,31 @@
1
+
2
+ !!! 5
3
+ %html{:lang => "en"}
4
+ %head
5
+ %title Fishnet
6
+ %meta(content="IE=edge,chrome=1" http-equiv="X-UA-Compatible")
7
+ %meta(content="text/html; charset=UTF-8" http-equiv="Content-Type")
8
+ %meta(name="description" content="Grid system based on the semantic.gs")
9
+ %meta(name="author" content="Matthew Kitt")
10
+ %meta(name="imagetoolbar" content="no")
11
+ %meta(name="viewport" content="width=device-width, initial-scale=1.0")
12
+ %meta(name="apple-touch-fullscreen" content="YES")
13
+ %meta(name="apple-mobile-web-app-capable" content="YES")
14
+ %meta(name="apple-mobile-web-app-status-bar-style" content="black")
15
+
16
+ <!--[if lt IE 9]>
17
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
18
+ <![endif]-->
19
+
20
+ %link(href="/assets/fishnet_styleguide.css" rel="stylesheet" type="text/css")
21
+
22
+ %body(role="document")
23
+ %section.page-info.fixed
24
+ %span#page_dimensions Dimensions
25
+
26
+ %section.container(role="main" aria-live="polite" aria-atomic="true")
27
+ = yield
28
+
29
+ %script(src="/assets/prettify.js" type="text/javascript" charset="utf-8")
30
+ %script(src="/assets/fishnet_styleguide.js" type="text/javascript" charset="utf-8")
31
+
@@ -0,0 +1,479 @@
1
+
2
+ :ruby
3
+ @num_columns = 12
4
+
5
+ %section.well.lite
6
+ %h1 Fishnet
7
+
8
+ %p A simple grid framework based on the <a href="http://semantic.gs/">semantic grid system</a>, built in <a href="http://sass-lang.com/">sass</a> and tuned to work with both fluid and fixed layouts.
9
+ %br
10
+ %p Fishnet follows the philosophy that your html markup should be as semantic as possible, while maintaining the flexibility and order of a grid system. With <a href="http://sass-lang.com/">sass</a> (and other preprocessors), it's trivial to inject a grid system directly into an element styles. Fishnet provides a common interface for maintaining the structure and consistency provided by a grid, while maintaining logical sematic elements within the markup.
11
+ %br
12
+ %p Fishnet builds upon <a href="http://semantic.gs/">semantic.gs</a> by providing additional column type mixins and exposing functions in order to cover every pixel available on the screen. The core components of fishnet will not insert any classes or other elements into your stylesheets (<em><a href="#helpers">unless you tell it to</a></em>). It's all based on variables, functions, and mixins. This allows an application to use grid elements when needed and get out of the way when they're not.
13
+
14
+ .section
15
+ %h2.section-heading Install
16
+ %p(style="color:#ff00ff;") <em>Needs to be completed</em>
17
+
18
+ .section
19
+ %h2.section-heading Variables, Functions, Mixins
20
+ %h3.section-subheading Variables <span><code>fishnet/_settings.sass</code></span>
21
+ %p Fishnet requires a few base variables to perform calculations for generating the grid system. The grid system comes with a set of a default values, but these can be easily overriden in an application. Define the variables below <strong>prior</strong> to mixing in any of the column settings within a layout.
22
+ %table.box.vborder.banded.thead-decorate
23
+ %thead
24
+ %tr
25
+ %th Variable
26
+ %th Default
27
+ %th Usage
28
+ %tbody
29
+ %tr
30
+ %td <code>$column-width</code>
31
+ %td <code>60px</code>
32
+ %td The width of an individual column
33
+ %tr
34
+ %td <code>$gutter-width</code>
35
+ %td <code>20px</code>
36
+ %td The total gutter spacing between a column
37
+ %tr
38
+ %td <code>$columns</code>
39
+ %td <code>12</code>
40
+ %td The number of columns that make up a row
41
+ %tr
42
+ %td <code>$total-width</code>
43
+ %td <code>100%</code>
44
+ %td The total width of a row
45
+ .notification.important
46
+ %p <strong>Note!</strong> In a fixed width grid system, set <code>$total-width</code> to the max width of your grid in pixels
47
+ .notification.important
48
+ %p <strong>Pro Tip!</strong> Use the <code>+grid-settings</code> mixin for one lining the structure of a grid (useful for redefining a grid within <code>@media</code> queries)
49
+
50
+ %pre.prettyprint
51
+ = preserve do
52
+ :escaped
53
+ @media (min-width: 1200px)
54
+ // $total-width, $columns, $column-width, $gutter-width
55
+ +grid-settings(100%, 12, 74px, 8px)
56
+
57
+ -# Mixins
58
+ %h3.section-subheading Mixins <span><code>fishnet/_mixins.sass</code></span>
59
+ %p Fishnet's mixins are the core public interface to be used within an application. They provide various type of columns to be injected into an elements style. Checkout the <a href="#structure_examples">structure examples</a> below for a more visual description.
60
+ %table.box.vborder.banded.thead-decorate
61
+ %thead
62
+ %tr
63
+ %th Mixin
64
+ %th Parameters
65
+ %th Usage
66
+ %tbody
67
+ %tr
68
+ %td <code>+column</code>
69
+ %td <code>$x, $columns:$columns</code>
70
+ %td Standard column with left and right margins equal to the <code>$gutter-width</code>
71
+ %tr
72
+ %td <code>+column-pull</code>
73
+ %td <code>$x, $columns:$columns, $resize:true</code>
74
+ %td Pulled left column with <code>margin-left:0</code>, adds <code>$gutter-width / 2</code> to overall width
75
+ %tr
76
+ %td <code>+column-push</code>
77
+ %td <code>$x, $columns:$columns, $resize:true</code>
78
+ %td Pushed right column with <code>margin-right:0</code>, adds <code>$gutter-width / 2</code> to overall width
79
+ %tr
80
+ %td <code>+column-full</code>
81
+ %td <code>$x, $columns:$columns</code>
82
+ %td Pulled &amp; pushed column with outside margins set to 0, adds <code>$gutter-width</code> to overall width
83
+ %tr
84
+ %td <code>+column-offset-left</code>
85
+ %td <code>$x, $offset:0, $columns:$columns</code>
86
+ %td Draws a standard column, offset left by number of columns
87
+ %tr
88
+ %td <code>+column-offset-left-pull</code>
89
+ %td <code>$x, $offset:0, $columns:$columns, $resize:true</code>
90
+ %td Draws a pulled column, offset left by number of columns, with an adjusted width
91
+ %tr
92
+ %td <code>+column-offset-left-push</code>
93
+ %td <code>$x, $offset:0, $columns:$columns, $resize:true</code>
94
+ %td Draws a pushed column, offset left by number of columns, with an adjusted width
95
+ %tr
96
+ %td <code>+column-offset-left-full</code>
97
+ %td <code>$x, $offset:0, $columns:$columns</code>
98
+ %td Pulled &amp; pushed column, offset left by number of columns, with an adjusted width
99
+ %tr
100
+ %td <code>+column-offset-right</code>
101
+ %td <code>$x, $offset:0, $columns:$columns</code>
102
+ %td Draws a standard column, offset right by number of columns
103
+ %tr
104
+ %td <code>+column-offset-right-pull</code>
105
+ %td <code>$x, $offset:0, $columns:$columns, $resize:true</code>
106
+ %td Draws a pulled column, offset right by number of columns, with an adjusted width
107
+ %tr
108
+ %td <code>+column-offset-right-push</code>
109
+ %td <code>$x, $offset:0, $columns:$columns, $resize:true</code>
110
+ %td Draws a pushed column, offset right by number of columns, with an adjusted width
111
+ %tr
112
+ %td <code>+column-offset-right-full</code>
113
+ %td <code>$x, $offset:0, $columns:$columns</code>
114
+ %td Pulled &amp; pushed column, offset right by number of columns, with an adjusted width
115
+ .notification.important
116
+ %p <strong>Note!</strong> The <code>$columns</code> parameter is used for nested grids (<a href="#nested">see below</a>), by default columns will use the global setting from the <code>$columns</code> variable
117
+ .notification.important
118
+ %p <strong>Note!</strong> Where there is a <code>$resize</code> parameter for pull/push columns, passing false will not resize the column
119
+ .notification.important
120
+ %p <strong>Note!</strong> The <code>$offset</code> parameter relates to the number of columns to offset by: <code>+column-offset-left(8,4)</code>
121
+
122
+ -# Functions
123
+ %h3.section-subheading Functions <span><code>fishnet/_functions.sass</code></span>
124
+ %p The fishnet functions are the basis for generating column mixins. These functions can also be used on elements inside columns or anywhere else within an application where it's needed to set the width of an element in relation to a column mixin.
125
+ %table.box.vborder.banded.thead-decorate
126
+ %thead
127
+ %tr
128
+ %th Function
129
+ %th Parameters
130
+ %th Usage
131
+ %tbody
132
+ %tr
133
+ %td <code>column_width</code>
134
+ %td <code>$x, $columns:$columns</code>
135
+ %td Returns the <code>width</code> of a <strong>standard</strong> column within the grid system
136
+ %tr
137
+ %td <code>column_pull_width</code>
138
+ %td <code>$x, $columns:$columns</code>
139
+ %td Returns the <code>width</code> of a <strong>pull</strong> column within the grid system
140
+ %tr
141
+ %td <code>column_push_width</code>
142
+ %td <code>$x, $columns:$columns</code>
143
+ %td Returns the <code>width</code> of a <strong>push</strong> column within the grid system
144
+ %tr
145
+ %td <code>column_full_width</code>
146
+ %td <code>$x, $columns:$columns</code>
147
+ %td Returns the <code>width</code> of a <strong>full</strong> column within the grid system
148
+ %tr
149
+ %td <code>column_offset_width</code>
150
+ %td <code>$offset:0</code>
151
+ %td Returns the <code>width</code> of the <strong>offset</strong> within offset columns
152
+ %tr
153
+ %td <code>gutter_space</code>
154
+ %td <code>$offset:0</code>
155
+ %td Returns the <code>width</code> of <strong>spacing</strong> between columns
156
+ .notification.important
157
+ %p <strong>Note!</strong> There are 3 undocumented utility helper functions within <code>fishnet/_functions.sass</code>. These are used internally, but can be useful in creating other types of columns.
158
+ .notification.important
159
+ %p <strong>Pro Tip!</strong> To get the width of a push/pull column that doesn't resize, call the <code>column_width</code> function
160
+
161
+
162
+ .section
163
+ %h2.section-heading Usage
164
+ %p To apply the various column classes, first define your grid layout, then mixin the desired column types into an element. Below is an example layout for a page.
165
+ %pre.prettyprint
166
+ = preserve do
167
+ :escaped
168
+ // Define grid setting variables
169
+ $column-width: 74px
170
+ $gutter-width: 8px
171
+ $columns: 12
172
+ $total-width: 100%
173
+
174
+ %pre.prettyprint.pre-column.sass
175
+ = preserve do
176
+ :escaped
177
+ // SASS
178
+ .container
179
+ +clearfixer
180
+ max-width: 1200px
181
+ margin: 0 auto
182
+
183
+ .masthead
184
+ +column-full(12)
185
+
186
+ .gallery
187
+ +column(12)
188
+
189
+ .promo.recent
190
+ +column-pull(6)
191
+
192
+ .promo.ancient
193
+ +column-push(6)
194
+
195
+ .article
196
+ +column(6)
197
+
198
+ .aside
199
+ +column-offset-left(4,2)
200
+
201
+ // Create a faux row for nested columns
202
+ .footer
203
+ +column-full(12)
204
+ +clearfixer
205
+
206
+ .footer-nav
207
+ +column-pull(8)
208
+
209
+ .social-nav
210
+ +column-offset-left-full(3,1)
211
+
212
+ .copy
213
+ +column-offset-right-full(4,2)
214
+
215
+ .terms
216
+ +column-offset-left-full(4,2)
217
+ %pre.prettyprint.pre-column.markup
218
+ = preserve do
219
+ :escaped
220
+ <!-- Markup -->
221
+ <section class="container">
222
+ <section class="masthead">
223
+ ...
224
+ </section>
225
+
226
+ <section class="gallery">
227
+ ...
228
+ </section>
229
+
230
+ <section class="promo recent">
231
+ ...
232
+ </section>
233
+ <section class="promo ancient">
234
+ ...
235
+ </section>
236
+
237
+ <article class="article">
238
+ ...
239
+ </article>
240
+ <aside class="aside">
241
+ ...
242
+ </aside>
243
+
244
+ <footer class="footer">
245
+ <nav class="footer-nav">
246
+ ...
247
+ </nav>
248
+ <nav class="social-nav">
249
+ ...
250
+ </nav>
251
+
252
+ <section class="copy">
253
+ ...
254
+ </section>
255
+ <section class="terms">
256
+ ...
257
+ </section>
258
+ </footer>
259
+ </section>
260
+
261
+ %p
262
+ %a#example_toggler(href="#") View the example from the code above
263
+ #the_example.collapse
264
+ %section.masthead
265
+ %code +column-full(12)
266
+
267
+ %section.gallery
268
+ %code +column(12)
269
+
270
+ %section.promo.recent
271
+ %code +column-pull(6)
272
+
273
+ %section.promo.ancient
274
+ %code +column-push(6)
275
+
276
+ %article.article
277
+ %code +column(6)
278
+
279
+ %aside.aside
280
+ %code +column-offset-left(4,2)
281
+
282
+ %footer.footer
283
+ %nav.footer-nav
284
+ %code +column-pull(8)
285
+ %nav.social-nav
286
+ %code +column-offset-left-full(3,1)
287
+ %section.copy
288
+ %code +column-offset-right-full(4,2)
289
+ %section.terms
290
+ %code +column-offset-left-full(4,2)
291
+
292
+ .section#helpers
293
+ %h2.section-heading Helpers
294
+ %h3.section-subheading Mesh <span><code>fishnet/_mesh.sass</code></span>
295
+ %p We sort of lied to you. Sometimes it's pretty useful to generate non-semantic classes for building a grid system. Fishnet provides some helper mixins for creating these non-semantic column classes. Use these sparingly, as they can quickly create a lot of classes in your compiled CSS.
296
+ %table.box.vborder.banded.thead-decorate
297
+ %thead
298
+ %tr
299
+ %th Mixin
300
+ %th Parameters
301
+ %th Usage
302
+ %tbody
303
+ %tr
304
+ %td <code>+add-column-classes</code>
305
+ %td <code>$name:"col", $columns:$columns</code>
306
+ %td <code>1..$columns</code> &mdash; <strong>standard</strong> column classes for name (<code>.col-<em>n</em></code>)
307
+ %tr
308
+ %td <code>+add-column-pull-classes</code>
309
+ %td <code>$name:"col-pull", $columns:$columns, $resize:true</code>
310
+ %td <code>1..$columns</code> &mdash; <strong>pull</strong> column classes for name (<code>.col-pull-<em>n</em></code>)
311
+ %tr
312
+ %td <code>+add-column-push-classes</code>
313
+ %td <code>$name:"col-push", $columns:$columns, $resize:true</code>
314
+ %td <code>1..$columns</code> &mdash; <strong>push</strong> column classes for name (<code>.col-push-<em>n</em></code>)
315
+ %tr
316
+ %td <code>+add-column-full-classes</code>
317
+ %td <code>$name:"col-full", $columns:$columns</code>
318
+ %td <code>1..$columns</code> &mdash; <strong>full</strong> column classes for name (<code>.col-full-<em>n</em></code>)
319
+ %tr
320
+ %td <code>+add-column-offset-left-classes</code>
321
+ %td <code>$name:"col-offset-left", $columns:$columns</code>
322
+ %td <code>1..$columns</code> &mdash; <strong>offset left</strong> column classes for name (<code>.col-offset-left-<em>n</em></code>)
323
+ %tr
324
+ %td <code>+add-column-offset-left-pull-classes</code>
325
+ %td <code>$name:"col-offset-left-pull", $columns:$columns, $resize:true</code>
326
+ %td <code>1..$columns</code> &mdash; <strong>offset left pull</strong> column classes for name (<code>.col-offset-left-pull-<em>n</em></code>)
327
+ %tr
328
+ %td <code>+add-column-offset-left-push-classes</code>
329
+ %td <code>$name:"col-offset-left-push", $columns:$columns, $resize:true</code>
330
+ %td <code>1..$columns</code> &mdash; <strong>offset left push</strong> column classes for name (<code>.col-offset-left-push-<em>n</em></code>)
331
+ %tr
332
+ %td <code>+add-column-offset-left-full-classes</code>
333
+ %td <code>$name:"col-offset-left-full", $columns:$columns</code>
334
+ %td <code>1..$columns</code> &mdash; <strong>offset left full</strong> column classes for name (<code>.col-offset-left-full-<em>n</em></code>)
335
+ %tr
336
+ %td <code>+add-column-offset-right-classes</code>
337
+ %td <code>$name:"col-offset-right", $columns:$columns</code>
338
+ %td <code>1..$columns</code> &mdash; <strong>offset right</strong> column classes for name (<code>.col-offset-right-<em>n</em></code>)
339
+ %tr
340
+ %td <code>+add-column-offset-right-pull-classes</code>
341
+ %td <code>$name:"col-offset-right-pull", $columns:$columns, $resize:true</code>
342
+ %td <code>1..$columns</code> &mdash; <strong>offset right pull</strong> column classes for name (<code>.col-offset-right-pull-<em>n</em></code>)
343
+ %tr
344
+ %td <code>+add-column-offset-right-push-classes</code>
345
+ %td <code>$name:"col-offset-right-push", $columns:$columns, $resize:true</code>
346
+ %td <code>1..$columns</code> &mdash; <strong>offset right push</strong> column classes for name (<code>.col-offset-right-push-<em>n</em></code>)
347
+ %tr
348
+ %td <code>+add-column-offset-right-full-classes</code>
349
+ %td <code>$name:"col-offset-right-full", $columns:$columns</code>
350
+ %td <code>1..$columns</code> &mdash; <strong>offset right full</strong> column classes for name (<code>.col-offset-right-full-<em>n</em></code>)
351
+
352
+ .notification.important
353
+ %p <strong>Note!</strong> Whatever name is passed will always generate a number for the postfix, so if passing <code>"c"</code> for the <code>$name</code> parameter, the output will be <code>.c-<em>n</em></code> as the output
354
+ .notification.warning
355
+ %p <strong>Heads Up!</strong> By default this module is not included and needs to be imported: <code>@import fishnet/mesh</code>
356
+ .notification.danger
357
+ %p <strong>Danger!</strong> If only using the typical column classes (<code>standard</code>, <code>push</code>, <code>pull</code>, <code>full</code>) generating these with 12 columns, would equate to 48 classes!
358
+
359
+ .section
360
+ %h2.section-heading#structure_examples Example Structures
361
+ %p The following structures showcase the various mixins applied to simple boxes
362
+ %p
363
+ %a#structure_toggler(href="#") View all column structures
364
+
365
+ %section#the_structures.collapse
366
+ %h3 Standard columns
367
+ %p Usage: <code>+column(n)</code>
368
+ .sub-section
369
+ - (1..@num_columns).to_a.reverse.each do |i|
370
+ ! #{"<div class='fn-col-#{i}'></div>"}
371
+ - if @num_columns - i > 0
372
+ ! #{"<div class='fn-col-#{@num_columns - i}'></div>"}
373
+
374
+ %h3 Push/Pull columns
375
+ %p Usage: <code>+column-push(n)</code> and <code>+column-pull(n)</code>
376
+ .sub-section
377
+ - (1..@num_columns).to_a.reverse.each do |i|
378
+ ! #{"<div class='fn-col-pull-#{i}'></div>"}
379
+ - if @num_columns - i > 0
380
+ ! #{"<div class='fn-col-push-#{@num_columns - i} alt'></div>"}
381
+ - else
382
+ ! #{"<div class='fn-col-push-#{@num_columns} alt'></div>"}
383
+
384
+ %h3 Full columns
385
+ %p Usage: <code>+column-full(n)</code>
386
+ .sub-section
387
+ - (1..@num_columns).to_a.reverse.each do |i|
388
+ ! #{"<div class='fn-col-full-#{i}'></div>"}
389
+ - if @num_columns - i > 0
390
+ ! #{"<div class='fn-col-full-#{@num_columns - i} alt'></div>"}
391
+
392
+ %h3 Offset columns left
393
+ %p Usage: <code>+column-offset-left(n, by)</code>
394
+ .sub-section
395
+ - (1..@num_columns - 1).to_a.reverse.each do |i|
396
+ ! #{"<div class='fn-col-offset-left-#{i}'></div>"}
397
+
398
+ %h3 Offset columns left pull
399
+ %p Usage: <code>+column-offset-left-pull(n, by)</code>
400
+ .sub-section
401
+ - (1..@num_columns - 1).to_a.reverse.each do |i|
402
+ ! #{"<div class='fn-col-offset-left-pull-#{i}'></div>"}
403
+
404
+ %h3 Offset columns left push
405
+ %p Usage: <code>+column-offset-left-push(n, by)</code>
406
+ .sub-section
407
+ - (1..@num_columns - 1).to_a.reverse.each do |i|
408
+ ! #{"<div class='fn-col-offset-left-push-#{i}'></div>"}
409
+
410
+ %h3 Offset columns left full
411
+ %p Usage: <code>+column-offset-left-full(n, by)</code>
412
+ .sub-section
413
+ - (1..@num_columns - 1).to_a.reverse.each do |i|
414
+ ! #{"<div class='fn-col-offset-left-full-#{i}'></div>"}
415
+
416
+ %h3 Offset columns right
417
+ %p Usage: <code>+column-offset-right(n, by)</code>
418
+ .sub-section
419
+ - (1..@num_columns - 1).to_a.reverse.each do |i|
420
+ ! #{"<div class='fn-col-offset-right-#{i}'></div>"}
421
+
422
+ %h3 Offset columns right pull
423
+ %p Usage: <code>+column-offset-right-pull(n, by)</code>
424
+ .sub-section
425
+ - (1..@num_columns - 1).to_a.reverse.each do |i|
426
+ ! #{"<div class='fn-col-offset-right-pull-#{i}'></div>"}
427
+
428
+ %h3 Offset columns right push
429
+ %p Usage: <code>+column-offset-right-push(n, by)</code>
430
+ .sub-section
431
+ - (1..@num_columns - 1).to_a.reverse.each do |i|
432
+ ! #{"<div class='fn-col-offset-right-push-#{i}'></div>"}
433
+
434
+ %h3 Offset columns right full
435
+ %p Usage: <code>+column-offset-right-full(n, by)</code>
436
+ .sub-section
437
+ - (1..@num_columns - 1).to_a.reverse.each do |i|
438
+ ! #{"<div class='fn-col-offset-right-full-#{i}'></div>"}
439
+
440
+ %h3#nested Nested columns
441
+ %p Fishnet supports nested columns for all column types, but doesn't provide the concept of rows. To nest columns just roll a usual column and include a <code>micro clearfix</code> in what would be the row. Your nested columns need to pass the number of columns occupied by the row.
442
+ .sub-section
443
+ .nested-outer
444
+ .nested-inner-pull
445
+ .nested-inner-push
446
+ .nested-outer
447
+ .nested-inner-pull
448
+ .nested-inner-push
449
+
450
+ %pre.prettyprint
451
+ = preserve do
452
+ :escaped
453
+ // SASS
454
+ .nested-outer
455
+ +column(6)
456
+ +clearfixer
457
+ .nested-inner
458
+ +column(3,6)
459
+
460
+ %pre.prettyprint
461
+ = preserve do
462
+ :escaped
463
+ <!-- Markup -->
464
+ <section class="nested-outer">
465
+ <article class="nested-inner">...</article>
466
+ <article class="nested-inner">...</article>
467
+ </section>
468
+
469
+ .section
470
+ %h2.section-heading Resources
471
+ .well
472
+ %p &raquo; <a href="http://semantic.gs/">Semantic Grid System</a>
473
+ %p &raquo; <a href="http://sass-lang.com/">SASS</a>
474
+ %p &raquo; <a href="https://github.com/modeset/fishnet">Fishnet on Github</a>
475
+ %p &raquo; <a href="https://github.com/modeset/underoos">Underoos</a>
476
+
477
+ %p(style="margin-bottom:1em;")
478
+ %small Created by <a href="http://www.modeset.com/">Mode Set</a> / <a href="https://raw.github.com/modeset/fishnet/master/LICENSE">MIT Licensed</a>
479
+