roots-rails 0.0.1.alpha → 1.0.0
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 +0 -1
- data/lib/generators/roots/install_generator.rb +28 -12
- data/lib/generators/templates/layouts/_settings.styl +40 -0
- data/lib/generators/templates/layouts/application.css.styl +13 -0
- data/lib/generators/templates/layouts/layout.html.slim +26 -0
- data/lib/generators/templates/{scripts/pie.htc → pie.htc} +0 -0
- data/lib/roots/version.rb +1 -1
- data/readme.md +5 -13
- data/roots-rails.gemspec +2 -10
- metadata +13 -87
- data/Gemfile +0 -4
- data/lib/generators/roots/framework_generator.rb +0 -28
- 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 +0 -23
- data/lib/generators/templates/layouts/config.html.haml +0 -57
- data/lib/generators/templates/layouts/layout.html.haml +0 -26
- data/lib/generators/templates/sass/modules/_animation.sass +0 -454
- data/lib/generators/templates/sass/modules/_buttons.sass +0 -233
- data/lib/generators/templates/sass/modules/_code.sass +0 -41
- data/lib/generators/templates/sass/modules/_forms.sass +0 -209
- data/lib/generators/templates/sass/modules/_interaction.sass +0 -89
- data/lib/generators/templates/sass/modules/_reset.sass +0 -238
- data/lib/generators/templates/sass/modules/_tables.sass +0 -76
- data/lib/generators/templates/sass/modules/_typography.sass +0 -367
- data/lib/generators/templates/sass/modules/_ui.sass +0 -205
- data/lib/generators/templates/sass/modules/_utilities.sass +0 -372
- data/lib/generators/templates/sass/roots.sass +0 -54
- data/lib/generators/templates/scripts/selectivizr.js +0 -5
- data/vendor/assets/stylesheets/modules/_animation.sass +0 -454
- data/vendor/assets/stylesheets/modules/_buttons.sass +0 -233
- data/vendor/assets/stylesheets/modules/_code.sass +0 -41
- data/vendor/assets/stylesheets/modules/_fluid.sass +0 -160
- data/vendor/assets/stylesheets/modules/_forms.sass +0 -209
- data/vendor/assets/stylesheets/modules/_interaction.sass +0 -89
- data/vendor/assets/stylesheets/modules/_reset.sass +0 -238
- data/vendor/assets/stylesheets/modules/_tables.sass +0 -76
- data/vendor/assets/stylesheets/modules/_typography.sass +0 -367
- data/vendor/assets/stylesheets/modules/_ui.sass +0 -205
- data/vendor/assets/stylesheets/modules/_utilities.sass +0 -372
- data/vendor/assets/stylesheets/roots.sass +0 -57
@@ -1,233 +0,0 @@
|
|
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
|
@@ -1,41 +0,0 @@
|
|
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
|
@@ -1,160 +0,0 @@
|
|
1
|
-
// -----------------------------------------------------
|
2
|
-
// Better start drinking that kool aid
|
3
|
-
// -----------------------------------------------------
|
4
|
-
|
5
|
-
// Mixin: Img Scale
|
6
|
-
// Lay this down on an image and it will scale as it's container does. Great for mobile sites.
|
7
|
-
// ex. +img-scale
|
8
|
-
|
9
|
-
=img-scale
|
10
|
-
max-width: 100%
|
11
|
-
display: block
|
12
|
-
border: 0
|
13
|
-
height: auto
|
14
|
-
-ms-interpolation-mode: bicubic
|
15
|
-
|
16
|
-
// Mixin: Scale Image IE
|
17
|
-
// IE is an unfortunate situation, generally. Although it doesn't even typically respond to
|
18
|
-
// media queries or appear on mobile devices, if for some reason you need a scaling image, you
|
19
|
-
// can use this mixin. You have to pass the image path to it though.
|
20
|
-
// ex. +scale-image-ie(/images/sample.png)
|
21
|
-
|
22
|
-
=scale-image-ie($src)
|
23
|
-
background: none
|
24
|
-
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="#{image_url($src, true, false)}", sizingMethod="scale")
|
25
|
-
|
26
|
-
// Mixin: Border Box
|
27
|
-
// Border box sizing makes a whole ton of sense, especially when working with mobile layouts.
|
28
|
-
// This just implements border box sizing on an element. For more on this concept, check out
|
29
|
-
// http://paulirish.com/2012/box-sizing-border-box-ftw/
|
30
|
-
// ex. +border-box
|
31
|
-
|
32
|
-
=border-box
|
33
|
-
-webkit-box-sizing: border-box
|
34
|
-
-moz-box-sizing: border-box
|
35
|
-
box-sizing: border-box
|
36
|
-
|
37
|
-
// Mixin: When
|
38
|
-
// This is a very important mixin to understand and can be used to very easily implement mobile
|
39
|
-
// layouts. It is very flexible and rides on advanced sass features. Takes one parameter, which
|
40
|
-
// accepts a variety of things, as well as a content block.
|
41
|
-
|
42
|
-
// $at: Accepts 'phone', 'landscape', 'tablet', one number, or two numbers.
|
43
|
-
// if given one number, it will apply the block styles when the screen is that width or less
|
44
|
-
// if given two numbers, it will apply the block styles only when the width is between the two numbers.
|
45
|
-
|
46
|
-
// This mixin accepts a content block of styles indented below it, which it applies when it meets
|
47
|
-
// the conditions you specified in the parameters. See below for examples.
|
48
|
-
|
49
|
-
// ex. +when(phone)
|
50
|
-
// color: red
|
51
|
-
// ex. +when(tablet)
|
52
|
-
// color: red
|
53
|
-
// font-size: .8em
|
54
|
-
// ex. +when(800)
|
55
|
-
// width: 500px
|
56
|
-
// ex. +when(500 700)
|
57
|
-
// content: "OMG the dead zone!"
|
58
|
-
|
59
|
-
// Huge props to Chris Eppstein for the block feature in sass and the brilliant
|
60
|
-
// concepts that follow. Modified from https://gist.github.com/1215856
|
61
|
-
|
62
|
-
=when($at)
|
63
|
-
@if $at == phone
|
64
|
-
@media only screen and (max-width: 479px)
|
65
|
-
@content
|
66
|
-
@else if $at == landscape
|
67
|
-
@media only screen and (min-width: 480px) and (max-width: 767px)
|
68
|
-
@content
|
69
|
-
@else if $at == tablet
|
70
|
-
@media only screen and (min-width: 768px) and (max-width: 959px)
|
71
|
-
@content
|
72
|
-
@else if type-of($at) == number
|
73
|
-
@media only screen and (max-width: #{$at}px)
|
74
|
-
@content
|
75
|
-
@else if type-of($at) == list
|
76
|
-
@media only screen and (min-width: nth($at, 1)px) and (max-width: nth($at, 2)px)
|
77
|
-
@content
|
78
|
-
@else
|
79
|
-
@warn "The mixin doesn't want what you're servin up. Check the documentation for usage details"
|
80
|
-
|
81
|
-
// Mixin: Split
|
82
|
-
// This mixin is also extremely important to understand for quickly crafting up mobile layouts.
|
83
|
-
// It is to be used on a parent element, and will horizontally split it's children, make their widths
|
84
|
-
// fluid, and automatically rearrange them to be vertical at a certain width. This is the most common
|
85
|
-
// rearrangement pattern in mobile design, and this mixin should more or less replace floats.
|
86
|
-
|
87
|
-
// Example:
|
88
|
-
|
89
|
-
// **haml**
|
90
|
-
// #container
|
91
|
-
// .sidebar
|
92
|
-
// .content
|
93
|
-
|
94
|
-
// **sass**
|
95
|
-
// #container
|
96
|
-
// +split(25% 75%, 600)
|
97
|
-
|
98
|
-
// What this does is splits .sidebar and .content horizontally to the widths that were passed to +split,
|
99
|
-
// 25% and 75%. This is the percentage of the screen they will take up, so as it is resized smaller, these
|
100
|
-
// areas will flex. At one point, they will become too thin to look normal anymore, and this is where they
|
101
|
-
// should be rearranged to split vertically. The second argument passed (600) is the width at which they will
|
102
|
-
// switch to a normal block layout.
|
103
|
-
|
104
|
-
// Note that the first argument can take *as many percentages as you want* - it's not limited to two. Just
|
105
|
-
// make sure that the number of child divs matches the number of percentages passed.
|
106
|
-
|
107
|
-
// Also note that in order for the divs to behave correctly in this setup, the sizing has to be set to
|
108
|
-
// border-box. This means padding will not change the width, it will just pad the inside of the containers.
|
109
|
-
|
110
|
-
|
111
|
-
=split($params, $respond-at: 480)
|
112
|
-
$total-val: 0%
|
113
|
-
@for $i from 1 to length($params) + 1
|
114
|
-
// warn the user if they are over 100%
|
115
|
-
$total-val: $total-val + nth($params, $i)
|
116
|
-
@if $total-val > 100%
|
117
|
-
@warn "Your total was #{$total-val}. You should probably shoot for a total value under 100% if you want this to come out right"
|
118
|
-
// float em and set the widths
|
119
|
-
& > *:nth-child(#{$i})
|
120
|
-
float: left
|
121
|
-
width: nth($params, $i)
|
122
|
-
+border-box
|
123
|
-
+when($respond-at)
|
124
|
-
width: 100%
|
125
|
-
|
126
|
-
// Additive Mixin: Fluid Images
|
127
|
-
// WARNING: Creates classes in your css and styles them - not to be used inside an element.
|
128
|
-
// Makes images fluid when within <figure> elements. For any and all images, it's up to you
|
129
|
-
// to decide whether they are fluid or not.
|
130
|
-
|
131
|
-
=fluid-images
|
132
|
-
figure
|
133
|
-
position: relative
|
134
|
-
|
135
|
-
figure img, figure object, figure embed, figure video
|
136
|
-
+img-scale
|
137
|
-
|
138
|
-
img
|
139
|
-
border: 0
|
140
|
-
-ms-interpolation-mode: bicubic
|
141
|
-
|
142
|
-
// Additive Mixin: Responsive
|
143
|
-
// WARNING: Creates classes in your css and styles them - not to be used inside an element.
|
144
|
-
// Add fluid images to your page as well as a utility class for border-box elements, and a couple
|
145
|
-
// others that will employ common split patterns, see below.
|
146
|
-
|
147
|
-
=responsive
|
148
|
-
+fluid-images
|
149
|
-
.border-box
|
150
|
-
+border-box
|
151
|
-
.s50-50
|
152
|
-
+split(50% 50%)
|
153
|
-
.s25-75
|
154
|
-
+split(25% 75%)
|
155
|
-
.s75-25
|
156
|
-
+split(75% 25%)
|
157
|
-
.s25-50-25
|
158
|
-
+split(25% 50% 25%, 500)
|
159
|
-
|
160
|
-
|
@@ -1,209 +0,0 @@
|
|
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
|