roots-rails 0.0.1.alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.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,233 @@
|
|
1
|
+
// -----------------------------------------------------
|
2
|
+
// Buttons
|
3
|
+
// -----------------------------------------------------
|
4
|
+
// I realize that this is insane, but trust me, it's worth it
|
5
|
+
|
6
|
+
|
7
|
+
// Mixin: Gradient
|
8
|
+
// Takes two colors and outputs a vertical gradient that fades between the two colors.
|
9
|
+
// ex. +gradient(#EB8468, #BA6952)
|
10
|
+
|
11
|
+
// TODO: add option to change direction
|
12
|
+
|
13
|
+
=gradient($color1, $color2)
|
14
|
+
background-color: $color2
|
15
|
+
background-repeat: repeat-x
|
16
|
+
background-image: -moz-linear-gradient(top, $color1 0%, $color2 100%)
|
17
|
+
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, $color1), color-stop(100%, $color2))
|
18
|
+
background-image: -webkit-linear-gradient(top, $color1 0%, $color2 100%)
|
19
|
+
background-image: -o-linear-gradient(top, $color1 0%, $color2 100%)
|
20
|
+
background-image: -ms-linear-gradient(top, $color1 0%, $color2 100%)
|
21
|
+
background-image: linear-gradient(top, $color1 0%, $color2 100%)
|
22
|
+
-pie-background: linear-gradient(top, $color1 0%, $color2 100%)
|
23
|
+
behavior: asset-url('pie.htc', javascript)
|
24
|
+
|
25
|
+
// Mixin: Simple Gradient
|
26
|
+
// Takes one color and an optional strength. Darkens and lightens the color according to the strength
|
27
|
+
// and creates a gradient between those two values, the average being the originally passed color.
|
28
|
+
// Higher strength will result in a more strongly contrasted gradient
|
29
|
+
// ex. +simple-gradient(#EB8468)
|
30
|
+
// ex. +simple-gradient(#61D464, 20%)
|
31
|
+
|
32
|
+
=simple-gradient($color, $strength: 10%)
|
33
|
+
$start: lighten($color, $strength)
|
34
|
+
$end: darken($color, $strength)
|
35
|
+
+gradient($start, $end)
|
36
|
+
|
37
|
+
// Mixin: Noise Gradient
|
38
|
+
// Exactly the same as the gradient mixin, but overlays a very light noise to give it more texture.
|
39
|
+
// ex. +noise-gradient(#EB8468, #BA6952)
|
40
|
+
|
41
|
+
=noise-gradient($color1, $color2)
|
42
|
+
background: $color2
|
43
|
+
background: url(../img/noise.png) repeat, $color2 -moz-linear-gradient(top, $color1 0%, $color2 100%) repeat-x
|
44
|
+
background: url(../img/noise.png) repeat, $color2 -webkit-gradient(linear, left top, left bottom, color-stop(0%, $color1), color-stop(100%, $color2)) repeat-x
|
45
|
+
background: url(../img/noise.png) repeat, $color2 -webkit-linear-gradient(top, $color1 0%, $color2 100%) repeat-x
|
46
|
+
background: url(../img/noise.png) repeat, $color2 -o-linear-gradient(top, $color1 0%, $color2 100%) repeat-x
|
47
|
+
background: url(../img/noise.png) repeat, $color2 -ms-linear-gradient(top, $color1 0%, $color2 100%) repeat-x
|
48
|
+
background: url(../img/noise.png) repeat, $color2 linear-gradient(top, $color1 0%, $color2 100%) repeat-x
|
49
|
+
-pie-background: url(../img/noise.png) repeat, $color2 linear-gradient(top, $color1 0%, $color2 100%) repeat-x
|
50
|
+
behavior: asset-url('pie.htc', javascript)
|
51
|
+
|
52
|
+
// Mixin: Simple Noise Gradient
|
53
|
+
// Exactly like simple gradient, but overlays a very light noise to give it more texture.
|
54
|
+
// ex. +simple-noise-gradient(#EB8468, #BA6952)
|
55
|
+
|
56
|
+
=simple-noise-gradient($color, $strength: 10%)
|
57
|
+
$start: lighten($color, $strength)
|
58
|
+
$end: darken($color, $strength)
|
59
|
+
+noise-gradient($start, $end)
|
60
|
+
|
61
|
+
// Mixin: Hilight
|
62
|
+
// Adds a light brighter line across the top of the element for a perspective effect.
|
63
|
+
// Takes an optional argument for strength, which takes a value between 0 and 1
|
64
|
+
// ex. +hilight
|
65
|
+
// ex. +hilight(.7)
|
66
|
+
|
67
|
+
=hilight($strength: .3)
|
68
|
+
+box-shadow(inset 0 1px 0 rgba(255,255,255,$strength))
|
69
|
+
|
70
|
+
// This is an internal function used for the button mixins, not intended for use.
|
71
|
+
|
72
|
+
@function parse-size($size)
|
73
|
+
@if $size == small
|
74
|
+
@return 10
|
75
|
+
@else if $size == medium
|
76
|
+
@return 13
|
77
|
+
@else if $size == large
|
78
|
+
@return 18
|
79
|
+
@else if type-of($size) == number
|
80
|
+
@if unitless($size)
|
81
|
+
@return $size
|
82
|
+
@else
|
83
|
+
// eventually there should be a function here which allows it to take pixels and strips the "px" off the end
|
84
|
+
@warn "No units necessary, you can just pass a unitless number"
|
85
|
+
@else
|
86
|
+
@warn "You must pass small, medium, large, or a number to this mixin"
|
87
|
+
|
88
|
+
// Mixin: Simple Button
|
89
|
+
// Creates a very basic looking button style. Two optional params:
|
90
|
+
// - $color: Takes any color, defaults to the default global color
|
91
|
+
// - $size: Takes 'small', 'medium', 'large', or an integer. The numbers reflects the
|
92
|
+
// font size for the text inside the button, but scales all other aspects as well.
|
93
|
+
// ex. +simple-button
|
94
|
+
// ex. +simple-button($blue)
|
95
|
+
// ex. +simple-button(#D4513B)
|
96
|
+
// ex. +simple-button($green, large)
|
97
|
+
// ex. +simple-button(#4C82D4, 24)
|
98
|
+
|
99
|
+
// These will accept font icons interally in the very near future
|
100
|
+
|
101
|
+
=simple-button($color: $default, $size: medium)
|
102
|
+
|
103
|
+
// color detection and changes
|
104
|
+
$dark-text: if( lightness($color) < 60%, true, false )
|
105
|
+
$text-color: if( $dark-text, $white, #494949 )
|
106
|
+
|
107
|
+
// parse words, make sure it's a number
|
108
|
+
$size: parse-size($size)
|
109
|
+
|
110
|
+
// now that we've got numbers, let's work some proportions
|
111
|
+
$height: round($size*1.53)/2
|
112
|
+
$width: round(round($size*1.53)*2.2)/2
|
113
|
+
|
114
|
+
// dynamically calculated styles
|
115
|
+
font-size: #{$size}px
|
116
|
+
padding: #{$height}px #{$width}px
|
117
|
+
border-radius: #{round($size/4.33333)}px
|
118
|
+
background-color: $color
|
119
|
+
color: $text-color
|
120
|
+
color: rgba($text-color, .95)
|
121
|
+
|
122
|
+
// constant styles
|
123
|
+
cursor: pointer
|
124
|
+
font-weight: bold
|
125
|
+
font-family: $font-stack
|
126
|
+
line-height: 1
|
127
|
+
text-align: center
|
128
|
+
text-decoration: none
|
129
|
+
display: inline-block
|
130
|
+
|
131
|
+
&:hover, &:focus
|
132
|
+
background-color: darken($color, 5%)
|
133
|
+
color: darken($text-color, 3%)
|
134
|
+
color: rgba(darken($text-color, 3%), .95)
|
135
|
+
|
136
|
+
&:active
|
137
|
+
background-color: darken($color, 10%)
|
138
|
+
|
139
|
+
// Mixin: Button
|
140
|
+
// Creates a more fancy looking button style. Two optional params:
|
141
|
+
// - $color: Takes any color, defaults to the default global color
|
142
|
+
// - $size: Takes 'small', 'medium', 'large', or an integer. The numbers reflects the
|
143
|
+
// font size for the text inside the button, but scales all other aspects as well.
|
144
|
+
// ex. +button
|
145
|
+
// ex. +button($blue)
|
146
|
+
// ex. +button(#D4513B)
|
147
|
+
// ex. +button($green, large)
|
148
|
+
// ex. +button(#4C82D4, 24)
|
149
|
+
|
150
|
+
// These will accept font icons interally in the very near future
|
151
|
+
|
152
|
+
=button($color: $default, $size: medium)
|
153
|
+
|
154
|
+
// color detection and changes
|
155
|
+
$dark-text: if( lightness($color) < 60%, true, false )
|
156
|
+
$text-color: if( $dark-text, $white, #494949 )
|
157
|
+
$shadow-color: if( $dark-text, rgba(#000,.1), rgba(#fff,.3) )
|
158
|
+
$hover-color: if( $dark-text, rgba(#000,.2), rgba(#fff,.5) )
|
159
|
+
$down-shadow: if( $dark-text, 0 -1px 1px rgba(#000,.2), 1px 1px 1px rgba(#fff,.6) )
|
160
|
+
|
161
|
+
// parse words, make sure it's a number
|
162
|
+
$size: parse-size($size)
|
163
|
+
|
164
|
+
// now that we've got numbers, let's work some proportions
|
165
|
+
$height: round($size*1.53)/2
|
166
|
+
$width: round(round($size*1.53)*2.2)/2
|
167
|
+
|
168
|
+
// dynamically calculated styles
|
169
|
+
font-size: #{$size}px
|
170
|
+
padding: #{$height}px #{$width}px
|
171
|
+
border-radius: #{round($size/4.33333)}px
|
172
|
+
+simple-noise-gradient($color)
|
173
|
+
text-shadow: 1px 1px 1px $shadow-color
|
174
|
+
border: 1px solid darken($color, 10%)
|
175
|
+
color: $text-color
|
176
|
+
color: rgba($text-color, .95)
|
177
|
+
|
178
|
+
// constant styles
|
179
|
+
+hilight
|
180
|
+
cursor: pointer
|
181
|
+
font-weight: bold
|
182
|
+
font-family: $font-stack
|
183
|
+
line-height: 1
|
184
|
+
text-align: center
|
185
|
+
text-decoration: none
|
186
|
+
display: inline-block
|
187
|
+
|
188
|
+
&:hover, &:focus
|
189
|
+
background-position: 0 -#{$height}px
|
190
|
+
color: darken($text-color, 3%)
|
191
|
+
color: rgba(darken($text-color, 3%), .95)
|
192
|
+
text-shadow: 1px 1px 1px $hover-color
|
193
|
+
|
194
|
+
&:active
|
195
|
+
+box-shadow(inset 0 1px #{$size/2.6}px rgba(darken($color, 25%),.6))
|
196
|
+
text-shadow: $down-shadow
|
197
|
+
border-color: darken($color, 18%)
|
198
|
+
|
199
|
+
// Mixin: Button Disabled
|
200
|
+
// Add this mixin to a button and it will make the button appear to be disabled.
|
201
|
+
// Easiest to attach to a class like '.disabled' and add that class to the button.
|
202
|
+
// Takes no arguments.
|
203
|
+
// ex. .disabled
|
204
|
+
// +button-disabled
|
205
|
+
|
206
|
+
=button-disabled
|
207
|
+
background: #ccc
|
208
|
+
border-color: darken(#ccc, 10%)
|
209
|
+
opacity: .5
|
210
|
+
cursor: default
|
211
|
+
&:hover
|
212
|
+
background-position: 0 0
|
213
|
+
&:active
|
214
|
+
+box-shadow(none)
|
215
|
+
border-color: darken(#ccc, 10%)
|
216
|
+
text-shadow: 1px 1px 1px rgba(#000,.1)
|
217
|
+
|
218
|
+
// Additive Mixin: Buttons
|
219
|
+
// WARNING: Creates classes in your css and styles them - not to be used inside an element.
|
220
|
+
// This mixin makes it such that you can use classes to define buttons on your page.
|
221
|
+
// .btn-simple: creates a simple button
|
222
|
+
// .btn: creates a fancy button
|
223
|
+
// .disabled: disables an existing button (will only work on .btn and .btn-simple)
|
224
|
+
|
225
|
+
=buttons
|
226
|
+
.btn-simple
|
227
|
+
+transition(all .2s ease-in-out)
|
228
|
+
+simple-button($blue)
|
229
|
+
.btn
|
230
|
+
+transition(all .2s ease-in-out)
|
231
|
+
+button($blue)
|
232
|
+
.btn.disabled, .btn-simple.disabled
|
233
|
+
+button-disabled
|
@@ -0,0 +1,41 @@
|
|
1
|
+
// -----------------------------------------------------
|
2
|
+
// CODE
|
3
|
+
// -----------------------------------------------------
|
4
|
+
|
5
|
+
// Mixin: Code
|
6
|
+
// Styles inline code snippets on your page. Defaults to a beautiful red, but can be passed any color.
|
7
|
+
// ex. +code($blue)
|
8
|
+
// ex. +code(#7ED45F)
|
9
|
+
|
10
|
+
=code($color: #DF5C33)
|
11
|
+
padding: 3px 4px
|
12
|
+
color: $color
|
13
|
+
background-color: #F5F5F5
|
14
|
+
border: 1px solid #E1E1E8
|
15
|
+
border-radius: 3px
|
16
|
+
font-family: Menlo, Monaco, monospace
|
17
|
+
|
18
|
+
// Mixin: Pre
|
19
|
+
// Styles code blocks on your page. Sytanx hilighting to be included in the future.
|
20
|
+
// ex. +pre
|
21
|
+
|
22
|
+
=pre
|
23
|
+
display: block
|
24
|
+
padding: 7px
|
25
|
+
background-color: #F5F5F5
|
26
|
+
border: 1px solid #E1E1E8
|
27
|
+
border-radius: 3px
|
28
|
+
white-space: pre-wrap
|
29
|
+
word-break: break-all
|
30
|
+
font-family: Menlo, Monaco, monospace
|
31
|
+
line-height: 160%
|
32
|
+
|
33
|
+
// Additive Mixin: Code Blocks
|
34
|
+
// WARNING: Creates classes in your css and styles them - not to be used inside an element.
|
35
|
+
// Adds roots styles by default to <code> and <pre> tags.
|
36
|
+
|
37
|
+
=code-blocks
|
38
|
+
code
|
39
|
+
+code
|
40
|
+
pre
|
41
|
+
+pre
|
@@ -0,0 +1,209 @@
|
|
1
|
+
// -----------------------------------------------------
|
2
|
+
// Forms
|
3
|
+
// -----------------------------------------------------
|
4
|
+
|
5
|
+
// This module is the most severely lacking, just because I'm not totally sure how to
|
6
|
+
// handle it - forms are so different. It will probably end up with this basic functionality
|
7
|
+
// for custom forms as well as a mixin you can drop on a form and it will style it for you
|
8
|
+
// and take care of everything, for something more like an early prototype or back end.
|
9
|
+
|
10
|
+
// It will also contain the ability to append or prepend little icons to your inputs
|
11
|
+
|
12
|
+
// Mixin: Focus Glow
|
13
|
+
// Makes your inputs glow when focused. Takes a color - they will glow that color. Default color by default.
|
14
|
+
// ex. +focus-glow
|
15
|
+
// ex. +focus-glow($blue)
|
16
|
+
// ex. +focus-glow(#D45D86)
|
17
|
+
|
18
|
+
=focus-glow($color: $default)
|
19
|
+
&:focus
|
20
|
+
+box-shadow(0 0 5px rgba($color,.7))
|
21
|
+
border: 1px solid desaturate($color, 35%)
|
22
|
+
outline: none !important
|
23
|
+
|
24
|
+
// Mixin: Input
|
25
|
+
// A general purpose mixin for text inputs. Provides an nice attractive default style that's easily
|
26
|
+
// customizable. Takes a color as the first param and an optional width as the second.
|
27
|
+
// ex. +input
|
28
|
+
// ex. +input($purple)
|
29
|
+
// ex. +input(#D45D86, 400px)
|
30
|
+
|
31
|
+
=input($color: $light-blue, $width: 250px)
|
32
|
+
+box-shadow(inset 0 1px 1px rgba(#000, 0.1))
|
33
|
+
font-size: #{$font-size}px
|
34
|
+
font-family: $font-stack
|
35
|
+
font-size: 90%
|
36
|
+
+transition
|
37
|
+
border: solid 1px #bbb
|
38
|
+
border-radius: 2px
|
39
|
+
outline: none !important
|
40
|
+
padding: 4px 5px 4px // test this and make sure it's proportional at different sizes
|
41
|
+
background: #fff
|
42
|
+
color: #555
|
43
|
+
width: $width
|
44
|
+
text-shadow: 0 0 1px rgba(#fff, .1)
|
45
|
+
behavior: asset-url('pie.htc', javascript)
|
46
|
+
@if $color != false
|
47
|
+
+focus-glow($color)
|
48
|
+
@else
|
49
|
+
+box-shadow(none)
|
50
|
+
|
51
|
+
// Mixin: Input Search
|
52
|
+
// A search style input with rounded corners and an optional search icon at the end. Takes
|
53
|
+
// any color.
|
54
|
+
// ex. +input-search
|
55
|
+
// ex. +input-search($yellow)
|
56
|
+
// ex. +input-search
|
57
|
+
|
58
|
+
// TODO: Implement search icon option
|
59
|
+
|
60
|
+
// =field-search
|
61
|
+
// position: relative
|
62
|
+
// input
|
63
|
+
// +input-search
|
64
|
+
// &:after
|
65
|
+
// font: 16px roots-icons
|
66
|
+
// content: icon(arrow_down_alt1)
|
67
|
+
// display: block
|
68
|
+
// position: absolute
|
69
|
+
// top: 8px
|
70
|
+
// right: 8px
|
71
|
+
// opacity: .5
|
72
|
+
|
73
|
+
=input-search($color: $blue)
|
74
|
+
+input($color)
|
75
|
+
padding-left: 9px
|
76
|
+
+rounded
|
77
|
+
|
78
|
+
// Mixin: Input Disabled
|
79
|
+
// Makes your input appear to be disabled. Note that you also need to add 'disabled' to your
|
80
|
+
// html tag in order for it to actually be disabled.
|
81
|
+
// ex. +disabled
|
82
|
+
|
83
|
+
=input-disabled
|
84
|
+
cursor: not-allowed
|
85
|
+
background: #F5F5F5 !important
|
86
|
+
|
87
|
+
&:hover, &:focus
|
88
|
+
border-color: #bbb
|
89
|
+
+box-shadow(inset 0 1px 1px rgba(#000, 0.1))
|
90
|
+
|
91
|
+
// Mixin: Label
|
92
|
+
// Very basic label for your form. Pass it an optional display type to have it inline or block.
|
93
|
+
// ex. +label
|
94
|
+
|
95
|
+
=label($display: inline-block)
|
96
|
+
line-height: 1.5em
|
97
|
+
display: $display
|
98
|
+
|
99
|
+
// Mixin: Field
|
100
|
+
// Often times it's easier to wrap your input and label in a div called "field" so they can be
|
101
|
+
// floated, position, and manipulated without screwing up the rest of the form. That's what this
|
102
|
+
// mixin is for - put it on a div that contains a label and an input. Then feed it a direction to
|
103
|
+
// align (default is right), and an optional width.
|
104
|
+
// ex. +field
|
105
|
+
// ex. +field(left)
|
106
|
+
// ex. +field(right, 500px)
|
107
|
+
|
108
|
+
=field($direction: right, $width: 370px)
|
109
|
+
clear: both
|
110
|
+
margin-bottom: 5px
|
111
|
+
text-align: $direction
|
112
|
+
width: $width
|
113
|
+
|
114
|
+
// Mixin: Input Error
|
115
|
+
// When someone F'd it up, you gotta show them how it is. Put this on an input to make it clear
|
116
|
+
// that something bad is happening. Best implemented in a .error class or something similar.
|
117
|
+
// ex. input.error
|
118
|
+
// +input-error
|
119
|
+
|
120
|
+
=input-error($color: $red)
|
121
|
+
color: $color
|
122
|
+
border-color: $color
|
123
|
+
+focus-glow($color)
|
124
|
+
|
125
|
+
// Mixin: Field Error
|
126
|
+
// If you are wrapping labels and inputs in a field div, this makes life even easier. Makes the
|
127
|
+
// label text as well as the input field red.
|
128
|
+
// ex. .field.error
|
129
|
+
// +field-error
|
130
|
+
|
131
|
+
=field-error($color: $red)
|
132
|
+
color: $color
|
133
|
+
input
|
134
|
+
+input-error
|
135
|
+
|
136
|
+
// Mixin: Input Warning
|
137
|
+
// Ok, so maybe you didn't totally F it up, but at very least you deserve a warning. Well here it is.
|
138
|
+
// Best implemented in a .warning class or something similar.
|
139
|
+
// ex. input.warning
|
140
|
+
// +input-warning
|
141
|
+
|
142
|
+
=input-warning($color: $yellow)
|
143
|
+
color: $color
|
144
|
+
border-color: $color
|
145
|
+
+focus-glow($color)
|
146
|
+
|
147
|
+
// Mixin: Field Warning
|
148
|
+
// If you are wrapping labels and inputs in a field div, this makes life even easier. Makes the
|
149
|
+
// label text as well as the input field yellow.
|
150
|
+
// ex. .field.warning
|
151
|
+
// +field-warning
|
152
|
+
|
153
|
+
=field-warning($color: $yellow)
|
154
|
+
color: $color
|
155
|
+
input
|
156
|
+
+input-warning
|
157
|
+
|
158
|
+
// Mixin: Input Success
|
159
|
+
// http://cl.ly/F4Em/great-success.jpeg - Best implemented in a .success class or something similar.
|
160
|
+
// ex. input.success
|
161
|
+
// +input-success
|
162
|
+
|
163
|
+
=input-success($color: $green)
|
164
|
+
color: $color
|
165
|
+
border-color: $color
|
166
|
+
+focus-glow($color)
|
167
|
+
|
168
|
+
// Mixin: Field Success
|
169
|
+
// You're probably getting tired of this routine at this point. I'm sure you can imagine what this does.
|
170
|
+
// ex. .field.success
|
171
|
+
// +field-success
|
172
|
+
|
173
|
+
=field-success($color: $green)
|
174
|
+
color: $color
|
175
|
+
input
|
176
|
+
+input-success
|
177
|
+
|
178
|
+
// Additive Mixin: Fields
|
179
|
+
// WARNING: Creates classes in your css and styles them - not to be used inside an element.
|
180
|
+
// Add the field styles to .field as well as success, warning, and failure states. Also takes
|
181
|
+
// direction and width. Highly recommended mixin.
|
182
|
+
|
183
|
+
=fields($direction: right, $width: 370px)
|
184
|
+
.field
|
185
|
+
+field($direction, $width)
|
186
|
+
|
187
|
+
&.success
|
188
|
+
+field-success
|
189
|
+
&.warning
|
190
|
+
+field-warning
|
191
|
+
&.error
|
192
|
+
+field-error
|
193
|
+
|
194
|
+
// Additive Mixin: Forms
|
195
|
+
// WARNING: Creates classes in your css and styles them - not to be used inside an element.
|
196
|
+
// Adds nicer looking styles to all text inputs and textareas. Overrides the defaults.
|
197
|
+
|
198
|
+
=forms
|
199
|
+
input[type=text], input[type=email], input[type=number], input[type=date], input[type=time], input[type=datetime], textarea
|
200
|
+
+input
|
201
|
+
|
202
|
+
&.disabled
|
203
|
+
+input-disabled
|
204
|
+
&.success
|
205
|
+
+input-success
|
206
|
+
&.warning
|
207
|
+
+input-warning
|
208
|
+
&.error
|
209
|
+
+input-error
|