primordial 0.0.1
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 +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +25 -0
- data/README.md +29 -0
- data/Rakefile +1 -0
- data/app/assets/stylesheets/primordial.css.sass +24 -0
- data/app/assets/stylesheets/primordial/components/_alerts.css.sass +57 -0
- data/app/assets/stylesheets/primordial/components/_breadcrumbs.css.sass +21 -0
- data/app/assets/stylesheets/primordial/components/_button-groups.css.sass +212 -0
- data/app/assets/stylesheets/primordial/components/_buttons.css.sass +114 -0
- data/app/assets/stylesheets/primordial/components/_close.css.sass +30 -0
- data/app/assets/stylesheets/primordial/components/_forms.css.sass +332 -0
- data/app/assets/stylesheets/primordial/components/_input-groups.css.sass +119 -0
- data/app/assets/stylesheets/primordial/components/_labels.css.sass +48 -0
- data/app/assets/stylesheets/primordial/components/_lists.css.sass +44 -0
- data/app/assets/stylesheets/primordial/components/_media-object.css.sass +47 -0
- data/app/assets/stylesheets/primordial/components/_nav.css.sass +80 -0
- data/app/assets/stylesheets/primordial/components/_navbar.css.sass +274 -0
- data/app/assets/stylesheets/primordial/components/_pagination.css.sass +58 -0
- data/app/assets/stylesheets/primordial/components/_tables.css.sass +78 -0
- data/app/assets/stylesheets/primordial/core/_base.css.sass +59 -0
- data/app/assets/stylesheets/primordial/core/_mixins.css.sass +754 -0
- data/app/assets/stylesheets/primordial/core/_normalize.css.sass +365 -0
- data/app/assets/stylesheets/primordial/core/_typography.css.sass +198 -0
- data/app/assets/stylesheets/primordial/core/_variables.css.sass +563 -0
- data/lib/primordial.rb +14 -0
- data/lib/primordial/engine.rb +4 -0
- data/lib/primordial/version.rb +3 -0
- data/primordial.gemspec +26 -0
- metadata +139 -0
@@ -0,0 +1,58 @@
|
|
1
|
+
//
|
2
|
+
// Pagination (multiple pages)
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
@if $use-pagination == true
|
6
|
+
|
7
|
+
.pagination
|
8
|
+
display: inline-block
|
9
|
+
padding-left: 0
|
10
|
+
margin: $line-height-computed 0
|
11
|
+
border-radius: $border-radius-base
|
12
|
+
> li
|
13
|
+
display: inline
|
14
|
+
// Remove list-style and block-level defaults
|
15
|
+
> a,
|
16
|
+
> span
|
17
|
+
position: relative
|
18
|
+
float: left
|
19
|
+
// Collapse white-space
|
20
|
+
padding: $padding-base-vertical $padding-base-horizontal
|
21
|
+
line-height: $line-height-base
|
22
|
+
text-decoration: none
|
23
|
+
background-color: $pagination-bg
|
24
|
+
border: 1px solid $pagination-border
|
25
|
+
margin-left: -1px
|
26
|
+
&:first-child
|
27
|
+
> a,
|
28
|
+
> span
|
29
|
+
margin-left: 0
|
30
|
+
+border-left-radius($border-radius-base)
|
31
|
+
&:last-child
|
32
|
+
> a,
|
33
|
+
> span
|
34
|
+
+border-right-radius($border-radius-base)
|
35
|
+
> li > a,
|
36
|
+
> li > span
|
37
|
+
&:hover,
|
38
|
+
&:focus
|
39
|
+
background-color: $pagination-hover-bg
|
40
|
+
> .active > a,
|
41
|
+
> .active > span
|
42
|
+
&,
|
43
|
+
&:hover,
|
44
|
+
&:focus
|
45
|
+
z-index: 2
|
46
|
+
color: $pagination-active-color
|
47
|
+
background-color: $pagination-active-bg
|
48
|
+
border-color: $pagination-active-bg
|
49
|
+
cursor: default
|
50
|
+
> .disabled
|
51
|
+
> span,
|
52
|
+
> a,
|
53
|
+
> a:hover,
|
54
|
+
> a:focus
|
55
|
+
color: $pagination-disabled-color
|
56
|
+
background-color: $pagination-bg
|
57
|
+
border-color: $pagination-border
|
58
|
+
cursor: not-allowed
|
@@ -0,0 +1,78 @@
|
|
1
|
+
//
|
2
|
+
// Tables
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
@if $use-tables == true
|
6
|
+
|
7
|
+
table
|
8
|
+
background-color: $table-bg
|
9
|
+
border: 1px solid $table-border-color
|
10
|
+
border-collapse: collapse
|
11
|
+
border-spacing: 0
|
12
|
+
max-width: 100%
|
13
|
+
margin-bottom: $line-height-computed
|
14
|
+
width: 100%
|
15
|
+
|
16
|
+
thead,
|
17
|
+
tbody,
|
18
|
+
tfoot
|
19
|
+
> tr
|
20
|
+
> th,
|
21
|
+
> td
|
22
|
+
border: 1px solid $table-border-color
|
23
|
+
line-height: $line-height-base
|
24
|
+
padding: $table-cell-padding
|
25
|
+
text-align: left
|
26
|
+
vertical-align: top
|
27
|
+
|
28
|
+
// Bottom align for column headings
|
29
|
+
thead > tr > th
|
30
|
+
vertical-align: bottom
|
31
|
+
border-bottom: 2px solid $table-border-color
|
32
|
+
|
33
|
+
> tbody
|
34
|
+
> tr:nth-child(odd)
|
35
|
+
> td,
|
36
|
+
> th
|
37
|
+
background-color: $table-bg-accent
|
38
|
+
|
39
|
+
|
40
|
+
// Remove top border from thead by default
|
41
|
+
caption + thead,
|
42
|
+
colgroup + thead,
|
43
|
+
thead:first-child
|
44
|
+
tr:first-child
|
45
|
+
th, td
|
46
|
+
border-top: 0
|
47
|
+
|
48
|
+
// Account for multiple tbody instances
|
49
|
+
tbody + tbody
|
50
|
+
border-top: 2px solid $table-border-color
|
51
|
+
|
52
|
+
// Nesting
|
53
|
+
table
|
54
|
+
background-color: $body-bg
|
55
|
+
|
56
|
+
|
57
|
+
// Table actions with a set of buttons, i.e. edit, delete, etc
|
58
|
+
td.actions,
|
59
|
+
td.options
|
60
|
+
a,
|
61
|
+
button
|
62
|
+
margin-right: 8px
|
63
|
+
|
64
|
+
|
65
|
+
// Table cell sizing
|
66
|
+
//
|
67
|
+
// Reset default table behavior
|
68
|
+
|
69
|
+
table col[class*="col-"]
|
70
|
+
float: none
|
71
|
+
display: table-column
|
72
|
+
|
73
|
+
table
|
74
|
+
td,
|
75
|
+
th
|
76
|
+
&[class*="col-"]
|
77
|
+
float: none
|
78
|
+
display: table-cell
|
@@ -0,0 +1,59 @@
|
|
1
|
+
// Base
|
2
|
+
*,
|
3
|
+
*:before,
|
4
|
+
*:after
|
5
|
+
+box-sizing(border-box)
|
6
|
+
|
7
|
+
// Layout
|
8
|
+
html,
|
9
|
+
body
|
10
|
+
height: 100%
|
11
|
+
|
12
|
+
html
|
13
|
+
font-size: 62.5%
|
14
|
+
-webkit-tap-highlight-color: rgba(0,0,0,0)
|
15
|
+
|
16
|
+
body
|
17
|
+
background-color: $body-bg
|
18
|
+
color: $text-color
|
19
|
+
font: 62.5% 1.5 $font-family-base
|
20
|
+
font-size: $font-size-base
|
21
|
+
line-height: $line-height-base
|
22
|
+
-webkit-text-size-adjust: 100%
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
// Horizontal rules
|
27
|
+
hr
|
28
|
+
margin-top: $line-height-computed
|
29
|
+
margin-bottom: $line-height-computed
|
30
|
+
border: 0
|
31
|
+
border-top: 1px solid $gray-light
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
// Media
|
36
|
+
img
|
37
|
+
vertical-align: middle
|
38
|
+
|
39
|
+
img,
|
40
|
+
video,
|
41
|
+
object
|
42
|
+
height: auto
|
43
|
+
max-height: 100%
|
44
|
+
|
45
|
+
iframe
|
46
|
+
margin-bottom: $padding-base-vertical * 2
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
// Links
|
51
|
+
a
|
52
|
+
color: $link-color
|
53
|
+
text-decoration: none
|
54
|
+
outline: 0
|
55
|
+
|
56
|
+
&:hover,
|
57
|
+
&:focus
|
58
|
+
color: $link-hover-color
|
59
|
+
text-decoration: underline
|
@@ -0,0 +1,754 @@
|
|
1
|
+
//
|
2
|
+
// Mixins
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
// Utilities
|
7
|
+
// -------------------------
|
8
|
+
|
9
|
+
// Clearfix
|
10
|
+
// Source: http://nicolasgallagher.com/micro-clearfix-hack/
|
11
|
+
//
|
12
|
+
// For modern browsers
|
13
|
+
// 1. The space content is one way to avoid an Opera bug when the
|
14
|
+
// contenteditable attribute is included anywhere else in the document.
|
15
|
+
// Otherwise it causes space to appear at the top and bottom of elements
|
16
|
+
// that are clearfixed.
|
17
|
+
// 2. The use of `table` rather than `block` is only necessary if using
|
18
|
+
// `:before` to contain the top-margins of child elements.
|
19
|
+
|
20
|
+
@mixin clearfix()
|
21
|
+
&:before,
|
22
|
+
&:after
|
23
|
+
content: " "
|
24
|
+
display: table
|
25
|
+
|
26
|
+
&:after
|
27
|
+
clear: both
|
28
|
+
|
29
|
+
|
30
|
+
// Webkit-style focus
|
31
|
+
@mixin tab-focus()
|
32
|
+
// Default
|
33
|
+
outline: thin dotted #333
|
34
|
+
// Webkit
|
35
|
+
outline: 5px auto -webkit-focus-ring-color
|
36
|
+
outline-offset: -2px
|
37
|
+
|
38
|
+
// Center-align a block level element
|
39
|
+
@mixin center-block()
|
40
|
+
display: block
|
41
|
+
margin-left: auto
|
42
|
+
margin-right: auto
|
43
|
+
|
44
|
+
|
45
|
+
// Sizing shortcuts
|
46
|
+
@mixin size($width, $height)
|
47
|
+
width: $width
|
48
|
+
height: $height
|
49
|
+
|
50
|
+
@mixin square($size)
|
51
|
+
@include size($size, $size)
|
52
|
+
|
53
|
+
|
54
|
+
// Placeholder text
|
55
|
+
@mixin placeholder($color: $input-color-placeholder)
|
56
|
+
&:-moz-placeholder
|
57
|
+
color: $color
|
58
|
+
&::-moz-placeholder
|
59
|
+
color: $color
|
60
|
+
&:-ms-input-placeholder
|
61
|
+
color: $color
|
62
|
+
&::-webkit-input-placeholder
|
63
|
+
color: $color
|
64
|
+
|
65
|
+
|
66
|
+
// Text overflow
|
67
|
+
// Requires inline-block or block for proper styling
|
68
|
+
@mixin text-overflow()
|
69
|
+
overflow: hidden
|
70
|
+
text-overflow: ellipsis
|
71
|
+
white-space: nowrap
|
72
|
+
|
73
|
+
|
74
|
+
// CSS image replacement
|
75
|
+
//
|
76
|
+
// Heads up! v3 launched with with only `.hide-text()`, but per our pattern for
|
77
|
+
// mixins being reused as classes with the same name, this doesn't hold up. As
|
78
|
+
// of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`. Note
|
79
|
+
// that we cannot chain the mixins together in Less, so they are repeated.
|
80
|
+
//
|
81
|
+
// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
|
82
|
+
|
83
|
+
// Deprecated as of v3.0.1 (will be removed in v4)
|
84
|
+
@mixin hide-text()
|
85
|
+
font: 0/0 a
|
86
|
+
color: transparent
|
87
|
+
text-shadow: none
|
88
|
+
background-color: transparent
|
89
|
+
border: 0
|
90
|
+
|
91
|
+
// New mixin to use as of v3.0.1
|
92
|
+
@mixin text-hide()
|
93
|
+
font: 0/0 a
|
94
|
+
color: transparent
|
95
|
+
text-shadow: none
|
96
|
+
background-color: transparent
|
97
|
+
border: 0
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
// CSS3 PROPERTIES
|
103
|
+
// --------------------------------------------------
|
104
|
+
|
105
|
+
// Single side border-radius
|
106
|
+
@mixin border-top-radius($radius)
|
107
|
+
border-top-right-radius: $radius
|
108
|
+
border-top-left-radius: $radius
|
109
|
+
|
110
|
+
@mixin border-right-radius($radius)
|
111
|
+
border-bottom-right-radius: $radius
|
112
|
+
border-top-right-radius: $radius
|
113
|
+
|
114
|
+
@mixin border-bottom-radius($radius)
|
115
|
+
border-bottom-right-radius: $radius
|
116
|
+
border-bottom-left-radius: $radius
|
117
|
+
|
118
|
+
@mixin border-left-radius($radius)
|
119
|
+
border-bottom-left-radius: $radius
|
120
|
+
border-top-left-radius: $radius
|
121
|
+
|
122
|
+
|
123
|
+
// Drop shadows
|
124
|
+
@mixin box-shadow($shadow...)
|
125
|
+
-webkit-box-shadow: $shadow
|
126
|
+
box-shadow: $shadow
|
127
|
+
|
128
|
+
|
129
|
+
// Transitions
|
130
|
+
@mixin transition($transition...)
|
131
|
+
-webkit-transition: $transition
|
132
|
+
transition: $transition
|
133
|
+
|
134
|
+
@mixin transition-property($transition-property)
|
135
|
+
-webkit-transition-property: $transition-property
|
136
|
+
transition-property: $transition-property
|
137
|
+
|
138
|
+
@mixin transition-delay($transition-delay)
|
139
|
+
-webkit-transition-delay: $transition-delay
|
140
|
+
transition-delay: $transition-delay
|
141
|
+
|
142
|
+
@mixin transition-duration($transition-duration)
|
143
|
+
-webkit-transition-duration: $transition-duration
|
144
|
+
transition-duration: $transition-duration
|
145
|
+
|
146
|
+
@mixin transition-transform($transition...)
|
147
|
+
-webkit-transition: -webkit-transform $transition
|
148
|
+
-moz-transition: -moz-transform $transition
|
149
|
+
-o-transition: -o-transform $transition
|
150
|
+
transition: transform $transition
|
151
|
+
|
152
|
+
|
153
|
+
// Transformations
|
154
|
+
@mixin rotate($degrees)
|
155
|
+
-webkit-transform: rotate($degrees)
|
156
|
+
-ms-transform: rotate($degrees)
|
157
|
+
transform: rotate($degrees)
|
158
|
+
|
159
|
+
@mixin scale($ratio)
|
160
|
+
-webkit-transform: scale($ratio)
|
161
|
+
-ms-transform: scale($ratio)
|
162
|
+
transform: scale($ratio)
|
163
|
+
|
164
|
+
@mixin translate($x, $y)
|
165
|
+
-webkit-transform: translate($x, $y)
|
166
|
+
-ms-transform: translate($x, $y)
|
167
|
+
transform: translate($x, $y)
|
168
|
+
|
169
|
+
@mixin skew($x, $y)
|
170
|
+
-webkit-transform: skew($x, $y)
|
171
|
+
-ms-transform: skewX($x) skewY($y)
|
172
|
+
transform: skew($x, $y)
|
173
|
+
|
174
|
+
@mixin translate3d($x, $y, $z)
|
175
|
+
-webkit-transform: translate3d($x, $y, $z)
|
176
|
+
transform: translate3d($x, $y, $z)
|
177
|
+
|
178
|
+
|
179
|
+
// Backface visibility
|
180
|
+
// Prevent browsers from flickering when using CSS 3D transforms.
|
181
|
+
// Default value is `visible`, but can be changed to `hidden`
|
182
|
+
// See git pull https://github.com/dannykeane/bootstrap.git backface-visibility for examples
|
183
|
+
@mixin backface-visibility($visibility)
|
184
|
+
-webkit-backface-visibility: $visibility
|
185
|
+
-moz-backface-visibility: $visibility
|
186
|
+
backface-visibility: $visibility
|
187
|
+
|
188
|
+
|
189
|
+
// Box sizing
|
190
|
+
@mixin box-sizing($boxmodel)
|
191
|
+
-webkit-box-sizing: $boxmodel
|
192
|
+
-moz-box-sizing: $boxmodel
|
193
|
+
box-sizing: $boxmodel
|
194
|
+
|
195
|
+
|
196
|
+
// User select
|
197
|
+
// For selecting text on the page
|
198
|
+
@mixin user-select($select)
|
199
|
+
-webkit-user-select: $select
|
200
|
+
-moz-user-select: $select
|
201
|
+
-ms-user-select: $select
|
202
|
+
-o-user-select: $select
|
203
|
+
user-select: $select
|
204
|
+
|
205
|
+
|
206
|
+
// Resize anything
|
207
|
+
@mixin resizable($direction)
|
208
|
+
resize: $direction
|
209
|
+
overflow: auto
|
210
|
+
|
211
|
+
|
212
|
+
// CSS3 Content Columns
|
213
|
+
@mixin content-columns($column-count, $column-gap: $grid-gutter-width)
|
214
|
+
-webkit-column-count: $column-count
|
215
|
+
-moz-column-count: $column-count
|
216
|
+
column-count: $column-count
|
217
|
+
-webkit-column-gap: $column-gap
|
218
|
+
-moz-column-gap: $column-gap
|
219
|
+
column-gap: $column-gap
|
220
|
+
|
221
|
+
|
222
|
+
// Optional hyphenation
|
223
|
+
@mixin hyphens($mode: auto)
|
224
|
+
word-wrap: break-word
|
225
|
+
-webkit-hyphens: $mode
|
226
|
+
-moz-hyphens: $mode
|
227
|
+
-ms-hyphens: $mode
|
228
|
+
-o-hyphens: $mode
|
229
|
+
hyphens: $mode
|
230
|
+
|
231
|
+
|
232
|
+
// Opacity
|
233
|
+
@mixin opacity($opacity)
|
234
|
+
opacity: $opacity
|
235
|
+
// IE8 filter
|
236
|
+
$opacity-ie: ($opacity * 100)
|
237
|
+
filter: alpha(opacity=$opacity-ie)
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
// GRADIENTS
|
243
|
+
// --------------------------------------------------
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
// Horizontal gradient, from left to right
|
248
|
+
//
|
249
|
+
// Creates two color stops, start and end, by specifying a color and position for each color stop.
|
250
|
+
// Color stops are not available in IE9 and below.
|
251
|
+
@mixin gradient-horizontal($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%)
|
252
|
+
background-image: -webkit-gradient(linear, $start-percent top, $end-percent top, from($start-color), to($end-color))
|
253
|
+
background-image: -webkit-linear-gradient(left, color-stop($start-color $start-percent), color-stop($end-color $end-percent))
|
254
|
+
background-image: -moz-linear-gradient(left, $start-color $start-percent, $end-color $end-percent)
|
255
|
+
background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent)
|
256
|
+
background-repeat: repeat-x
|
257
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#{ie-hex-str($start-color)}, endColorstr=#{ie-hex-str($end-color)}, GradientType=1)
|
258
|
+
|
259
|
+
|
260
|
+
// Vertical gradient, from top to bottom
|
261
|
+
//
|
262
|
+
// Creates two color stops, start and end, by specifying a color and position for each color stop.
|
263
|
+
// Color stops are not available in IE9 and below.
|
264
|
+
@mixin gradient-vertical($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%)
|
265
|
+
background-image: -webkit-gradient(linear, left $start-percent, left $end-percent, from($start-color), to($end-color))
|
266
|
+
background-image: -webkit-linear-gradient(top, $start-color, $start-percent, $end-color, $end-percent)
|
267
|
+
background-image: -moz-linear-gradient(top, $start-color $start-percent, $end-color $end-percent)
|
268
|
+
background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent)
|
269
|
+
background-repeat: repeat-x
|
270
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#{ie-hex-str($start-color)}, endColorstr=#{ie-hex-str($end-color)}, GradientType=0)
|
271
|
+
|
272
|
+
|
273
|
+
@mixin gradient-directional($start-color: #555, $end-color: #333, $deg: 45deg)
|
274
|
+
background-repeat: repeat-x
|
275
|
+
background-image: -webkit-linear-gradient($deg, $start-color, $end-color)
|
276
|
+
background-image: -moz-linear-gradient($deg, $start-color, $end-color)
|
277
|
+
background-image: linear-gradient($deg, $start-color, $end-color)
|
278
|
+
|
279
|
+
@mixin gradient-horizontal-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f)
|
280
|
+
background-image: -webkit-gradient(left, linear, 0 0, 0 100%, from($start-color), color-stop($color-stop, $mid-color), to($end-color))
|
281
|
+
background-image: -webkit-linear-gradient(left, $start-color, $mid-color $color-stop, $end-color)
|
282
|
+
background-image: -moz-linear-gradient(left, $start-color, $mid-color $color-stop, $end-color)
|
283
|
+
background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color)
|
284
|
+
background-repeat: no-repeat
|
285
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#{ie-hex-str($start-color)}, endColorstr=#{ie-hex-str($end-color)}, GradientType=1)
|
286
|
+
|
287
|
+
@mixin gradient-vertical-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f)
|
288
|
+
background-image: -webkit-gradient(linear, 0 0, 0 100%, from($start-color), color-stop($color-stop, $mid-color), to($end-color))
|
289
|
+
background-image: -webkit-linear-gradient($start-color, $mid-color $color-stop, $end-color)
|
290
|
+
background-image: -moz-linear-gradient(top, $start-color, $mid-color $color-stop, $end-color)
|
291
|
+
background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color)
|
292
|
+
background-repeat: no-repeat
|
293
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#{ie-hex-str($start-color)}, endColorstr=#{ie-hex-str($end-color)}, GradientType=0)
|
294
|
+
|
295
|
+
@mixin gradient-radial($inner-color: #555, $outer-color: #333)
|
296
|
+
background-image: -webkit-gradient(radial, center center, 0, center center, 460, from($inner-color), to($outer-color))
|
297
|
+
background-image: -webkit-radial-gradient(circle, $inner-color, $outer-color)
|
298
|
+
background-image: -moz-radial-gradient(circle, $inner-color, $outer-color)
|
299
|
+
background-image: radial-gradient(circle, $inner-color, $outer-color)
|
300
|
+
background-repeat: no-repeat
|
301
|
+
|
302
|
+
@mixin gradient-striped($color: #555, $angle: 45deg)
|
303
|
+
background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(.25, rgba(255,255,255,.15)), color-stop(.25, transparent), color-stop(.5, transparent), color-stop(.5, rgba(255,255,255,.15)), color-stop(.75, rgba(255,255,255,.15)), color-stop(.75, transparent), to(transparent))
|
304
|
+
background-image: -webkit-linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent)
|
305
|
+
background-image: -moz-linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent)
|
306
|
+
background-image: linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent)
|
307
|
+
|
308
|
+
|
309
|
+
// Reset filters for IE
|
310
|
+
//
|
311
|
+
// When you need to remove a gradient background, do not forget to use this to reset
|
312
|
+
// the IE filter for IE9 and below.
|
313
|
+
@mixin reset-filter()
|
314
|
+
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false)
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
// Retina images
|
320
|
+
//
|
321
|
+
// Short retina mixin for setting background-image and -size
|
322
|
+
|
323
|
+
@mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x)
|
324
|
+
background-image: image-url($file-1x)
|
325
|
+
|
326
|
+
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx)
|
327
|
+
background-image: image-url($file-2x)
|
328
|
+
background-size: $width-1x $height-1x
|
329
|
+
|
330
|
+
|
331
|
+
// Responsive image
|
332
|
+
//
|
333
|
+
// Keep images from scaling beyond the width of their parents.
|
334
|
+
|
335
|
+
@mixin img-responsive($display: block)
|
336
|
+
display: $display
|
337
|
+
max-width: 100% // Part 1: Set a maximum relative to the parent
|
338
|
+
height: auto // Part 2: Scale the height according to the width, otherwise you get stretching
|
339
|
+
|
340
|
+
|
341
|
+
// COMPONENT MIXINS
|
342
|
+
// --------------------------------------------------
|
343
|
+
|
344
|
+
// Horizontal dividers
|
345
|
+
// -------------------------
|
346
|
+
// Dividers (basically an hr) within dropdowns and nav lists
|
347
|
+
@mixin nav-divider($color: #e5e5e5)
|
348
|
+
height: 1px
|
349
|
+
margin: (($line-height-computed / 2) - 1) 0
|
350
|
+
overflow: hidden
|
351
|
+
background-color: $color
|
352
|
+
|
353
|
+
|
354
|
+
// Panels
|
355
|
+
// -------------------------
|
356
|
+
@mixin panel-variant($border, $heading-text-color, $heading-bg-color, $heading-border)
|
357
|
+
border-color: $border
|
358
|
+
& > .panel-heading
|
359
|
+
color: $heading-text-color
|
360
|
+
background-color: $heading-bg-color
|
361
|
+
border-color: $heading-border
|
362
|
+
+ .panel-collapse .panel-body
|
363
|
+
border-top-color: $border
|
364
|
+
|
365
|
+
|
366
|
+
& > .panel-footer
|
367
|
+
+ .panel-collapse .panel-body
|
368
|
+
border-bottom-color: $border
|
369
|
+
|
370
|
+
|
371
|
+
|
372
|
+
// Alerts
|
373
|
+
// -------------------------
|
374
|
+
@mixin alert-variant($background, $border, $text-color)
|
375
|
+
background-color: $background
|
376
|
+
border-color: $border
|
377
|
+
color: $text-color
|
378
|
+
hr
|
379
|
+
border-top-color: darken($border, 5%)
|
380
|
+
|
381
|
+
.alert-link
|
382
|
+
color: darken($text-color, 10%)
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
// Tables
|
387
|
+
// -------------------------
|
388
|
+
@mixin table-row-variant($state, $background, $border)
|
389
|
+
// Exact selectors below required to override `.table-striped` and prevent
|
390
|
+
// inheritance to nested tables.
|
391
|
+
.table > thead > tr,
|
392
|
+
.table > tbody > tr,
|
393
|
+
.table > tfoot > tr
|
394
|
+
> td.#{$state},
|
395
|
+
> th.#{$state},
|
396
|
+
&.#{$state} > td,
|
397
|
+
&.#{$state} > th
|
398
|
+
background-color: $background
|
399
|
+
border-color: $border
|
400
|
+
|
401
|
+
|
402
|
+
|
403
|
+
// Hover states for `.table-hover`
|
404
|
+
// Note: this is not available for cells or rows within `thead` or `tfoot`.
|
405
|
+
.table-hover > tbody > tr
|
406
|
+
> td.#{$state}:hover,
|
407
|
+
> th.#{$state}:hover,
|
408
|
+
&.#{$state}:hover > td,
|
409
|
+
&.#{$state}:hover > th
|
410
|
+
background-color: darken($background, 5%)
|
411
|
+
border-color: darken($border, 5%)
|
412
|
+
|
413
|
+
|
414
|
+
|
415
|
+
|
416
|
+
// Button variants
|
417
|
+
// -------------------------
|
418
|
+
// Easily pump out default styles, as well as :hover, :focus, :active,
|
419
|
+
// and disabled options for all buttons
|
420
|
+
@mixin button-variant($color, $background, $border)
|
421
|
+
color: $color
|
422
|
+
background-color: $background
|
423
|
+
border-color: $border
|
424
|
+
|
425
|
+
&:hover,
|
426
|
+
&:focus,
|
427
|
+
&:active,
|
428
|
+
&.active
|
429
|
+
color: $color
|
430
|
+
background-color: darken($background, 8%)
|
431
|
+
border-color: darken($border, 12%)
|
432
|
+
|
433
|
+
.open &
|
434
|
+
&.dropdown-toggle
|
435
|
+
color: $color
|
436
|
+
background-color: darken($background, 8%)
|
437
|
+
border-color: darken($border, 12%)
|
438
|
+
|
439
|
+
|
440
|
+
|
441
|
+
&:active,
|
442
|
+
&.active
|
443
|
+
background-image: none
|
444
|
+
|
445
|
+
.open &
|
446
|
+
&.dropdown-toggle
|
447
|
+
background-image: none
|
448
|
+
|
449
|
+
|
450
|
+
|
451
|
+
&.disabled,
|
452
|
+
&[disabled],
|
453
|
+
fieldset[disabled] &
|
454
|
+
&,
|
455
|
+
&:hover,
|
456
|
+
&:focus,
|
457
|
+
&:active,
|
458
|
+
&.active
|
459
|
+
background-color: $background
|
460
|
+
border-color: $border
|
461
|
+
|
462
|
+
|
463
|
+
|
464
|
+
|
465
|
+
// Button sizes
|
466
|
+
// -------------------------
|
467
|
+
@mixin button-size($padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius)
|
468
|
+
padding: $padding-vertical $padding-horizontal
|
469
|
+
font-size: $font-size
|
470
|
+
line-height: $line-height
|
471
|
+
border-radius: $border-radius
|
472
|
+
|
473
|
+
|
474
|
+
// Pagination
|
475
|
+
// -------------------------
|
476
|
+
@mixin pagination-size($padding-vertical, $padding-horizontal, $font-size, $border-radius)
|
477
|
+
> li
|
478
|
+
> a,
|
479
|
+
> span
|
480
|
+
padding: $padding-vertical $padding-horizontal
|
481
|
+
font-size: $font-size
|
482
|
+
|
483
|
+
&:first-child
|
484
|
+
> a,
|
485
|
+
> span
|
486
|
+
@include border-left-radius($border-radius)
|
487
|
+
|
488
|
+
|
489
|
+
&:last-child
|
490
|
+
> a,
|
491
|
+
> span
|
492
|
+
@include border-right-radius($border-radius)
|
493
|
+
|
494
|
+
|
495
|
+
|
496
|
+
|
497
|
+
|
498
|
+
// Labels
|
499
|
+
// -------------------------
|
500
|
+
@mixin label-variant($color)
|
501
|
+
background-color: $color
|
502
|
+
&[href]
|
503
|
+
&:hover,
|
504
|
+
&:focus
|
505
|
+
background-color: darken($color, 10%)
|
506
|
+
|
507
|
+
|
508
|
+
|
509
|
+
|
510
|
+
// Navbar vertical align
|
511
|
+
// -------------------------
|
512
|
+
// Vertically center elements in the navbar.
|
513
|
+
// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px)` to calculate the appropriate top margin.
|
514
|
+
@mixin navbar-vertical-align($element-height)
|
515
|
+
margin-top: (($navbar-height - $element-height) / 2)
|
516
|
+
margin-bottom: (($navbar-height - $element-height) / 2)
|
517
|
+
|
518
|
+
|
519
|
+
// Progress bars
|
520
|
+
// -------------------------
|
521
|
+
@mixin progress-bar-variant($color)
|
522
|
+
background-color: $color
|
523
|
+
.progress-striped &
|
524
|
+
@include gradient-striped($color)
|
525
|
+
|
526
|
+
|
527
|
+
|
528
|
+
// Responsive utilities
|
529
|
+
// -------------------------
|
530
|
+
// More easily include all the states for responsive-utilities.less.
|
531
|
+
@mixin responsive-visibility($parent)
|
532
|
+
#{$parent}
|
533
|
+
display: block !important
|
534
|
+
tr#{$parent}
|
535
|
+
display: table-row !important
|
536
|
+
th#{$parent},
|
537
|
+
td#{$parent}
|
538
|
+
display: table-cell !important
|
539
|
+
|
540
|
+
|
541
|
+
@mixin responsive-invisibility($parent)
|
542
|
+
#{$parent}
|
543
|
+
display: none !important
|
544
|
+
tr#{$parent}
|
545
|
+
display: none !important
|
546
|
+
th#{$parent},
|
547
|
+
td#{$parent}
|
548
|
+
display: none !important
|
549
|
+
|
550
|
+
|
551
|
+
// Grid System
|
552
|
+
// -----------
|
553
|
+
|
554
|
+
// Centered container element
|
555
|
+
@mixin container-fixed()
|
556
|
+
margin-right: auto
|
557
|
+
margin-left: auto
|
558
|
+
padding-left: ($grid-gutter-width / 2)
|
559
|
+
padding-right: ($grid-gutter-width / 2)
|
560
|
+
@include clearfix()
|
561
|
+
|
562
|
+
|
563
|
+
// Creates a wrapper for a series of columns
|
564
|
+
@mixin make-row($gutter: $grid-gutter-width)
|
565
|
+
margin-left: ($gutter / -2)
|
566
|
+
margin-right: ($gutter / -2)
|
567
|
+
@include clearfix()
|
568
|
+
|
569
|
+
|
570
|
+
// Generate the extra small columns
|
571
|
+
@mixin make-xs-column($columns, $gutter: $grid-gutter-width)
|
572
|
+
position: relative
|
573
|
+
float: left
|
574
|
+
width: percentage(($columns / $grid-columns))
|
575
|
+
// Prevent columns from collapsing when empty
|
576
|
+
min-height: 1px
|
577
|
+
// Inner gutter via padding
|
578
|
+
padding-left: ($gutter / 2)
|
579
|
+
padding-right: ($gutter / 2)
|
580
|
+
|
581
|
+
|
582
|
+
// Generate the small columns
|
583
|
+
@mixin make-sm-column($columns, $gutter: $grid-gutter-width)
|
584
|
+
position: relative
|
585
|
+
// Prevent columns from collapsing when empty
|
586
|
+
min-height: 1px
|
587
|
+
// Inner gutter via padding
|
588
|
+
padding-left: ($gutter / 2)
|
589
|
+
padding-right: ($gutter / 2)
|
590
|
+
|
591
|
+
// Calculate width based on number of columns available
|
592
|
+
@media (min-width: $screen-sm-min)
|
593
|
+
float: left
|
594
|
+
width: percentage(($columns / $grid-columns))
|
595
|
+
|
596
|
+
|
597
|
+
|
598
|
+
// Generate the small column offsets
|
599
|
+
@mixin make-sm-column-offset($columns)
|
600
|
+
@media (min-width: $screen-sm-min)
|
601
|
+
margin-left: percentage(($columns / $grid-columns))
|
602
|
+
|
603
|
+
|
604
|
+
@mixin make-sm-column-push($columns)
|
605
|
+
@media (min-width: $screen-sm-min)
|
606
|
+
left: percentage(($columns / $grid-columns))
|
607
|
+
|
608
|
+
|
609
|
+
@mixin make-sm-column-pull($columns)
|
610
|
+
@media (min-width: $screen-sm-min)
|
611
|
+
right: percentage(($columns / $grid-columns))
|
612
|
+
|
613
|
+
|
614
|
+
|
615
|
+
// Generate the medium columns
|
616
|
+
@mixin make-md-column($columns, $gutter: $grid-gutter-width)
|
617
|
+
position: relative
|
618
|
+
// Prevent columns from collapsing when empty
|
619
|
+
min-height: 1px
|
620
|
+
// Inner gutter via padding
|
621
|
+
padding-left: ($gutter / 2)
|
622
|
+
padding-right: ($gutter / 2)
|
623
|
+
|
624
|
+
// Calculate width based on number of columns available
|
625
|
+
@media (min-width: $screen-md-min)
|
626
|
+
float: left
|
627
|
+
width: percentage(($columns / $grid-columns))
|
628
|
+
|
629
|
+
|
630
|
+
|
631
|
+
// Generate the large column offsets
|
632
|
+
@mixin make-md-column-offset($columns)
|
633
|
+
@media (min-width: $screen-md-min)
|
634
|
+
margin-left: percentage(($columns / $grid-columns))
|
635
|
+
|
636
|
+
|
637
|
+
@mixin make-md-column-push($columns)
|
638
|
+
@media (min-width: $screen-md)
|
639
|
+
left: percentage(($columns / $grid-columns))
|
640
|
+
|
641
|
+
|
642
|
+
@mixin make-md-column-pull($columns)
|
643
|
+
@media (min-width: $screen-md-min)
|
644
|
+
right: percentage(($columns / $grid-columns))
|
645
|
+
|
646
|
+
|
647
|
+
|
648
|
+
// Generate the large columns
|
649
|
+
@mixin make-lg-column($columns, $gutter: $grid-gutter-width)
|
650
|
+
position: relative
|
651
|
+
// Prevent columns from collapsing when empty
|
652
|
+
min-height: 1px
|
653
|
+
// Inner gutter via padding
|
654
|
+
padding-left: ($gutter / 2)
|
655
|
+
padding-right: ($gutter / 2)
|
656
|
+
|
657
|
+
// Calculate width based on number of columns available
|
658
|
+
@media (min-width: $screen-lg-min)
|
659
|
+
float: left
|
660
|
+
width: percentage(($columns / $grid-columns))
|
661
|
+
|
662
|
+
|
663
|
+
|
664
|
+
// Generate the large column offsets
|
665
|
+
@mixin make-lg-column-offset($columns)
|
666
|
+
@media (min-width: $screen-lg-min)
|
667
|
+
margin-left: percentage(($columns / $grid-columns))
|
668
|
+
|
669
|
+
|
670
|
+
@mixin make-lg-column-push($columns)
|
671
|
+
@media (min-width: $screen-lg-min)
|
672
|
+
left: percentage(($columns / $grid-columns))
|
673
|
+
|
674
|
+
|
675
|
+
@mixin make-lg-column-pull($columns)
|
676
|
+
@media (min-width: $screen-lg-min)
|
677
|
+
right: percentage(($columns / $grid-columns))
|
678
|
+
|
679
|
+
|
680
|
+
|
681
|
+
|
682
|
+
// Form validation states
|
683
|
+
//
|
684
|
+
// Used in forms.less to generate the form validation CSS for warnings, errors,
|
685
|
+
// and successes.
|
686
|
+
|
687
|
+
@mixin form-control-validation($text-color: #555, $border-color: #ccc, $background-color: #f5f5f5)
|
688
|
+
// Color the label and help text
|
689
|
+
.help-block,
|
690
|
+
.control-label
|
691
|
+
color: $text-color
|
692
|
+
|
693
|
+
// Set the border and box shadow on specific inputs to match
|
694
|
+
.form-control
|
695
|
+
border-color: $border-color
|
696
|
+
@include box-shadow(inset 0 1px 1px rgba(0,0,0,.075))
|
697
|
+
&:focus
|
698
|
+
border-color: darken($border-color, 10%)
|
699
|
+
$shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten($border-color, 20%)
|
700
|
+
@include box-shadow($shadow)
|
701
|
+
|
702
|
+
|
703
|
+
// Set validation states also for addons
|
704
|
+
.input-group-addon
|
705
|
+
color: $text-color
|
706
|
+
border-color: $border-color
|
707
|
+
background-color: $background-color
|
708
|
+
|
709
|
+
|
710
|
+
|
711
|
+
// Form control focus state
|
712
|
+
//
|
713
|
+
// Generate a customized focus state and for any input with the specified color,
|
714
|
+
// which defaults to the `$input-focus-border` variable.
|
715
|
+
//
|
716
|
+
// We highly encourage you to not customize the default value, but instead use
|
717
|
+
// this to tweak colors on an as-needed basis. This aesthetic change is based on
|
718
|
+
// WebKit's default styles, but applicable to a wider range of browsers. Its
|
719
|
+
// usability and accessibility should be taken into account with any change.
|
720
|
+
//
|
721
|
+
// Example usage: change the default blue border and shadow to white for better
|
722
|
+
// contrast against a dark gray background.
|
723
|
+
|
724
|
+
@mixin form-control-focus($color: $input-border-focus)
|
725
|
+
$color-rgba: rgba(red($color), green($color), blue($color), .6)
|
726
|
+
&:focus
|
727
|
+
border-color: $color
|
728
|
+
outline: 0
|
729
|
+
@include box-shadow(inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px $color-rgba)
|
730
|
+
|
731
|
+
|
732
|
+
|
733
|
+
// Form control sizing
|
734
|
+
//
|
735
|
+
// Relative text size, padding, and border-radii changes for form controls. For
|
736
|
+
// horizontal sizing, wrap controls in the predefined grid classes. `<select>`
|
737
|
+
// element gets special love because it's special, and that's a fact!
|
738
|
+
|
739
|
+
@mixin input-size($parent, $input-height, $padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius)
|
740
|
+
#{$parent}
|
741
|
+
height: $input-height
|
742
|
+
padding: $padding-vertical $padding-horizontal
|
743
|
+
font-size: $font-size
|
744
|
+
line-height: $line-height
|
745
|
+
border-radius: $border-radius
|
746
|
+
|
747
|
+
select#{$parent}
|
748
|
+
height: $input-height
|
749
|
+
line-height: $input-height
|
750
|
+
|
751
|
+
|
752
|
+
textarea#{$parent}
|
753
|
+
height: auto
|
754
|
+
|