aerogel-bootstrap 0.0.2 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/aerogel-bootstrap.gemspec +3 -3
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +229 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
- data/assets/javascripts/bootstrap.js +12 -0
- data/assets/javascripts/bootstrap/affix.js +135 -0
- data/assets/javascripts/bootstrap/alert.js +88 -0
- data/assets/javascripts/bootstrap/button.js +107 -0
- data/assets/javascripts/bootstrap/carousel.js +205 -0
- data/assets/javascripts/bootstrap/collapse.js +175 -0
- data/assets/javascripts/bootstrap/dropdown.js +147 -0
- data/assets/javascripts/bootstrap/modal.js +271 -0
- data/assets/javascripts/bootstrap/popover.js +110 -0
- data/assets/javascripts/bootstrap/scrollspy.js +154 -0
- data/assets/javascripts/bootstrap/tab.js +125 -0
- data/assets/javascripts/bootstrap/tooltip.js +422 -0
- data/assets/javascripts/bootstrap/transition.js +48 -0
- data/assets/stylesheets/_bootstrap-mincer.scss +17 -0
- data/assets/stylesheets/bootstrap.scss +50 -0
- data/assets/stylesheets/bootstrap/_alerts.scss +67 -0
- data/assets/stylesheets/bootstrap/_badges.scss +57 -0
- data/assets/stylesheets/bootstrap/_breadcrumbs.scss +26 -0
- data/assets/stylesheets/bootstrap/_button-groups.scss +236 -0
- data/assets/stylesheets/bootstrap/_buttons.scss +159 -0
- data/assets/stylesheets/bootstrap/_carousel.scss +241 -0
- data/assets/stylesheets/bootstrap/_close.scss +35 -0
- data/assets/stylesheets/bootstrap/_code.scss +62 -0
- data/assets/stylesheets/bootstrap/_component-animations.scss +35 -0
- data/assets/stylesheets/bootstrap/_dropdowns.scss +214 -0
- data/assets/stylesheets/bootstrap/_forms.scss +478 -0
- data/assets/stylesheets/bootstrap/_glyphicons.scss +237 -0
- data/assets/stylesheets/bootstrap/_grid.scss +84 -0
- data/assets/stylesheets/bootstrap/_input-groups.scss +162 -0
- data/assets/stylesheets/bootstrap/_jumbotron.scss +48 -0
- data/assets/stylesheets/bootstrap/_labels.scss +66 -0
- data/assets/stylesheets/bootstrap/_list-group.scss +129 -0
- data/assets/stylesheets/bootstrap/_media.scss +56 -0
- data/assets/stylesheets/bootstrap/_mixins.scss +39 -0
- data/assets/stylesheets/bootstrap/_modals.scss +147 -0
- data/assets/stylesheets/bootstrap/_navbar.scss +658 -0
- data/assets/stylesheets/bootstrap/_navs.scss +242 -0
- data/assets/stylesheets/bootstrap/_normalize.scss +425 -0
- data/assets/stylesheets/bootstrap/_pager.scss +55 -0
- data/assets/stylesheets/bootstrap/_pagination.scss +88 -0
- data/assets/stylesheets/bootstrap/_panels.scss +240 -0
- data/assets/stylesheets/bootstrap/_popovers.scss +133 -0
- data/assets/stylesheets/bootstrap/_print.scss +101 -0
- data/assets/stylesheets/bootstrap/_progress-bars.scss +89 -0
- data/assets/stylesheets/bootstrap/_responsive-embed.scss +34 -0
- data/assets/stylesheets/bootstrap/_responsive-utilities.scss +173 -0
- data/assets/stylesheets/bootstrap/_scaffolding.scss +150 -0
- data/assets/stylesheets/bootstrap/_tables.scss +233 -0
- data/assets/stylesheets/bootstrap/_theme.scss +247 -0
- data/assets/stylesheets/bootstrap/_thumbnails.scss +38 -0
- data/assets/stylesheets/bootstrap/_tooltip.scss +95 -0
- data/assets/stylesheets/bootstrap/_type.scss +294 -0
- data/assets/stylesheets/bootstrap/_utilities.scss +56 -0
- data/assets/stylesheets/bootstrap/_variables.scss +849 -0
- data/assets/stylesheets/bootstrap/_wells.scss +29 -0
- data/assets/stylesheets/bootstrap/bootstrap.scss +50 -0
- data/assets/stylesheets/bootstrap/mixins/_alerts.scss +14 -0
- data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +11 -0
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +18 -0
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +50 -0
- data/assets/stylesheets/bootstrap/mixins/_center-block.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +22 -0
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +84 -0
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +58 -0
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +87 -0
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +122 -0
- data/assets/stylesheets/bootstrap/mixins/_hide-text.scss +21 -0
- data/assets/stylesheets/bootstrap/mixins/_image.scss +33 -0
- data/assets/stylesheets/bootstrap/mixins/_labels.scss +12 -0
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +31 -0
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +10 -0
- data/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +9 -0
- data/assets/stylesheets/bootstrap/mixins/_opacity.scss +8 -0
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +23 -0
- data/assets/stylesheets/bootstrap/mixins/_panels.scss +20 -0
- data/assets/stylesheets/bootstrap/mixins/_progress-bar.scss +8 -0
- data/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +8 -0
- data/assets/stylesheets/bootstrap/mixins/_resize.scss +6 -0
- data/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +21 -0
- data/assets/stylesheets/bootstrap/mixins/_size.scss +10 -0
- data/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +9 -0
- data/assets/stylesheets/bootstrap/mixins/_table-row.scss +28 -0
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +11 -0
- data/assets/stylesheets/bootstrap/mixins/_text-overflow.scss +8 -0
- data/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +224 -0
- data/lib/aerogel/bootstrap.rb +5 -7
- data/lib/aerogel/bootstrap/version.rb +5 -0
- metadata +104 -29
- data/public/README.md +0 -1
@@ -0,0 +1,35 @@
|
|
1
|
+
//
|
2
|
+
// Component animations
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
// Heads up!
|
6
|
+
//
|
7
|
+
// We don't use the `.opacity()` mixin here since it causes a bug with text
|
8
|
+
// fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552.
|
9
|
+
|
10
|
+
.fade {
|
11
|
+
opacity: 0;
|
12
|
+
@include transition(opacity .15s linear);
|
13
|
+
&.in {
|
14
|
+
opacity: 1;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
18
|
+
.collapse {
|
19
|
+
display: none;
|
20
|
+
|
21
|
+
&.in { display: block; }
|
22
|
+
// [converter] extracted tr&.in to tr.collapse.in
|
23
|
+
// [converter] extracted tbody&.in to tbody.collapse.in
|
24
|
+
}
|
25
|
+
|
26
|
+
tr.collapse.in { display: table-row; }
|
27
|
+
|
28
|
+
tbody.collapse.in { display: table-row-group; }
|
29
|
+
|
30
|
+
.collapsing {
|
31
|
+
position: relative;
|
32
|
+
height: 0;
|
33
|
+
overflow: hidden;
|
34
|
+
@include transition(height .35s ease);
|
35
|
+
}
|
@@ -0,0 +1,214 @@
|
|
1
|
+
//
|
2
|
+
// Dropdown menus
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
// Dropdown arrow/caret
|
7
|
+
.caret {
|
8
|
+
display: inline-block;
|
9
|
+
width: 0;
|
10
|
+
height: 0;
|
11
|
+
margin-left: 2px;
|
12
|
+
vertical-align: middle;
|
13
|
+
border-top: $caret-width-base solid;
|
14
|
+
border-right: $caret-width-base solid transparent;
|
15
|
+
border-left: $caret-width-base solid transparent;
|
16
|
+
}
|
17
|
+
|
18
|
+
// The dropdown wrapper (div)
|
19
|
+
.dropdown {
|
20
|
+
position: relative;
|
21
|
+
}
|
22
|
+
|
23
|
+
// Prevent the focus on the dropdown toggle when closing dropdowns
|
24
|
+
.dropdown-toggle:focus {
|
25
|
+
outline: 0;
|
26
|
+
}
|
27
|
+
|
28
|
+
// The dropdown menu (ul)
|
29
|
+
.dropdown-menu {
|
30
|
+
position: absolute;
|
31
|
+
top: 100%;
|
32
|
+
left: 0;
|
33
|
+
z-index: $zindex-dropdown;
|
34
|
+
display: none; // none by default, but block on "open" of the menu
|
35
|
+
float: left;
|
36
|
+
min-width: 160px;
|
37
|
+
padding: 5px 0;
|
38
|
+
margin: 2px 0 0; // override default ul
|
39
|
+
list-style: none;
|
40
|
+
font-size: $font-size-base;
|
41
|
+
text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
|
42
|
+
background-color: $dropdown-bg;
|
43
|
+
border: 1px solid $dropdown-fallback-border; // IE8 fallback
|
44
|
+
border: 1px solid $dropdown-border;
|
45
|
+
border-radius: $border-radius-base;
|
46
|
+
@include box-shadow(0 6px 12px rgba(0,0,0,.175));
|
47
|
+
background-clip: padding-box;
|
48
|
+
|
49
|
+
// Aligns the dropdown menu to right
|
50
|
+
//
|
51
|
+
// Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`
|
52
|
+
&.pull-right {
|
53
|
+
right: 0;
|
54
|
+
left: auto;
|
55
|
+
}
|
56
|
+
|
57
|
+
// Dividers (basically an hr) within the dropdown
|
58
|
+
.divider {
|
59
|
+
@include nav-divider($dropdown-divider-bg);
|
60
|
+
}
|
61
|
+
|
62
|
+
// Links within the dropdown menu
|
63
|
+
> li > a {
|
64
|
+
display: block;
|
65
|
+
padding: 3px 20px;
|
66
|
+
clear: both;
|
67
|
+
font-weight: normal;
|
68
|
+
line-height: $line-height-base;
|
69
|
+
color: $dropdown-link-color;
|
70
|
+
white-space: nowrap; // prevent links from randomly breaking onto new lines
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
74
|
+
// Hover/Focus state
|
75
|
+
.dropdown-menu > li > a {
|
76
|
+
&:hover,
|
77
|
+
&:focus {
|
78
|
+
text-decoration: none;
|
79
|
+
color: $dropdown-link-hover-color;
|
80
|
+
background-color: $dropdown-link-hover-bg;
|
81
|
+
}
|
82
|
+
}
|
83
|
+
|
84
|
+
// Active state
|
85
|
+
.dropdown-menu > .active > a {
|
86
|
+
&,
|
87
|
+
&:hover,
|
88
|
+
&:focus {
|
89
|
+
color: $dropdown-link-active-color;
|
90
|
+
text-decoration: none;
|
91
|
+
outline: 0;
|
92
|
+
background-color: $dropdown-link-active-bg;
|
93
|
+
}
|
94
|
+
}
|
95
|
+
|
96
|
+
// Disabled state
|
97
|
+
//
|
98
|
+
// Gray out text and ensure the hover/focus state remains gray
|
99
|
+
|
100
|
+
.dropdown-menu > .disabled > a {
|
101
|
+
&,
|
102
|
+
&:hover,
|
103
|
+
&:focus {
|
104
|
+
color: $dropdown-link-disabled-color;
|
105
|
+
}
|
106
|
+
}
|
107
|
+
// Nuke hover/focus effects
|
108
|
+
.dropdown-menu > .disabled > a {
|
109
|
+
&:hover,
|
110
|
+
&:focus {
|
111
|
+
text-decoration: none;
|
112
|
+
background-color: transparent;
|
113
|
+
background-image: none; // Remove CSS gradient
|
114
|
+
@include reset-filter();
|
115
|
+
cursor: not-allowed;
|
116
|
+
}
|
117
|
+
}
|
118
|
+
|
119
|
+
// Open state for the dropdown
|
120
|
+
.open {
|
121
|
+
// Show the menu
|
122
|
+
> .dropdown-menu {
|
123
|
+
display: block;
|
124
|
+
}
|
125
|
+
|
126
|
+
// Remove the outline when :focus is triggered
|
127
|
+
> a {
|
128
|
+
outline: 0;
|
129
|
+
}
|
130
|
+
}
|
131
|
+
|
132
|
+
// Menu positioning
|
133
|
+
//
|
134
|
+
// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown
|
135
|
+
// menu with the parent.
|
136
|
+
.dropdown-menu-right {
|
137
|
+
left: auto; // Reset the default from `.dropdown-menu`
|
138
|
+
right: 0;
|
139
|
+
}
|
140
|
+
// With v3, we enabled auto-flipping if you have a dropdown within a right
|
141
|
+
// aligned nav component. To enable the undoing of that, we provide an override
|
142
|
+
// to restore the default dropdown menu alignment.
|
143
|
+
//
|
144
|
+
// This is only for left-aligning a dropdown menu within a `.navbar-right` or
|
145
|
+
// `.pull-right` nav component.
|
146
|
+
.dropdown-menu-left {
|
147
|
+
left: 0;
|
148
|
+
right: auto;
|
149
|
+
}
|
150
|
+
|
151
|
+
// Dropdown section headers
|
152
|
+
.dropdown-header {
|
153
|
+
display: block;
|
154
|
+
padding: 3px 20px;
|
155
|
+
font-size: $font-size-small;
|
156
|
+
line-height: $line-height-base;
|
157
|
+
color: $dropdown-header-color;
|
158
|
+
}
|
159
|
+
|
160
|
+
// Backdrop to catch body clicks on mobile, etc.
|
161
|
+
.dropdown-backdrop {
|
162
|
+
position: fixed;
|
163
|
+
left: 0;
|
164
|
+
right: 0;
|
165
|
+
bottom: 0;
|
166
|
+
top: 0;
|
167
|
+
z-index: ($zindex-dropdown - 10);
|
168
|
+
}
|
169
|
+
|
170
|
+
// Right aligned dropdowns
|
171
|
+
.pull-right > .dropdown-menu {
|
172
|
+
right: 0;
|
173
|
+
left: auto;
|
174
|
+
}
|
175
|
+
|
176
|
+
// Allow for dropdowns to go bottom up (aka, dropup-menu)
|
177
|
+
//
|
178
|
+
// Just add .dropup after the standard .dropdown class and you're set, bro.
|
179
|
+
// TODO: abstract this so that the navbar fixed styles are not placed here?
|
180
|
+
|
181
|
+
.dropup,
|
182
|
+
.navbar-fixed-bottom .dropdown {
|
183
|
+
// Reverse the caret
|
184
|
+
.caret {
|
185
|
+
border-top: 0;
|
186
|
+
border-bottom: $caret-width-base solid;
|
187
|
+
content: "";
|
188
|
+
}
|
189
|
+
// Different positioning for bottom up menu
|
190
|
+
.dropdown-menu {
|
191
|
+
top: auto;
|
192
|
+
bottom: 100%;
|
193
|
+
margin-bottom: 1px;
|
194
|
+
}
|
195
|
+
}
|
196
|
+
|
197
|
+
|
198
|
+
// Component alignment
|
199
|
+
//
|
200
|
+
// Reiterate per navbar.less and the modified component alignment there.
|
201
|
+
|
202
|
+
@media (min-width: $grid-float-breakpoint) {
|
203
|
+
.navbar-right {
|
204
|
+
.dropdown-menu {
|
205
|
+
right: 0; left: auto;
|
206
|
+
}
|
207
|
+
// Necessary for overrides of the default right aligned menu.
|
208
|
+
// Will remove come v4 in all likelihood.
|
209
|
+
.dropdown-menu-left {
|
210
|
+
left: 0; right: auto;
|
211
|
+
}
|
212
|
+
}
|
213
|
+
}
|
214
|
+
|
@@ -0,0 +1,478 @@
|
|
1
|
+
//
|
2
|
+
// Forms
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
// Normalize non-controls
|
7
|
+
//
|
8
|
+
// Restyle and baseline non-control form elements.
|
9
|
+
|
10
|
+
fieldset {
|
11
|
+
padding: 0;
|
12
|
+
margin: 0;
|
13
|
+
border: 0;
|
14
|
+
// Chrome and Firefox set a `min-width: -webkit-min-content;` on fieldsets,
|
15
|
+
// so we reset that to ensure it behaves more like a standard block element.
|
16
|
+
// See https://github.com/twbs/bootstrap/issues/12359.
|
17
|
+
min-width: 0;
|
18
|
+
}
|
19
|
+
|
20
|
+
legend {
|
21
|
+
display: block;
|
22
|
+
width: 100%;
|
23
|
+
padding: 0;
|
24
|
+
margin-bottom: $line-height-computed;
|
25
|
+
font-size: ($font-size-base * 1.5);
|
26
|
+
line-height: inherit;
|
27
|
+
color: $legend-color;
|
28
|
+
border: 0;
|
29
|
+
border-bottom: 1px solid $legend-border-color;
|
30
|
+
}
|
31
|
+
|
32
|
+
label {
|
33
|
+
display: inline-block;
|
34
|
+
max-width: 100%; // Force IE8 to wrap long content (see https://github.com/twbs/bootstrap/issues/13141)
|
35
|
+
margin-bottom: 5px;
|
36
|
+
font-weight: bold;
|
37
|
+
}
|
38
|
+
|
39
|
+
|
40
|
+
// Normalize form controls
|
41
|
+
//
|
42
|
+
// While most of our form styles require extra classes, some basic normalization
|
43
|
+
// is required to ensure optimum display with or without those classes to better
|
44
|
+
// address browser inconsistencies.
|
45
|
+
|
46
|
+
// Override content-box in Normalize (* isn't specific enough)
|
47
|
+
input[type="search"] {
|
48
|
+
@include box-sizing(border-box);
|
49
|
+
}
|
50
|
+
|
51
|
+
// Position radios and checkboxes better
|
52
|
+
input[type="radio"],
|
53
|
+
input[type="checkbox"] {
|
54
|
+
margin: 4px 0 0;
|
55
|
+
margin-top: 1px \9; // IE8-9
|
56
|
+
line-height: normal;
|
57
|
+
}
|
58
|
+
|
59
|
+
// Set the height of file controls to match text inputs
|
60
|
+
input[type="file"] {
|
61
|
+
display: block;
|
62
|
+
}
|
63
|
+
|
64
|
+
// Make range inputs behave like textual form controls
|
65
|
+
input[type="range"] {
|
66
|
+
display: block;
|
67
|
+
width: 100%;
|
68
|
+
}
|
69
|
+
|
70
|
+
// Make multiple select elements height not fixed
|
71
|
+
select[multiple],
|
72
|
+
select[size] {
|
73
|
+
height: auto;
|
74
|
+
}
|
75
|
+
|
76
|
+
// Focus for file, radio, and checkbox
|
77
|
+
input[type="file"]:focus,
|
78
|
+
input[type="radio"]:focus,
|
79
|
+
input[type="checkbox"]:focus {
|
80
|
+
@include tab-focus();
|
81
|
+
}
|
82
|
+
|
83
|
+
// Adjust output element
|
84
|
+
output {
|
85
|
+
display: block;
|
86
|
+
padding-top: ($padding-base-vertical + 1);
|
87
|
+
font-size: $font-size-base;
|
88
|
+
line-height: $line-height-base;
|
89
|
+
color: $input-color;
|
90
|
+
}
|
91
|
+
|
92
|
+
|
93
|
+
// Common form controls
|
94
|
+
//
|
95
|
+
// Shared size and type resets for form controls. Apply `.form-control` to any
|
96
|
+
// of the following form controls:
|
97
|
+
//
|
98
|
+
// select
|
99
|
+
// textarea
|
100
|
+
// input[type="text"]
|
101
|
+
// input[type="password"]
|
102
|
+
// input[type="datetime"]
|
103
|
+
// input[type="datetime-local"]
|
104
|
+
// input[type="date"]
|
105
|
+
// input[type="month"]
|
106
|
+
// input[type="time"]
|
107
|
+
// input[type="week"]
|
108
|
+
// input[type="number"]
|
109
|
+
// input[type="email"]
|
110
|
+
// input[type="url"]
|
111
|
+
// input[type="search"]
|
112
|
+
// input[type="tel"]
|
113
|
+
// input[type="color"]
|
114
|
+
|
115
|
+
.form-control {
|
116
|
+
display: block;
|
117
|
+
width: 100%;
|
118
|
+
height: $input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)
|
119
|
+
padding: $padding-base-vertical $padding-base-horizontal;
|
120
|
+
font-size: $font-size-base;
|
121
|
+
line-height: $line-height-base;
|
122
|
+
color: $input-color;
|
123
|
+
background-color: $input-bg;
|
124
|
+
background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
|
125
|
+
border: 1px solid $input-border;
|
126
|
+
border-radius: $input-border-radius;
|
127
|
+
@include box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
|
128
|
+
@include transition(border-color ease-in-out .15s, box-shadow ease-in-out .15s);
|
129
|
+
|
130
|
+
// Customize the `:focus` state to imitate native WebKit styles.
|
131
|
+
@include form-control-focus();
|
132
|
+
|
133
|
+
// Placeholder
|
134
|
+
@include placeholder();
|
135
|
+
|
136
|
+
// Disabled and read-only inputs
|
137
|
+
//
|
138
|
+
// HTML5 says that controls under a fieldset > legend:first-child won't be
|
139
|
+
// disabled if the fieldset is disabled. Due to implementation difficulty, we
|
140
|
+
// don't honor that edge case; we style them as disabled anyway.
|
141
|
+
&[disabled],
|
142
|
+
&[readonly],
|
143
|
+
fieldset[disabled] & {
|
144
|
+
cursor: not-allowed;
|
145
|
+
background-color: $input-bg-disabled;
|
146
|
+
opacity: 1; // iOS fix for unreadable disabled content
|
147
|
+
}
|
148
|
+
|
149
|
+
// [converter] extracted textarea& to textarea.form-control
|
150
|
+
}
|
151
|
+
|
152
|
+
// Reset height for `textarea`s
|
153
|
+
textarea.form-control {
|
154
|
+
height: auto;
|
155
|
+
}
|
156
|
+
|
157
|
+
|
158
|
+
// Search inputs in iOS
|
159
|
+
//
|
160
|
+
// This overrides the extra rounded corners on search inputs in iOS so that our
|
161
|
+
// `.form-control` class can properly style them. Note that this cannot simply
|
162
|
+
// be added to `.form-control` as it's not specific enough. For details, see
|
163
|
+
// https://github.com/twbs/bootstrap/issues/11586.
|
164
|
+
|
165
|
+
input[type="search"] {
|
166
|
+
-webkit-appearance: none;
|
167
|
+
}
|
168
|
+
|
169
|
+
|
170
|
+
// Special styles for iOS date input
|
171
|
+
//
|
172
|
+
// In Mobile Safari, date inputs require a pixel line-height that matches the
|
173
|
+
// given height of the input. Since this fucks up everything else, we have to
|
174
|
+
// appropriately reset it for Internet Explorer and the size variations.
|
175
|
+
|
176
|
+
input[type="date"],
|
177
|
+
input[type="time"],
|
178
|
+
input[type="datetime-local"],
|
179
|
+
input[type="month"] {
|
180
|
+
line-height: $input-height-base;
|
181
|
+
// IE8+ misaligns the text within date inputs, so we reset
|
182
|
+
line-height: $line-height-base #{\0};
|
183
|
+
|
184
|
+
&.input-sm {
|
185
|
+
line-height: $input-height-small;
|
186
|
+
}
|
187
|
+
&.input-lg {
|
188
|
+
line-height: $input-height-large;
|
189
|
+
}
|
190
|
+
}
|
191
|
+
|
192
|
+
|
193
|
+
// Form groups
|
194
|
+
//
|
195
|
+
// Designed to help with the organization and spacing of vertical forms. For
|
196
|
+
// horizontal forms, use the predefined grid classes.
|
197
|
+
|
198
|
+
.form-group {
|
199
|
+
margin-bottom: 15px;
|
200
|
+
}
|
201
|
+
|
202
|
+
|
203
|
+
// Checkboxes and radios
|
204
|
+
//
|
205
|
+
// Indent the labels to position radios/checkboxes as hanging controls.
|
206
|
+
|
207
|
+
.radio,
|
208
|
+
.checkbox {
|
209
|
+
display: block;
|
210
|
+
min-height: $line-height-computed; // clear the floating input if there is no label text
|
211
|
+
margin-top: 10px;
|
212
|
+
margin-bottom: 10px;
|
213
|
+
|
214
|
+
label {
|
215
|
+
padding-left: 20px;
|
216
|
+
margin-bottom: 0;
|
217
|
+
font-weight: normal;
|
218
|
+
cursor: pointer;
|
219
|
+
}
|
220
|
+
}
|
221
|
+
.radio input[type="radio"],
|
222
|
+
.radio-inline input[type="radio"],
|
223
|
+
.checkbox input[type="checkbox"],
|
224
|
+
.checkbox-inline input[type="checkbox"] {
|
225
|
+
float: left;
|
226
|
+
margin-left: -20px;
|
227
|
+
}
|
228
|
+
.radio + .radio,
|
229
|
+
.checkbox + .checkbox {
|
230
|
+
margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing
|
231
|
+
}
|
232
|
+
|
233
|
+
// Radios and checkboxes on same line
|
234
|
+
.radio-inline,
|
235
|
+
.checkbox-inline {
|
236
|
+
display: inline-block;
|
237
|
+
padding-left: 20px;
|
238
|
+
margin-bottom: 0;
|
239
|
+
vertical-align: middle;
|
240
|
+
font-weight: normal;
|
241
|
+
cursor: pointer;
|
242
|
+
}
|
243
|
+
.radio-inline + .radio-inline,
|
244
|
+
.checkbox-inline + .checkbox-inline {
|
245
|
+
margin-top: 0;
|
246
|
+
margin-left: 10px; // space out consecutive inline controls
|
247
|
+
}
|
248
|
+
|
249
|
+
// Apply same disabled cursor tweak as for inputs
|
250
|
+
//
|
251
|
+
// Note: Neither radios nor checkboxes can be readonly.
|
252
|
+
input[type="radio"],
|
253
|
+
input[type="checkbox"],
|
254
|
+
.radio,
|
255
|
+
.radio-inline,
|
256
|
+
.checkbox,
|
257
|
+
.checkbox-inline {
|
258
|
+
&[disabled],
|
259
|
+
fieldset[disabled] & {
|
260
|
+
cursor: not-allowed;
|
261
|
+
}
|
262
|
+
}
|
263
|
+
|
264
|
+
|
265
|
+
// Form control sizing
|
266
|
+
//
|
267
|
+
// Build on `.form-control` with modifier classes to decrease or increase the
|
268
|
+
// height and font-size of form controls.
|
269
|
+
|
270
|
+
@include input-size('.input-sm', $input-height-small, $padding-small-vertical, $padding-small-horizontal, $font-size-small, $line-height-small, $border-radius-small);
|
271
|
+
|
272
|
+
@include input-size('.input-lg', $input-height-large, $padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $border-radius-large);
|
273
|
+
|
274
|
+
|
275
|
+
// Form control feedback states
|
276
|
+
//
|
277
|
+
// Apply contextual and semantic states to individual form controls.
|
278
|
+
|
279
|
+
.has-feedback {
|
280
|
+
// Enable absolute positioning
|
281
|
+
position: relative;
|
282
|
+
|
283
|
+
// Ensure icons don't overlap text
|
284
|
+
.form-control {
|
285
|
+
padding-right: ($input-height-base * 1.25);
|
286
|
+
}
|
287
|
+
}
|
288
|
+
// Feedback icon (requires .glyphicon classes)
|
289
|
+
.form-control-feedback {
|
290
|
+
position: absolute;
|
291
|
+
top: ($line-height-computed + 5); // Height of the `label` and its margin
|
292
|
+
right: 0;
|
293
|
+
z-index: 2; // Ensure icon is above input groups
|
294
|
+
display: block;
|
295
|
+
width: $input-height-base;
|
296
|
+
height: $input-height-base;
|
297
|
+
line-height: $input-height-base;
|
298
|
+
text-align: center;
|
299
|
+
}
|
300
|
+
.input-lg + .form-control-feedback {
|
301
|
+
width: $input-height-large;
|
302
|
+
height: $input-height-large;
|
303
|
+
line-height: $input-height-large;
|
304
|
+
}
|
305
|
+
.input-sm + .form-control-feedback {
|
306
|
+
width: $input-height-small;
|
307
|
+
height: $input-height-small;
|
308
|
+
line-height: $input-height-small;
|
309
|
+
}
|
310
|
+
|
311
|
+
// Feedback states
|
312
|
+
.has-success {
|
313
|
+
@include form-control-validation($state-success-text, $state-success-text, $state-success-bg);
|
314
|
+
}
|
315
|
+
.has-warning {
|
316
|
+
@include form-control-validation($state-warning-text, $state-warning-text, $state-warning-bg);
|
317
|
+
}
|
318
|
+
.has-error {
|
319
|
+
@include form-control-validation($state-danger-text, $state-danger-text, $state-danger-bg);
|
320
|
+
}
|
321
|
+
|
322
|
+
|
323
|
+
// Static form control text
|
324
|
+
//
|
325
|
+
// Apply class to a `p` element to make any string of text align with labels in
|
326
|
+
// a horizontal form layout.
|
327
|
+
|
328
|
+
.form-control-static {
|
329
|
+
margin-bottom: 0; // Remove default margin from `p`
|
330
|
+
}
|
331
|
+
|
332
|
+
|
333
|
+
// Help text
|
334
|
+
//
|
335
|
+
// Apply to any element you wish to create light text for placement immediately
|
336
|
+
// below a form control. Use for general help, formatting, or instructional text.
|
337
|
+
|
338
|
+
.help-block {
|
339
|
+
display: block; // account for any element using help-block
|
340
|
+
margin-top: 5px;
|
341
|
+
margin-bottom: 10px;
|
342
|
+
color: lighten($text-color, 25%); // lighten the text some for contrast
|
343
|
+
}
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
// Inline forms
|
348
|
+
//
|
349
|
+
// Make forms appear inline(-block) by adding the `.form-inline` class. Inline
|
350
|
+
// forms begin stacked on extra small (mobile) devices and then go inline when
|
351
|
+
// viewports reach <768px.
|
352
|
+
//
|
353
|
+
// Requires wrapping inputs and labels with `.form-group` for proper display of
|
354
|
+
// default HTML form controls and our custom form controls (e.g., input groups).
|
355
|
+
//
|
356
|
+
// Heads up! This is mixin-ed into `.navbar-form` in navbars.less.
|
357
|
+
|
358
|
+
.form-inline {
|
359
|
+
|
360
|
+
// Kick in the inline
|
361
|
+
@media (min-width: $screen-sm-min) {
|
362
|
+
// Inline-block all the things for "inline"
|
363
|
+
.form-group {
|
364
|
+
display: inline-block;
|
365
|
+
margin-bottom: 0;
|
366
|
+
vertical-align: middle;
|
367
|
+
}
|
368
|
+
|
369
|
+
// In navbar-form, allow folks to *not* use `.form-group`
|
370
|
+
.form-control {
|
371
|
+
display: inline-block;
|
372
|
+
width: auto; // Prevent labels from stacking above inputs in `.form-group`
|
373
|
+
vertical-align: middle;
|
374
|
+
}
|
375
|
+
|
376
|
+
.input-group {
|
377
|
+
display: inline-table;
|
378
|
+
vertical-align: middle;
|
379
|
+
|
380
|
+
.input-group-addon,
|
381
|
+
.input-group-btn,
|
382
|
+
.form-control {
|
383
|
+
width: auto;
|
384
|
+
}
|
385
|
+
}
|
386
|
+
|
387
|
+
// Input groups need that 100% width though
|
388
|
+
.input-group > .form-control {
|
389
|
+
width: 100%;
|
390
|
+
}
|
391
|
+
|
392
|
+
.control-label {
|
393
|
+
margin-bottom: 0;
|
394
|
+
vertical-align: middle;
|
395
|
+
}
|
396
|
+
|
397
|
+
// Remove default margin on radios/checkboxes that were used for stacking, and
|
398
|
+
// then undo the floating of radios and checkboxes to match (which also avoids
|
399
|
+
// a bug in WebKit: https://github.com/twbs/bootstrap/issues/1969).
|
400
|
+
.radio,
|
401
|
+
.checkbox {
|
402
|
+
display: inline-block;
|
403
|
+
margin-top: 0;
|
404
|
+
margin-bottom: 0;
|
405
|
+
padding-left: 0;
|
406
|
+
vertical-align: middle;
|
407
|
+
}
|
408
|
+
.radio input[type="radio"],
|
409
|
+
.checkbox input[type="checkbox"] {
|
410
|
+
float: none;
|
411
|
+
margin-left: 0;
|
412
|
+
}
|
413
|
+
|
414
|
+
// Validation states
|
415
|
+
//
|
416
|
+
// Reposition the icon because it's now within a grid column and columns have
|
417
|
+
// `position: relative;` on them. Also accounts for the grid gutter padding.
|
418
|
+
.has-feedback .form-control-feedback {
|
419
|
+
top: 0;
|
420
|
+
}
|
421
|
+
}
|
422
|
+
}
|
423
|
+
|
424
|
+
|
425
|
+
// Horizontal forms
|
426
|
+
//
|
427
|
+
// Horizontal forms are built on grid classes and allow you to create forms with
|
428
|
+
// labels on the left and inputs on the right.
|
429
|
+
|
430
|
+
.form-horizontal {
|
431
|
+
|
432
|
+
// Consistent vertical alignment of radios and checkboxes
|
433
|
+
//
|
434
|
+
// Labels also get some reset styles, but that is scoped to a media query below.
|
435
|
+
.radio,
|
436
|
+
.checkbox,
|
437
|
+
.radio-inline,
|
438
|
+
.checkbox-inline {
|
439
|
+
margin-top: 0;
|
440
|
+
margin-bottom: 0;
|
441
|
+
padding-top: ($padding-base-vertical + 1); // Default padding plus a border
|
442
|
+
}
|
443
|
+
// Account for padding we're adding to ensure the alignment and of help text
|
444
|
+
// and other content below items
|
445
|
+
.radio,
|
446
|
+
.checkbox {
|
447
|
+
min-height: ($line-height-computed + ($padding-base-vertical + 1));
|
448
|
+
}
|
449
|
+
|
450
|
+
// Make form groups behave like rows
|
451
|
+
.form-group {
|
452
|
+
@include make-row();
|
453
|
+
}
|
454
|
+
|
455
|
+
.form-control-static {
|
456
|
+
padding-top: ($padding-base-vertical + 1);
|
457
|
+
padding-bottom: ($padding-base-vertical + 1);
|
458
|
+
}
|
459
|
+
|
460
|
+
// Reset spacing and right align labels, but scope to media queries so that
|
461
|
+
// labels on narrow viewports stack the same as a default form example.
|
462
|
+
@media (min-width: $screen-sm-min) {
|
463
|
+
.control-label {
|
464
|
+
text-align: right;
|
465
|
+
margin-bottom: 0;
|
466
|
+
padding-top: ($padding-base-vertical + 1); // Default padding plus a border
|
467
|
+
}
|
468
|
+
}
|
469
|
+
|
470
|
+
// Validation states
|
471
|
+
//
|
472
|
+
// Reposition the icon because it's now within a grid column and columns have
|
473
|
+
// `position: relative;` on them. Also accounts for the grid gutter padding.
|
474
|
+
.has-feedback .form-control-feedback {
|
475
|
+
top: 0;
|
476
|
+
right: ($grid-gutter-width / 2);
|
477
|
+
}
|
478
|
+
}
|