primordial 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- 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,30 @@
|
|
1
|
+
//
|
2
|
+
// Close icons
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
@if $use-close == true
|
6
|
+
|
7
|
+
.close
|
8
|
+
float: right
|
9
|
+
font-size: $font-size-base * 1.5
|
10
|
+
font-weight: $close-font-weight
|
11
|
+
line-height: 1
|
12
|
+
color: $close-color
|
13
|
+
text-shadow: $close-text-shadow
|
14
|
+
+opacity(0.2)
|
15
|
+
&:hover,
|
16
|
+
&:focus
|
17
|
+
color: $close-color
|
18
|
+
text-decoration: none
|
19
|
+
cursor: pointer
|
20
|
+
+opacity(0.5)
|
21
|
+
|
22
|
+
// Additional properties for button version
|
23
|
+
// iOS requires the button element instead of an anchor tag.
|
24
|
+
// If you want the anchor version, it requires `href="#"`.
|
25
|
+
button.close
|
26
|
+
padding: 0
|
27
|
+
cursor: pointer
|
28
|
+
background: transparent
|
29
|
+
border: 0
|
30
|
+
-webkit-appearance: none
|
@@ -0,0 +1,332 @@
|
|
1
|
+
//
|
2
|
+
// Forms
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
// Normalize non-controls
|
6
|
+
//
|
7
|
+
// Restyle and baseline non-control form elements.
|
8
|
+
|
9
|
+
fieldset
|
10
|
+
padding: 0
|
11
|
+
margin: 0 0 20px 0
|
12
|
+
border: 0
|
13
|
+
|
14
|
+
legend
|
15
|
+
display: block
|
16
|
+
width: 100%
|
17
|
+
padding: 0
|
18
|
+
margin-bottom: $line-height-computed
|
19
|
+
font-size: $font-size-base * 1.5
|
20
|
+
line-height: inherit
|
21
|
+
color: $legend-color
|
22
|
+
border: 0
|
23
|
+
// border-bottom: 1px solid $legend-border-color
|
24
|
+
|
25
|
+
label,
|
26
|
+
.control-label
|
27
|
+
display: inline-block
|
28
|
+
margin-bottom: 5px
|
29
|
+
font-weight: bold
|
30
|
+
|
31
|
+
input,
|
32
|
+
button,
|
33
|
+
select,
|
34
|
+
textarea
|
35
|
+
font-family: inherit
|
36
|
+
font-size: inherit
|
37
|
+
line-height: inherit
|
38
|
+
|
39
|
+
// Normalize form controls
|
40
|
+
|
41
|
+
// Override content-box in Normalize (* isn't specific enough)
|
42
|
+
input[type="search"]
|
43
|
+
+box-sizing(border-box)
|
44
|
+
|
45
|
+
// Position radios and checkboxes better
|
46
|
+
|
47
|
+
input[type="radio"],
|
48
|
+
input[type="checkbox"]
|
49
|
+
margin: 4px 0 0
|
50
|
+
margin-top: 1px \9
|
51
|
+
line-height: normal
|
52
|
+
|
53
|
+
// Set the height of select and file controls to match text inputs
|
54
|
+
input[type="file"]
|
55
|
+
display: block
|
56
|
+
|
57
|
+
// Make multiple select elements height not fixed
|
58
|
+
|
59
|
+
select[multiple],
|
60
|
+
select[size]
|
61
|
+
height: auto
|
62
|
+
|
63
|
+
// Fix optgroup Firefox bug per https://github.com/twbs/bootstrap/issues/7611
|
64
|
+
select optgroup
|
65
|
+
font-size: inherit
|
66
|
+
font-style: inherit
|
67
|
+
font-family: inherit
|
68
|
+
|
69
|
+
// Focus for select, file, radio, and checkbox
|
70
|
+
|
71
|
+
input[type="file"]:focus,
|
72
|
+
input[type="radio"]:focus,
|
73
|
+
input[type="checkbox"]:focus
|
74
|
+
+tab-focus
|
75
|
+
|
76
|
+
// Fix for Chrome number input
|
77
|
+
// Setting certain font-sizes causes the `I` bar to appear on hover of the bottom increment button.
|
78
|
+
// See https://github.com/twbs/bootstrap/issues/8350 for more.
|
79
|
+
input[type="number"]
|
80
|
+
&::-webkit-outer-spin-button,
|
81
|
+
&::-webkit-inner-spin-button
|
82
|
+
height: auto
|
83
|
+
|
84
|
+
// Placeholder
|
85
|
+
//
|
86
|
+
// Placeholder text gets special styles because when browsers invalidate entire
|
87
|
+
// lines if it doesn't understand a selector/
|
88
|
+
.form-control
|
89
|
+
+placeholder
|
90
|
+
|
91
|
+
// Common form controls
|
92
|
+
//
|
93
|
+
// Shared size and type resets for form controls. Apply `.form-control` to any
|
94
|
+
// of the following form controls:
|
95
|
+
//
|
96
|
+
select,
|
97
|
+
textarea,
|
98
|
+
input[type="text"],
|
99
|
+
input[type="password"],
|
100
|
+
input[type="datetime"],
|
101
|
+
input[type="datetime-local"],
|
102
|
+
input[type="date"],
|
103
|
+
input[type="month"],
|
104
|
+
input[type="time"],
|
105
|
+
input[type="week"],
|
106
|
+
input[type="number"],
|
107
|
+
input[type="email"],
|
108
|
+
input[type="url"],
|
109
|
+
input[type="search"],
|
110
|
+
input[type="tel"],
|
111
|
+
input[type="color"],
|
112
|
+
.form-control
|
113
|
+
display: block
|
114
|
+
width: 100%
|
115
|
+
height: $input-height-base
|
116
|
+
// Make inputs at least the height of their button counterpart (base line-height + padding + border)
|
117
|
+
padding: $padding-base-vertical $padding-base-horizontal
|
118
|
+
font-size: $font-size-base
|
119
|
+
line-height: $line-height-base
|
120
|
+
color: $input-color
|
121
|
+
vertical-align: middle
|
122
|
+
background-color: $input-bg
|
123
|
+
border: 1px solid $input-border
|
124
|
+
border-radius: $input-border-radius
|
125
|
+
|
126
|
+
// Disabled and read-only inputs
|
127
|
+
// Note: HTML5 says that controls under a fieldset > legend:first-child won't
|
128
|
+
// be disabled if the fieldset is disabled. Due to implementation difficulty,
|
129
|
+
// we don't honor that edge case; we style them as disabled anyway.
|
130
|
+
&[disabled],
|
131
|
+
&[readonly],
|
132
|
+
fieldset[disabled] &
|
133
|
+
cursor: not-allowed
|
134
|
+
background-color: $input-bg-disabled
|
135
|
+
|
136
|
+
// Reset height for `textarea`s
|
137
|
+
textarea.form-control
|
138
|
+
height: auto
|
139
|
+
|
140
|
+
// Form groups
|
141
|
+
//
|
142
|
+
// Designed to help with the organization and spacing of vertical forms. For
|
143
|
+
// horizontal forms, use the predefined grid classes.
|
144
|
+
|
145
|
+
.form-group
|
146
|
+
margin-bottom: 15px
|
147
|
+
|
148
|
+
// Checkboxes and radios
|
149
|
+
//
|
150
|
+
// Indent the labels to position radios/checkboxes as hanging controls.
|
151
|
+
|
152
|
+
.radio,
|
153
|
+
.checkbox,
|
154
|
+
display: block
|
155
|
+
min-height: $line-height-computed
|
156
|
+
// clear the floating input if there is no label text
|
157
|
+
margin-top: 10px
|
158
|
+
margin-bottom: 10px
|
159
|
+
padding-left: 20px
|
160
|
+
vertical-align: middle
|
161
|
+
|
162
|
+
.radio
|
163
|
+
.checkbox,
|
164
|
+
.checkbox-inline,
|
165
|
+
.radio-inline
|
166
|
+
label
|
167
|
+
display: inline
|
168
|
+
margin-bottom: 0
|
169
|
+
font-weight: normal
|
170
|
+
cursor: pointer
|
171
|
+
|
172
|
+
.radio input[type="radio"],
|
173
|
+
.radio-inline input[type="radio"],
|
174
|
+
.checkbox input[type="checkbox"],
|
175
|
+
.checkbox-inline input[type="checkbox"]
|
176
|
+
float: left
|
177
|
+
margin-left: -20px
|
178
|
+
|
179
|
+
.radio + .radio,
|
180
|
+
.checkbox + .checkbox
|
181
|
+
margin-top: -5px
|
182
|
+
// Move up sibling radios or checkboxes for tighter spacing
|
183
|
+
|
184
|
+
// Radios and checkboxes on same line
|
185
|
+
|
186
|
+
.radio-inline,
|
187
|
+
.checkbox-inline
|
188
|
+
display: inline-block
|
189
|
+
padding-left: 20px
|
190
|
+
margin-bottom: 0
|
191
|
+
vertical-align: middle
|
192
|
+
font-weight: normal
|
193
|
+
cursor: pointer
|
194
|
+
|
195
|
+
.radio-inline + .radio-inline,
|
196
|
+
.checkbox-inline + .checkbox-inline
|
197
|
+
margin-top: 0
|
198
|
+
margin-left: 10px
|
199
|
+
// space out consecutive inline controls
|
200
|
+
|
201
|
+
// Apply same disabled cursor tweak as for inputs
|
202
|
+
//
|
203
|
+
// Note: Neither radios nor checkboxes can be readonly.
|
204
|
+
|
205
|
+
input[type="radio"],
|
206
|
+
input[type="checkbox"],
|
207
|
+
.radio,
|
208
|
+
.radio-inline,
|
209
|
+
.checkbox,
|
210
|
+
.checkbox-inline
|
211
|
+
&[disabled],
|
212
|
+
fieldset[disabled] &
|
213
|
+
cursor: not-allowed
|
214
|
+
|
215
|
+
|
216
|
+
/*
|
217
|
+
* Groups of checkboxes and radios, e.g.:
|
218
|
+
*
|
219
|
+
* <li>
|
220
|
+
* <ul class=check-list>
|
221
|
+
* <li>
|
222
|
+
* <input /> <label />
|
223
|
+
* </li>
|
224
|
+
* <li>
|
225
|
+
* <input /> <label />
|
226
|
+
* </li>
|
227
|
+
* </ul>
|
228
|
+
* </li>
|
229
|
+
* */
|
230
|
+
.check-list
|
231
|
+
list-style: none
|
232
|
+
margin: 0
|
233
|
+
padding-left: 0
|
234
|
+
|
235
|
+
/*
|
236
|
+
* Labels in check-lists */
|
237
|
+
|
238
|
+
.check-label,
|
239
|
+
.check-list label,
|
240
|
+
.check-list .label
|
241
|
+
display: inline-block
|
242
|
+
|
243
|
+
.check-list-inline
|
244
|
+
> li
|
245
|
+
display: inline-block
|
246
|
+
margin-right: $padding-base-horizontal
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
// Static form control text
|
252
|
+
//
|
253
|
+
// Apply class to a `p` element to make any string of text align with labels in
|
254
|
+
// a horizontal form layout.
|
255
|
+
|
256
|
+
.form-control-static
|
257
|
+
margin-bottom: 0
|
258
|
+
// Remove default margin from `p`
|
259
|
+
padding-top: $padding-base-vertical + 1
|
260
|
+
|
261
|
+
// Help text
|
262
|
+
//
|
263
|
+
// Apply to any element you wish to create light text for placement immediately
|
264
|
+
// below a form control. Use for general help, formatting, or instructional text.
|
265
|
+
|
266
|
+
.help-block
|
267
|
+
display: block
|
268
|
+
// account for any element using help-block
|
269
|
+
margin-top: 5px
|
270
|
+
margin-bottom: 10px
|
271
|
+
color: lighten($text-color, 25%)
|
272
|
+
// lighten the text some for contrast
|
273
|
+
|
274
|
+
// Inline forms
|
275
|
+
//
|
276
|
+
// Make forms appear inline(-block) by adding the `.form-inline` class. Inline
|
277
|
+
// forms begin stacked on extra small (mobile) devices and then go inline when
|
278
|
+
// viewports reach <768px.
|
279
|
+
//
|
280
|
+
// Requires wrapping inputs and labels with `.form-group` for proper display of
|
281
|
+
// default HTML form controls and our custom form controls (e.g., input groups).
|
282
|
+
//
|
283
|
+
// Heads up! This is mixin-ed into `.navbar-form` in navbars.less.
|
284
|
+
|
285
|
+
.form-inline
|
286
|
+
// Kick in the inline
|
287
|
+
@media (min-width: $screen-tablet)
|
288
|
+
// Inline-block all the things for "inline"
|
289
|
+
.form-group
|
290
|
+
display: inline-block
|
291
|
+
margin-bottom: 0
|
292
|
+
vertical-align: middle
|
293
|
+
// In navbar-form, allow folks to *not* use `.form-group`
|
294
|
+
.form-control
|
295
|
+
display: inline-block
|
296
|
+
// Remove default margin on radios/checkboxes that were used for stacking, and
|
297
|
+
// then undo the floating of radios and checkboxes to match (which also avoids
|
298
|
+
// a bug in WebKit: https://github.com/twbs/bootstrap/issues/1969).
|
299
|
+
.radio,
|
300
|
+
.checkbox
|
301
|
+
display: inline-block
|
302
|
+
margin-top: 0
|
303
|
+
margin-bottom: 0
|
304
|
+
padding-left: 0
|
305
|
+
.radio input[type="radio"],
|
306
|
+
.checkbox input[type="checkbox"]
|
307
|
+
float: none
|
308
|
+
margin-left: 0
|
309
|
+
|
310
|
+
// Horizontal forms
|
311
|
+
//
|
312
|
+
// Horizontal forms are built on grid classes and allow you to create forms with
|
313
|
+
// labels on the left and inputs on the right.
|
314
|
+
|
315
|
+
.form-horizontal
|
316
|
+
// Consistent vertical alignment of labels, radios, and checkboxes
|
317
|
+
.control-label,
|
318
|
+
.radio,
|
319
|
+
.checkbox,
|
320
|
+
.radio-inline,
|
321
|
+
.checkbox-inline
|
322
|
+
margin-top: 0
|
323
|
+
margin-bottom: 0
|
324
|
+
padding-top: $padding-base-vertical + 1
|
325
|
+
// Default padding plus a border
|
326
|
+
// Make form groups behave like rows
|
327
|
+
.form-group
|
328
|
+
+make-row
|
329
|
+
// Only right align form labels here when the columns stop stacking
|
330
|
+
@media (min-width: $screen-tablet)
|
331
|
+
.control-label
|
332
|
+
text-align: right
|
@@ -0,0 +1,119 @@
|
|
1
|
+
//
|
2
|
+
// Input groups
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
@if $use-input-group == true
|
6
|
+
|
7
|
+
// Base styles
|
8
|
+
// -------------------------
|
9
|
+
.input-group
|
10
|
+
position: relative
|
11
|
+
// For dropdowns
|
12
|
+
display: table
|
13
|
+
border-collapse: separate
|
14
|
+
// prevent input groups from inheriting border styles from table cells when placed within a table
|
15
|
+
// Undo padding and float of grid classes
|
16
|
+
&.col
|
17
|
+
float: none
|
18
|
+
padding-left: 0
|
19
|
+
padding-right: 0
|
20
|
+
.form-control
|
21
|
+
width: 100%
|
22
|
+
margin-bottom: 0
|
23
|
+
|
24
|
+
// Sizing options
|
25
|
+
//
|
26
|
+
// Remix the default form control sizing classes into new ones for easier
|
27
|
+
// manipulation.
|
28
|
+
|
29
|
+
.input-group-lg > .form-control,
|
30
|
+
.input-group-lg > .input-group-addon,
|
31
|
+
.input-group-lg > .input-group-btn > .btn
|
32
|
+
@extend .input-lg
|
33
|
+
|
34
|
+
.input-group-sm > .form-control,
|
35
|
+
.input-group-sm > .input-group-addon,
|
36
|
+
.input-group-sm > .input-group-btn > .btn
|
37
|
+
@extend .input-sm
|
38
|
+
|
39
|
+
// Display as table-cell
|
40
|
+
// -------------------------
|
41
|
+
|
42
|
+
.input-group-addon,
|
43
|
+
.input-group-btn,
|
44
|
+
.input-group .form-control
|
45
|
+
display: table-cell
|
46
|
+
&:not(:first-child):not(:last-child)
|
47
|
+
border-radius: 0
|
48
|
+
|
49
|
+
// Addon and addon wrapper for buttons
|
50
|
+
|
51
|
+
.input-group-addon,
|
52
|
+
.input-group-btn
|
53
|
+
width: 1%
|
54
|
+
white-space: nowrap
|
55
|
+
vertical-align: middle
|
56
|
+
// Match the inputs
|
57
|
+
|
58
|
+
// Text input groups
|
59
|
+
// -------------------------
|
60
|
+
.input-group-addon
|
61
|
+
padding: $padding-base-vertical $padding-base-horizontal
|
62
|
+
font-size: $font-size-base
|
63
|
+
font-weight: normal
|
64
|
+
line-height: 1
|
65
|
+
text-align: center
|
66
|
+
background-color: $input-group-addon-bg
|
67
|
+
border: 1px solid $input-group-addon-border-color
|
68
|
+
border-radius: $border-radius-base
|
69
|
+
// Sizing
|
70
|
+
&.input-sm
|
71
|
+
padding: $padding-small-vertical $padding-small-horizontal
|
72
|
+
font-size: $font-size-small
|
73
|
+
border-radius: $border-radius-small
|
74
|
+
&.input-lg
|
75
|
+
padding: $padding-large-vertical $padding-large-horizontal
|
76
|
+
font-size: $font-size-large
|
77
|
+
border-radius: $border-radius-large
|
78
|
+
// Nuke default margins from checkboxes and radios to vertically center within.
|
79
|
+
input[type="radio"],
|
80
|
+
input[type="checkbox"]
|
81
|
+
margin-top: 0
|
82
|
+
|
83
|
+
// Reset rounded corners
|
84
|
+
|
85
|
+
.input-group .form-control:first-child,
|
86
|
+
.input-group-addon:first-child,
|
87
|
+
.input-group-btn:first-child > .btn,
|
88
|
+
.input-group-btn:first-child > .dropdown-toggle,
|
89
|
+
.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle)
|
90
|
+
+border-right-radius(0)
|
91
|
+
|
92
|
+
.input-group-addon:first-child
|
93
|
+
border-right: 0
|
94
|
+
|
95
|
+
.input-group .form-control:last-child,
|
96
|
+
.input-group-addon:last-child,
|
97
|
+
.input-group-btn:last-child > .btn,
|
98
|
+
.input-group-btn:last-child > .dropdown-toggle,
|
99
|
+
.input-group-btn:first-child > .btn:not(:first-child)
|
100
|
+
+border-left-radius(0)
|
101
|
+
|
102
|
+
.input-group-addon:last-child
|
103
|
+
border-left: 0
|
104
|
+
|
105
|
+
// Button input groups
|
106
|
+
// -------------------------
|
107
|
+
.input-group-btn
|
108
|
+
position: relative
|
109
|
+
white-space: nowrap
|
110
|
+
|
111
|
+
.input-group-btn > .btn
|
112
|
+
position: relative
|
113
|
+
// Jankily prevent input button groups from wrapping
|
114
|
+
+ .btn
|
115
|
+
margin-left: -4px
|
116
|
+
// Bring the "active" button to the front
|
117
|
+
&:hover,
|
118
|
+
&:active
|
119
|
+
z-index: 2
|