roots-rails 0.0.1.alpha
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +5 -0
- data/Gemfile +4 -0
- data/lib/generators/roots/framework_generator.rb +28 -0
- data/lib/generators/roots/install_generator.rb +36 -0
- data/lib/generators/templates/favicon.ico +0 -0
- data/lib/generators/templates/images/apple-touch-icon-114x114.png +0 -0
- data/lib/generators/templates/images/apple-touch-icon-72x72.png +0 -0
- data/lib/generators/templates/images/apple-touch-icon.png +0 -0
- data/lib/generators/templates/images/preview.png +0 -0
- data/lib/generators/templates/layouts/application.sass +23 -0
- data/lib/generators/templates/layouts/config.html.haml +57 -0
- data/lib/generators/templates/layouts/layout.html.haml +26 -0
- data/lib/generators/templates/noise.png +0 -0
- data/lib/generators/templates/sass/modules/_animation.sass +454 -0
- data/lib/generators/templates/sass/modules/_buttons.sass +233 -0
- data/lib/generators/templates/sass/modules/_code.sass +41 -0
- data/lib/generators/templates/sass/modules/_forms.sass +209 -0
- data/lib/generators/templates/sass/modules/_interaction.sass +89 -0
- data/lib/generators/templates/sass/modules/_reset.sass +238 -0
- data/lib/generators/templates/sass/modules/_tables.sass +76 -0
- data/lib/generators/templates/sass/modules/_typography.sass +367 -0
- data/lib/generators/templates/sass/modules/_ui.sass +205 -0
- data/lib/generators/templates/sass/modules/_utilities.sass +372 -0
- data/lib/generators/templates/sass/roots.sass +54 -0
- data/lib/generators/templates/scripts/pie.htc +96 -0
- data/lib/generators/templates/scripts/selectivizr.js +5 -0
- data/lib/roots.rb +6 -0
- data/lib/roots/engine.rb +6 -0
- data/lib/roots/version.rb +4 -0
- data/readme.md +24 -0
- data/roots-rails.gemspec +28 -0
- data/vendor/assets/stylesheets/modules/_animation.sass +454 -0
- data/vendor/assets/stylesheets/modules/_buttons.sass +233 -0
- data/vendor/assets/stylesheets/modules/_code.sass +41 -0
- data/vendor/assets/stylesheets/modules/_fluid.sass +160 -0
- data/vendor/assets/stylesheets/modules/_forms.sass +209 -0
- data/vendor/assets/stylesheets/modules/_interaction.sass +89 -0
- data/vendor/assets/stylesheets/modules/_reset.sass +238 -0
- data/vendor/assets/stylesheets/modules/_tables.sass +76 -0
- data/vendor/assets/stylesheets/modules/_typography.sass +367 -0
- data/vendor/assets/stylesheets/modules/_ui.sass +205 -0
- data/vendor/assets/stylesheets/modules/_utilities.sass +372 -0
- data/vendor/assets/stylesheets/roots.sass +57 -0
- metadata +132 -0
@@ -0,0 +1,89 @@
|
|
1
|
+
@import 'utilities'
|
2
|
+
|
3
|
+
// -----------------------------------------------------
|
4
|
+
// Interaction
|
5
|
+
// -----------------------------------------------------
|
6
|
+
|
7
|
+
// Mixin: Hover Darken
|
8
|
+
// Pass this a color and it will darken it. Defaults to text color, pass $bg makes the bgcolor darken.
|
9
|
+
// Optional percentage as the second param.
|
10
|
+
// ex. +darken($red)
|
11
|
+
// ex. +darken(#D45D86, 30%)
|
12
|
+
// ex. +darken($blue, $bg: true)
|
13
|
+
|
14
|
+
=hover-darken($color, $percentage: 15%, $bg: false)
|
15
|
+
&:hover
|
16
|
+
@if $bg
|
17
|
+
background-color: darken($color, $percentage)
|
18
|
+
@else
|
19
|
+
color: darken($color, $percentage)
|
20
|
+
|
21
|
+
// Mixin: Hover Lighten
|
22
|
+
// Works the same way as hover darken but lightens the color
|
23
|
+
|
24
|
+
=hover-lighten($color, $percentage: 15%, $bg: false)
|
25
|
+
&:hover
|
26
|
+
@if $bg
|
27
|
+
background-color: lighten($color, $percentage)
|
28
|
+
@else
|
29
|
+
color: lighten($color, $percentage)
|
30
|
+
|
31
|
+
// Mixin: Hover Underline
|
32
|
+
// This one is interesting, and may need tweaking to get it to work right on the
|
33
|
+
// intended element. Works very nicely for text, like in a span, and can animate.
|
34
|
+
// ex. +hover-underline
|
35
|
+
|
36
|
+
=hover-underline
|
37
|
+
border-bottom: 1px solid transparent
|
38
|
+
&:hover
|
39
|
+
border-bottom: 1px solid
|
40
|
+
|
41
|
+
// Mixin: Hover Pop
|
42
|
+
// On hover, your element pops out from the page. For scale, it takes an integer or float,
|
43
|
+
// 1 represents 100%, 2 is 200%, etc. Optionally can also rotate, pass it a number followed by
|
44
|
+
// "deg", like 180deg. If you pass true for shadow, it will animate in a drop shadow to add to
|
45
|
+
// the effect
|
46
|
+
// ex. +hover-pop(1.5)
|
47
|
+
// ex. +hover-pop(2.6, 90deg)
|
48
|
+
// ex. +hover-pop(1.2, 45deg, true)
|
49
|
+
// ex. +hover-pop(1.7, $shadow: true)
|
50
|
+
|
51
|
+
=hover-pop($scale, $rotate: false, $shadow: false)
|
52
|
+
@if $shadow
|
53
|
+
+box-shadow(0 0 1px transparent)
|
54
|
+
&:hover
|
55
|
+
position: relative
|
56
|
+
z-index: 10
|
57
|
+
-webkit-transform: scale($scale)
|
58
|
+
@if $shadow
|
59
|
+
+box-shadow(0 0 5px rgba(#000, .3))
|
60
|
+
@if $rotate
|
61
|
+
-webkit-transform: scale($scale) rotate($rotate)
|
62
|
+
|
63
|
+
// Mixin: Hover Fade
|
64
|
+
// On hover, fades the element's opacity down. Takes an amount as an integer between
|
65
|
+
// 0 and 1, like opacity normally does. Recommended to be used with transition.
|
66
|
+
// ex. +hover-fade(.5)
|
67
|
+
|
68
|
+
=hover-fade($amount)
|
69
|
+
&:hover
|
70
|
+
opacity: $amount
|
71
|
+
|
72
|
+
// Mixin: Hover Color
|
73
|
+
// Will swap an elements color or background color on hover. Takes a color in any format
|
74
|
+
// as the first argument, and a boolean indicating if you want it to be the background color
|
75
|
+
// as the second. Also recommended to be used with transition.
|
76
|
+
// ex. +hover-color(#D45D86)
|
77
|
+
// ex. +hover-color($red, true)
|
78
|
+
|
79
|
+
=hover-color($color, $bg: false)
|
80
|
+
&:hover
|
81
|
+
@if $bg
|
82
|
+
background-color: $color
|
83
|
+
@else
|
84
|
+
color: $color
|
85
|
+
|
86
|
+
// To add:
|
87
|
+
// *+click-down(pixels)*
|
88
|
+
// *+click-shadow(radius)*
|
89
|
+
// *+button-interaction(color)*
|
@@ -0,0 +1,238 @@
|
|
1
|
+
// ---------------------------------------
|
2
|
+
// COMPLETE RESET
|
3
|
+
// ---------------------------------------
|
4
|
+
|
5
|
+
// This should be used as the last mixin, +global-reset, almost exclusively.
|
6
|
+
// This is ported from Eric Meyer's html5 reset.
|
7
|
+
|
8
|
+
=reset-box-model
|
9
|
+
margin: 0
|
10
|
+
padding: 0
|
11
|
+
border: 0
|
12
|
+
|
13
|
+
=reset-font
|
14
|
+
font-size: 100%
|
15
|
+
font: inherit
|
16
|
+
vertical-align: baseline
|
17
|
+
|
18
|
+
=reset-focus
|
19
|
+
outline: 0
|
20
|
+
|
21
|
+
=reset-body
|
22
|
+
line-height: 1
|
23
|
+
|
24
|
+
=reset-list-style
|
25
|
+
list-style: none
|
26
|
+
|
27
|
+
=reset-table
|
28
|
+
border-collapse: collapse
|
29
|
+
border-spacing: 0
|
30
|
+
|
31
|
+
=reset-table-cell
|
32
|
+
text-align: left
|
33
|
+
font-weight: normal
|
34
|
+
vertical-align: middle
|
35
|
+
|
36
|
+
=reset-quotation
|
37
|
+
quotes: none
|
38
|
+
&:before, &:after
|
39
|
+
content: ""
|
40
|
+
content: none
|
41
|
+
|
42
|
+
=reset-image-anchor-border
|
43
|
+
border: none
|
44
|
+
|
45
|
+
=global-reset
|
46
|
+
html, body, div, span, applet, object, iframe,
|
47
|
+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
48
|
+
a, abbr, acronym, address, big, cite, code,
|
49
|
+
del, dfn, em, img, ins, kbd, q, s, samp,
|
50
|
+
small, strike, strong, sub, sup, tt, var,
|
51
|
+
b, u, i, center,
|
52
|
+
dl, dt, dd, ol, ul, li,
|
53
|
+
fieldset, form, label, legend,
|
54
|
+
table, caption, tbody, tfoot, thead, tr, th, td,
|
55
|
+
article, aside, canvas, details, embed,
|
56
|
+
figure, figcaption, footer, header, hgroup,
|
57
|
+
menu, nav, output, ruby, section, summary,
|
58
|
+
time, mark, audio, video
|
59
|
+
+reset-box-model
|
60
|
+
+reset-font
|
61
|
+
body
|
62
|
+
+reset-body
|
63
|
+
ol, ul
|
64
|
+
+reset-list-style
|
65
|
+
table
|
66
|
+
+reset-table
|
67
|
+
caption, th, td
|
68
|
+
+reset-table-cell
|
69
|
+
q, blockquote
|
70
|
+
+reset-quotation
|
71
|
+
a img
|
72
|
+
+reset-image-anchor-border
|
73
|
+
|
74
|
+
// ---------------------------------------
|
75
|
+
// NORMALIZE
|
76
|
+
// ---------------------------------------
|
77
|
+
|
78
|
+
// Direct port from http://github.com/necolas/normalize.css
|
79
|
+
|
80
|
+
=normalize
|
81
|
+
article, aside, details, figcaption, figure, footer, header, hgroup, nav, section
|
82
|
+
display: block
|
83
|
+
|
84
|
+
audio, canvas, video
|
85
|
+
display: inline-block
|
86
|
+
*display: inline
|
87
|
+
*zoom: 1
|
88
|
+
|
89
|
+
audio:not([controls])
|
90
|
+
display: none
|
91
|
+
|
92
|
+
[hidden]
|
93
|
+
display: none
|
94
|
+
|
95
|
+
html
|
96
|
+
font-size: 100%
|
97
|
+
overflow-y: scroll
|
98
|
+
-webkit-text-size-adjust: 100%
|
99
|
+
-ms-text-size-adjust: 100%
|
100
|
+
|
101
|
+
body
|
102
|
+
margin: 0
|
103
|
+
|
104
|
+
body, button, input, select, textarea
|
105
|
+
font-family: sans-serif
|
106
|
+
|
107
|
+
a
|
108
|
+
&:focus
|
109
|
+
outline: thin dotted
|
110
|
+
|
111
|
+
&:hover, &:active
|
112
|
+
outline: 0
|
113
|
+
|
114
|
+
h1
|
115
|
+
font-size: 2em
|
116
|
+
|
117
|
+
abbr[title]
|
118
|
+
border-bottom: 1px dotted
|
119
|
+
|
120
|
+
b, strong
|
121
|
+
font-weight: bold
|
122
|
+
|
123
|
+
blockquote
|
124
|
+
margin: 1em 40px
|
125
|
+
|
126
|
+
dfn
|
127
|
+
font-style: italic
|
128
|
+
|
129
|
+
mark
|
130
|
+
background: #ff0
|
131
|
+
color: #000
|
132
|
+
|
133
|
+
pre, code, kbd, samp
|
134
|
+
font-family: monospace, serif
|
135
|
+
_font-family: 'Courier New', monospace
|
136
|
+
font-size: 1em
|
137
|
+
|
138
|
+
pre
|
139
|
+
white-space: pre
|
140
|
+
white-space: pre-wrap
|
141
|
+
word-wrap: break-word
|
142
|
+
|
143
|
+
q
|
144
|
+
quotes: none
|
145
|
+
|
146
|
+
&:before, &:after
|
147
|
+
content: ''
|
148
|
+
content: none
|
149
|
+
|
150
|
+
small
|
151
|
+
font-size: 75%
|
152
|
+
|
153
|
+
sub, sup
|
154
|
+
font-size: 75%
|
155
|
+
line-height: 0
|
156
|
+
position: relative
|
157
|
+
vertical-align: baseline
|
158
|
+
|
159
|
+
sup
|
160
|
+
top: -0.5em
|
161
|
+
|
162
|
+
sub
|
163
|
+
bottom: -0.25em
|
164
|
+
|
165
|
+
ul, ol
|
166
|
+
margin-left: 0
|
167
|
+
padding: 0 0 0 40px
|
168
|
+
|
169
|
+
dd
|
170
|
+
margin: 0 0 0 40px
|
171
|
+
|
172
|
+
nav
|
173
|
+
ul, ol
|
174
|
+
list-style: none
|
175
|
+
list-style-image: none
|
176
|
+
|
177
|
+
|
178
|
+
img
|
179
|
+
border: 0
|
180
|
+
-ms-interpolation-mode: bicubic
|
181
|
+
|
182
|
+
svg:not(:root)
|
183
|
+
overflow: hidden
|
184
|
+
|
185
|
+
figure
|
186
|
+
margin: 0
|
187
|
+
|
188
|
+
form
|
189
|
+
margin: 0
|
190
|
+
|
191
|
+
fieldset
|
192
|
+
border: 1px solid #c0c0c0
|
193
|
+
margin: 0 2px
|
194
|
+
padding: 0.35em 0.625em 0.75em
|
195
|
+
|
196
|
+
legend
|
197
|
+
border: 0
|
198
|
+
*margin-left: -7px
|
199
|
+
|
200
|
+
button, input, select, textarea
|
201
|
+
font-size: 100%
|
202
|
+
margin: 0
|
203
|
+
vertical-align: baseline
|
204
|
+
*vertical-align: middle
|
205
|
+
|
206
|
+
button, input
|
207
|
+
line-height: normal
|
208
|
+
|
209
|
+
button, input[type='button'], input[type='reset'], input[type='submit']
|
210
|
+
cursor: pointer
|
211
|
+
-webkit-appearance: button
|
212
|
+
*overflow: visible
|
213
|
+
|
214
|
+
input
|
215
|
+
&[type="checkbox"], &[type="radio"]
|
216
|
+
box-sizing: border-box
|
217
|
+
padding: 0
|
218
|
+
|
219
|
+
&[type="search"]
|
220
|
+
-webkit-appearance: textfield
|
221
|
+
-moz-box-sizing: content-box
|
222
|
+
-webkit-box-sizing: content-box
|
223
|
+
box-sizing: content-box
|
224
|
+
|
225
|
+
&::-webkit-search-decoration
|
226
|
+
-webkit-appearance: none
|
227
|
+
|
228
|
+
button::-moz-focus-inner, input::-moz-focus-inner
|
229
|
+
border: 0
|
230
|
+
padding: 0
|
231
|
+
|
232
|
+
textarea
|
233
|
+
overflow: auto
|
234
|
+
vertical-align: top
|
235
|
+
|
236
|
+
table
|
237
|
+
border-collapse: collapse
|
238
|
+
border-spacing: 0
|
@@ -0,0 +1,76 @@
|
|
1
|
+
// Mixin: Table
|
2
|
+
// Ported directly from Twitter Bootstrap, as they did an excellent job with the tables.
|
3
|
+
// Take three fairly self-explanitory arguments, all boolean. 1st makes the table bordered,
|
4
|
+
// 2nd adds zebra striping, and the 3rd indiated whether the table is condensed or not.
|
5
|
+
|
6
|
+
// TODO: Add options to customize colors
|
7
|
+
|
8
|
+
=table($border: true, $striped: true, $condensed: false)
|
9
|
+
|
10
|
+
max-width: 100%
|
11
|
+
border-collapse: collapse
|
12
|
+
border-spacing: 0
|
13
|
+
width: 100%
|
14
|
+
margin-bottom: 18px
|
15
|
+
|
16
|
+
th, td
|
17
|
+
padding: 8px
|
18
|
+
line-height: 18px
|
19
|
+
text-align: left
|
20
|
+
vertical-align: top
|
21
|
+
border-top: 1px solid #ddd
|
22
|
+
|
23
|
+
th
|
24
|
+
font-weight: bold
|
25
|
+
|
26
|
+
thead th
|
27
|
+
vertical-align: bottom
|
28
|
+
|
29
|
+
thead:first-child tr th, thead:first-child tr td
|
30
|
+
border-top: 0
|
31
|
+
|
32
|
+
tbody + tbody
|
33
|
+
border-top: 2px solid #ddd
|
34
|
+
|
35
|
+
@if $condensed
|
36
|
+
th, td
|
37
|
+
padding: 4px 5px
|
38
|
+
|
39
|
+
@if $border
|
40
|
+
border: 1px solid #ddd
|
41
|
+
border-collapse: separate
|
42
|
+
*border-collapse: collapsed
|
43
|
+
+round(4px)
|
44
|
+
|
45
|
+
th + th, td + td, th + td, td + th
|
46
|
+
border-left: 1px solid #ddd
|
47
|
+
|
48
|
+
thead:first-child tr:first-child th, tbody:first-child tr:first-child th, tbody:first-child tr:first-child td
|
49
|
+
border-top: 0
|
50
|
+
|
51
|
+
thead:first-child tr:first-child th:first-child, tbody:first-child tr:first-child td:first-child
|
52
|
+
+round(4px 0 0 0)
|
53
|
+
|
54
|
+
thead:first-child tr:first-child th:last-child, tbody:first-child tr:first-child td:last-child
|
55
|
+
+round(0 4px 0 0)
|
56
|
+
|
57
|
+
thead:last-child tr:last-child th:first-child, tbody:last-child tr:last-child td:first-child
|
58
|
+
+round(0 0 0 4px)
|
59
|
+
|
60
|
+
thead:last-child tr:last-child th:last-child, tbody:last-child tr:last-child td:last-child
|
61
|
+
+round(0 0 4px 0)
|
62
|
+
|
63
|
+
@if $striped
|
64
|
+
tbody tr:nth-child(odd) td, tbody tr:nth-child(odd) th
|
65
|
+
background-color: #f9f9f9
|
66
|
+
|
67
|
+
tbody tr:hover td, tbody tr:hover th
|
68
|
+
background-color: #f5f5f5
|
69
|
+
|
70
|
+
// Additive Mixin: Tables
|
71
|
+
// WARNING: Creates classes in your css and styles them - not to be used inside an element.
|
72
|
+
// Makes tables look awesome by default. Highly recommended if you have tables on your site at all.
|
73
|
+
|
74
|
+
=tables
|
75
|
+
table
|
76
|
+
+table
|
@@ -0,0 +1,367 @@
|
|
1
|
+
// -----------------------------------------------------
|
2
|
+
// Typography
|
3
|
+
// -----------------------------------------------------
|
4
|
+
|
5
|
+
// Mixin: Text Margin
|
6
|
+
// Pass this guy a font size (pixels - no units) and he will apply margins to the element at a ratio
|
7
|
+
// most pleasing to the gods.
|
8
|
+
// ex. +text-margin(14)
|
9
|
+
|
10
|
+
=text-margin($size)
|
11
|
+
margin: #{$size/1.2}px 0
|
12
|
+
|
13
|
+
// Mixin: P
|
14
|
+
// Takes care of all your paragraph needs. Pass it an optional size and it will
|
15
|
+
// do some golden ratio math and give you a nice line height. Pass it a width and it will
|
16
|
+
// be even more accurate. And you can turn off margins if you'd like too.
|
17
|
+
|
18
|
+
// math via http://www.pearsonified.com/2011/12/golden-ratio-typography.php
|
19
|
+
|
20
|
+
// ex. +p
|
21
|
+
// ex. +p(18)
|
22
|
+
// ex. +p(14, true, 500px)
|
23
|
+
|
24
|
+
=p($size: $font-size, $margins: true, $width: false)
|
25
|
+
|
26
|
+
$gr: 1.61803399
|
27
|
+
$height: $size * $gr
|
28
|
+
|
29
|
+
@if $width
|
30
|
+
$height: $gr - (1 / (2 * $gr)) * (1 - $width / ($width * $gr))
|
31
|
+
width: $width
|
32
|
+
|
33
|
+
@if $margins
|
34
|
+
+text-margin($size)
|
35
|
+
|
36
|
+
line-height: #{round($height)}px
|
37
|
+
font-size: $size + px
|
38
|
+
font-size: $size*.0615384 + rem // this is questionable, so be careful
|
39
|
+
|
40
|
+
// Mixin: Size
|
41
|
+
// An alias for 'font-size'
|
42
|
+
// ex. +size(16px)
|
43
|
+
|
44
|
+
=size($size)
|
45
|
+
font-size: $size
|
46
|
+
|
47
|
+
// Mixin: Fs
|
48
|
+
// An alias for 'font-size'
|
49
|
+
// ex. +size(16px)
|
50
|
+
|
51
|
+
=fs($size)
|
52
|
+
font-size: $size
|
53
|
+
|
54
|
+
// Mixin: Uppercase
|
55
|
+
// An alias for 'text-transform: uppercase'
|
56
|
+
// ex. +uppercase
|
57
|
+
|
58
|
+
=uppercase
|
59
|
+
text-transform: uppercase
|
60
|
+
|
61
|
+
// Mixin: Upcase
|
62
|
+
// An alias for 'text-transform: uppercase'
|
63
|
+
// ex. +upcase
|
64
|
+
|
65
|
+
=upcase
|
66
|
+
+uppercase
|
67
|
+
|
68
|
+
// Mixin: Lowercase
|
69
|
+
// An alias for 'text-transform: lowercase'
|
70
|
+
// ex. +lowercase
|
71
|
+
|
72
|
+
=lowercase
|
73
|
+
text-transform: lowercase
|
74
|
+
|
75
|
+
// Mixin: Downcase
|
76
|
+
// An alias for 'text-transform: lowercase'
|
77
|
+
// ex. +downcase
|
78
|
+
|
79
|
+
=downcase
|
80
|
+
+lowercase
|
81
|
+
|
82
|
+
// Mixin: Small
|
83
|
+
// Makes your text smaller and a little lighter. Great on <small /> tags.
|
84
|
+
// ex. +small
|
85
|
+
|
86
|
+
=small
|
87
|
+
font-size: 55%
|
88
|
+
opacity: .6
|
89
|
+
font-weight: normal
|
90
|
+
|
91
|
+
// Internal Mixin: Heading
|
92
|
+
// For internal use within headings
|
93
|
+
|
94
|
+
=heading($color: #333)
|
95
|
+
color: $color
|
96
|
+
text-rendering: optimizelegibility
|
97
|
+
font-weight: bold
|
98
|
+
|
99
|
+
// Internal Mixin: Heading Size
|
100
|
+
// Gives your headings ratios custom crafted in house from the finest stock of mathematics.
|
101
|
+
// Feed it a size and it will get you rem and some nice header-y margins.
|
102
|
+
|
103
|
+
=heading-size($size)
|
104
|
+
font-size: $size + px
|
105
|
+
font-size: $size*.0615384 + rem // this is questionable
|
106
|
+
+text-margin($size/2)
|
107
|
+
|
108
|
+
// Mixin Set: h1, h2, h3, h4, h5, h6
|
109
|
+
// These provide nice defaults for headings based off the default font size.
|
110
|
+
// The can scale infinitely, and work best when matched to their corresponding html elements.
|
111
|
+
// ex. +h3
|
112
|
+
|
113
|
+
=h1
|
114
|
+
+heading
|
115
|
+
+heading-size($font-size*2.4)
|
116
|
+
line-height: 1.2em
|
117
|
+
|
118
|
+
=h2
|
119
|
+
+heading
|
120
|
+
+heading-size($font-size*1.8)
|
121
|
+
line-height: 1.2em
|
122
|
+
|
123
|
+
=h3
|
124
|
+
+heading
|
125
|
+
+heading-size($font-size*1.5)
|
126
|
+
line-height: 1.2em
|
127
|
+
|
128
|
+
=h4
|
129
|
+
+heading
|
130
|
+
+heading-size($font-size*1.3)
|
131
|
+
line-height: 1.2em
|
132
|
+
|
133
|
+
=h5
|
134
|
+
+heading
|
135
|
+
+heading-size($font-size)
|
136
|
+
line-height: 1.2em
|
137
|
+
|
138
|
+
=h6
|
139
|
+
+heading
|
140
|
+
+heading-size($font-size*.9)
|
141
|
+
text-transform: uppercase
|
142
|
+
line-height: 1.2em
|
143
|
+
|
144
|
+
// Mixin: Link
|
145
|
+
// A nice default style for links. Accepts a color and a style. Color can be anything,
|
146
|
+
// style can be underline, darken, lighten, or glow, each giving it a different style
|
147
|
+
// of interaction when hovered. More suggestions here welcome.
|
148
|
+
// ex. +link
|
149
|
+
// ex. +link($green)
|
150
|
+
// ex. +link(#57777E, glow)
|
151
|
+
|
152
|
+
=link($color: $blue, $style: underline)
|
153
|
+
color: $color
|
154
|
+
text-decoration: none
|
155
|
+
+transition
|
156
|
+
@if $style == underline
|
157
|
+
+hover-darken($color)
|
158
|
+
+hover-underline
|
159
|
+
@else if $style == darken
|
160
|
+
+hover-darken($color, 20%)
|
161
|
+
@else if $style == lighten
|
162
|
+
+hover-lighten($color)
|
163
|
+
@else if $style == glow
|
164
|
+
&:hover
|
165
|
+
text-shadow: 0 0 7px rgba($color, .6)
|
166
|
+
&:visited
|
167
|
+
opacity: .8
|
168
|
+
|
169
|
+
// Mixin: Reset Link
|
170
|
+
// Sometimes my link mixin of the browser defaults will give you questionable link defaults
|
171
|
+
// that you don't want on certain elements. This guy gets rid of that.
|
172
|
+
// ex. +reset-link
|
173
|
+
|
174
|
+
=reset-link
|
175
|
+
color: inherit
|
176
|
+
border: none
|
177
|
+
text-decoration: none
|
178
|
+
&:hover
|
179
|
+
color: inherit
|
180
|
+
border: none
|
181
|
+
text-decoration: none
|
182
|
+
&:visited
|
183
|
+
opacity: 1
|
184
|
+
|
185
|
+
// Mixin: Text Selection
|
186
|
+
// This guy sets the text select color intelligently based on the $hilight-color variable
|
187
|
+
// found in _roots.sass. If you really want, you can pass it a color override too
|
188
|
+
// ex. +text-selection()
|
189
|
+
|
190
|
+
=text-selection($color: $hilight-color)
|
191
|
+
|
192
|
+
$dark-text: if( lightness($color) < 60%, true, false )
|
193
|
+
$text-color: if( $dark-text, $white, #494949 )
|
194
|
+
|
195
|
+
::-moz-selection
|
196
|
+
background: $color
|
197
|
+
color: $text-color
|
198
|
+
::selection
|
199
|
+
background: $color
|
200
|
+
color: $text-color
|
201
|
+
|
202
|
+
// Mixin: Ul
|
203
|
+
// A nice default for list styles. More or less the same as browser defaults, scales nicely.
|
204
|
+
// You can pass it any style that list-style-type would normally take. Defaults to disc.
|
205
|
+
// Use this on a ul element por favor.
|
206
|
+
// ex. +ul
|
207
|
+
// ex. +ul(square)
|
208
|
+
|
209
|
+
=ul($style: disc)
|
210
|
+
margin: 5px 15px
|
211
|
+
padding-left: 1em
|
212
|
+
li
|
213
|
+
list-style-type: $style
|
214
|
+
padding: 2px 0
|
215
|
+
|
216
|
+
// Mixin: Ol
|
217
|
+
// A nice default for list styles. More or less the same as browser defaults, scales nicely.
|
218
|
+
// You can pass it any style that list-style-type would normally take. Defaults to decimal.
|
219
|
+
// Use this on a ol element por favor.
|
220
|
+
// ex. +ol
|
221
|
+
// ex. +ol(upper-roman)
|
222
|
+
|
223
|
+
=ol($style: decimal)
|
224
|
+
margin: 5px 18px
|
225
|
+
padding-left: 1em
|
226
|
+
li
|
227
|
+
list-style-type: $style
|
228
|
+
padding: 2px 0
|
229
|
+
|
230
|
+
// Mixin: Inline List
|
231
|
+
// For when you need your list to be horizontal. Pass it the spacing you want between list
|
232
|
+
// elements, whatever units you'd like. Defaults to 20px
|
233
|
+
// ex. +inline-list
|
234
|
+
// ex. +inline-list(15px)
|
235
|
+
|
236
|
+
=inline-list($spacing: 20px)
|
237
|
+
+group
|
238
|
+
margin: 0
|
239
|
+
padding: 0
|
240
|
+
li
|
241
|
+
float: left
|
242
|
+
margin-right: $spacing
|
243
|
+
list-style-type: none
|
244
|
+
li:last-child
|
245
|
+
margin-right: 0
|
246
|
+
|
247
|
+
// Mixin: Reset List
|
248
|
+
// If you're tired of all the list shenanigans and want to get rid of them for this special
|
249
|
+
// list you're working on, this is your guy. Resets the margins, padding, and style.
|
250
|
+
// ex. +reset-list
|
251
|
+
|
252
|
+
=reset-list
|
253
|
+
margin: 0
|
254
|
+
padding: 0
|
255
|
+
li
|
256
|
+
list-style-type: none
|
257
|
+
padding: 0
|
258
|
+
margin: 0
|
259
|
+
|
260
|
+
// Mixin: Blockquote
|
261
|
+
// Nice styles for a blockquote, and even puts a nice hyphen in before your citation.
|
262
|
+
// Use with a <p> and <cite> inside for best results.
|
263
|
+
// ex. +blockquote
|
264
|
+
|
265
|
+
// TODO: Add a couple different styles here
|
266
|
+
|
267
|
+
=blockquote
|
268
|
+
p
|
269
|
+
font-weight: 300
|
270
|
+
font-size: 127%
|
271
|
+
line-height: 127%
|
272
|
+
cite
|
273
|
+
color: #888888
|
274
|
+
&:before
|
275
|
+
content: '\2014'
|
276
|
+
|
277
|
+
// -----------------------------------------------------
|
278
|
+
// Mixins that add styles to tags on your page actively
|
279
|
+
// -----------------------------------------------------
|
280
|
+
|
281
|
+
// Additive Mixin: Base
|
282
|
+
// WARNING: Creates classes in your css and styles them - not to be used inside an element.
|
283
|
+
// This is an essential mixin. You want this on your page. Sets your font stack,
|
284
|
+
// size, and colors based on the settings file and makes sure that your text is a great looking
|
285
|
+
// as possible. You can override any of the params, but there is really no reason to.
|
286
|
+
// ex. +base
|
287
|
+
|
288
|
+
=base($fonts: $font-stack, $size: $font-size, $color: $font-color)
|
289
|
+
body
|
290
|
+
font-family: $fonts
|
291
|
+
font-size: #{$size*6.46}unquote("%")
|
292
|
+
font-size: #{$size}px
|
293
|
+
color: $color
|
294
|
+
-webkit-font-smoothing: antialiased
|
295
|
+
-webkit-text-size-adjust: 100%
|
296
|
+
-ms-text-size-adjust: 100%
|
297
|
+
|
298
|
+
// Additive Mixin: Headers
|
299
|
+
// WARNING: Creates classes in your css and styles them - not to be used inside an element.
|
300
|
+
// Adds roots' wonderful scaling header styles to your <hx> tags.
|
301
|
+
// ex. +headers
|
302
|
+
|
303
|
+
=headers
|
304
|
+
h1
|
305
|
+
+h1
|
306
|
+
|
307
|
+
h2
|
308
|
+
+h2
|
309
|
+
|
310
|
+
h3
|
311
|
+
+h3
|
312
|
+
|
313
|
+
h4
|
314
|
+
+h4
|
315
|
+
|
316
|
+
h5
|
317
|
+
+h5
|
318
|
+
|
319
|
+
h6
|
320
|
+
+h6
|
321
|
+
|
322
|
+
// Additive Mixin: Lists
|
323
|
+
// WARNING: Creates classes in your css and styles them - not to be used inside an element.
|
324
|
+
// Adds roots styles to ul and ols.
|
325
|
+
// ex. +lists
|
326
|
+
|
327
|
+
=lists
|
328
|
+
ul
|
329
|
+
+ul
|
330
|
+
ol
|
331
|
+
+ol
|
332
|
+
|
333
|
+
// Additive Mixin: Bold-Italic
|
334
|
+
// WARNING: Creates classes in your css and styles them - not to be used inside an element.
|
335
|
+
// Adds in bold and italic styles to the right tags if you did a page reset.
|
336
|
+
// ex. +bold-italic
|
337
|
+
|
338
|
+
=bold-italic
|
339
|
+
b
|
340
|
+
+bold
|
341
|
+
i
|
342
|
+
+italic
|
343
|
+
strong
|
344
|
+
+bold
|
345
|
+
em
|
346
|
+
+italic
|
347
|
+
|
348
|
+
// Additive Mixin: Typography
|
349
|
+
// WARNING: Creates classes in your css and styles them - not to be used inside an element.
|
350
|
+
// Adds roots styles to bold and italic elements, headers, paragrapgs, small text, links, lists,
|
351
|
+
// and blockquotes. Got all your basic elements covered.
|
352
|
+
// ex. +typography
|
353
|
+
|
354
|
+
=typography
|
355
|
+
+bold-italic
|
356
|
+
+headers
|
357
|
+
+text-selection
|
358
|
+
+lists
|
359
|
+
|
360
|
+
p
|
361
|
+
+p($font-size)
|
362
|
+
small
|
363
|
+
+small
|
364
|
+
a
|
365
|
+
+link
|
366
|
+
blockquote
|
367
|
+
+blockquote
|