sass-twitter-bootstrap 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +14 -0
- data/LICENSE +176 -0
- data/Makefile +94 -0
- data/README.md +217 -0
- data/Rakefile +52 -0
- data/bootstrap-2.0.4.css +4661 -0
- data/bootstrap-2.0.4.min.css +9 -0
- data/bootstrap-responsive-2.0.4.css +932 -0
- data/bootstrap-responsive-2.0.4.min.css +9 -0
- data/docs/assets/css/bootstrap-responsive.css +932 -0
- data/docs/assets/css/bootstrap.css +4661 -0
- data/docs/assets/css/docs.css +846 -0
- data/docs/assets/ico/apple-touch-icon-114-precomposed.png +0 -0
- data/docs/assets/ico/apple-touch-icon-144-precomposed.png +0 -0
- data/docs/assets/ico/apple-touch-icon-57-precomposed.png +0 -0
- data/docs/assets/ico/apple-touch-icon-72-precomposed.png +0 -0
- data/docs/assets/ico/favicon.ico +0 -0
- data/docs/assets/img/bird.png +0 -0
- data/docs/assets/img/bootstrap-mdo-sfmoma-01.jpg +0 -0
- data/docs/assets/img/bootstrap-mdo-sfmoma-02.jpg +0 -0
- data/docs/assets/img/bootstrap-mdo-sfmoma-03.jpg +0 -0
- data/docs/assets/img/browsers.png +0 -0
- data/docs/assets/img/example-sites/fleetio.png +0 -0
- data/docs/assets/img/example-sites/jshint.png +0 -0
- data/docs/assets/img/example-sites/kippt.png +0 -0
- data/docs/assets/img/example-sites/soundready.png +0 -0
- data/docs/assets/img/examples/bootstrap-example-fluid.jpg +0 -0
- data/docs/assets/img/examples/bootstrap-example-hero.jpg +0 -0
- data/docs/assets/img/examples/bootstrap-example-starter.jpg +0 -0
- data/docs/assets/img/github-16px.png +0 -0
- data/docs/assets/img/glyphicons-halflings-white.png +0 -0
- data/docs/assets/img/glyphicons-halflings.png +0 -0
- data/docs/assets/img/glyphicons/glyphicons_009_magic.png +0 -0
- data/docs/assets/img/glyphicons/glyphicons_042_group.png +0 -0
- data/docs/assets/img/glyphicons/glyphicons_079_podium.png +0 -0
- data/docs/assets/img/glyphicons/glyphicons_082_roundabout.png +0 -0
- data/docs/assets/img/glyphicons/glyphicons_155_show_thumbnails.png +0 -0
- data/docs/assets/img/glyphicons/glyphicons_163_iphone.png +0 -0
- data/docs/assets/img/glyphicons/glyphicons_214_resize_small.png +0 -0
- data/docs/assets/img/glyphicons/glyphicons_266_book_open.png +0 -0
- data/docs/assets/img/grid-18px-masked.png +0 -0
- data/docs/assets/img/icon-css3.png +0 -0
- data/docs/assets/img/icon-github.png +0 -0
- data/docs/assets/img/icon-html5.png +0 -0
- data/docs/assets/img/icon-twitter.png +0 -0
- data/docs/assets/img/less-logo-large.png +0 -0
- data/docs/assets/img/less-small.png +0 -0
- data/docs/assets/img/responsive-illustrations.png +0 -0
- data/docs/assets/js/README.md +106 -0
- data/docs/assets/js/application.js +184 -0
- data/docs/assets/js/bootstrap-alert.js +90 -0
- data/docs/assets/js/bootstrap-button.js +96 -0
- data/docs/assets/js/bootstrap-carousel.js +169 -0
- data/docs/assets/js/bootstrap-collapse.js +157 -0
- data/docs/assets/js/bootstrap-dropdown.js +100 -0
- data/docs/assets/js/bootstrap-modal.js +218 -0
- data/docs/assets/js/bootstrap-popover.js +98 -0
- data/docs/assets/js/bootstrap-scrollspy.js +151 -0
- data/docs/assets/js/bootstrap-tab.js +135 -0
- data/docs/assets/js/bootstrap-tooltip.js +275 -0
- data/docs/assets/js/bootstrap-transition.js +61 -0
- data/docs/assets/js/bootstrap-typeahead.js +285 -0
- data/docs/assets/js/bootstrap.js +1825 -0
- data/docs/assets/js/bootstrap.min.js +6 -0
- data/docs/assets/js/google-code-prettify/prettify.css +30 -0
- data/docs/assets/js/google-code-prettify/prettify.js +28 -0
- data/docs/assets/js/jquery.js +9252 -0
- data/docs/base-css.html +1710 -0
- data/docs/build/index.js +44 -0
- data/docs/build/node_modules/.bin/hulk +93 -0
- data/docs/build/node_modules/hogan.js/.git_ignore +1 -0
- data/docs/build/node_modules/hogan.js/.gitmodules +3 -0
- data/docs/build/node_modules/hogan.js/LICENSE +177 -0
- data/docs/build/node_modules/hogan.js/Makefile +62 -0
- data/docs/build/node_modules/hogan.js/README.md +93 -0
- data/docs/build/node_modules/hogan.js/bin/hulk +93 -0
- data/docs/build/node_modules/hogan.js/lib/compiler.js +348 -0
- data/docs/build/node_modules/hogan.js/lib/hogan.js +20 -0
- data/docs/build/node_modules/hogan.js/lib/template.js +233 -0
- data/docs/build/node_modules/hogan.js/package.json +20 -0
- data/docs/build/node_modules/hogan.js/test/html/list.html +8 -0
- data/docs/build/node_modules/hogan.js/test/index.html +13 -0
- data/docs/build/node_modules/hogan.js/test/index.js +848 -0
- data/docs/build/node_modules/hogan.js/test/mustache.js +90 -0
- data/docs/build/node_modules/hogan.js/test/spec.js +77 -0
- data/docs/build/node_modules/hogan.js/test/spec/Changes +31 -0
- data/docs/build/node_modules/hogan.js/test/spec/README.md +65 -0
- data/docs/build/node_modules/hogan.js/test/spec/Rakefile +27 -0
- data/docs/build/node_modules/hogan.js/test/spec/TESTING.md +46 -0
- data/docs/build/node_modules/hogan.js/test/spec/specs/comments.json +1 -0
- data/docs/build/node_modules/hogan.js/test/spec/specs/comments.yml +103 -0
- data/docs/build/node_modules/hogan.js/test/spec/specs/delimiters.json +1 -0
- data/docs/build/node_modules/hogan.js/test/spec/specs/delimiters.yml +158 -0
- data/docs/build/node_modules/hogan.js/test/spec/specs/interpolation.json +1 -0
- data/docs/build/node_modules/hogan.js/test/spec/specs/interpolation.yml +230 -0
- data/docs/build/node_modules/hogan.js/test/spec/specs/inverted.json +1 -0
- data/docs/build/node_modules/hogan.js/test/spec/specs/inverted.yml +193 -0
- data/docs/build/node_modules/hogan.js/test/spec/specs/partials.json +1 -0
- data/docs/build/node_modules/hogan.js/test/spec/specs/partials.yml +109 -0
- data/docs/build/node_modules/hogan.js/test/spec/specs/sections.json +1 -0
- data/docs/build/node_modules/hogan.js/test/spec/specs/sections.yml +256 -0
- data/docs/build/node_modules/hogan.js/test/spec/specs/~lambdas.json +1 -0
- data/docs/build/node_modules/hogan.js/test/spec/specs/~lambdas.yml +149 -0
- data/docs/build/node_modules/hogan.js/test/templates/list.mustache +8 -0
- data/docs/build/node_modules/hogan.js/tools/release.js +74 -0
- data/docs/build/node_modules/hogan.js/tools/web_templates.js +32 -0
- data/docs/build/node_modules/hogan.js/web/1.0.0/hogan.js +500 -0
- data/docs/build/node_modules/hogan.js/web/1.0.0/hogan.min.js +14 -0
- data/docs/build/node_modules/hogan.js/web/builds/1.0.0/hogan.js +500 -0
- data/docs/build/node_modules/hogan.js/web/builds/1.0.0/hogan.min.js +14 -0
- data/docs/build/node_modules/hogan.js/web/builds/1.0.3/hogan.js +545 -0
- data/docs/build/node_modules/hogan.js/web/builds/1.0.3/hogan.min.js +5 -0
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.amd.js +576 -0
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.common.js +576 -0
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.js +572 -0
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.amd.js +5 -0
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.common.js +5 -0
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.js +5 -0
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.mustache.js +5 -0
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.mustache.js +619 -0
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/template-1.0.5.js +233 -0
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/template-1.0.5.min.js +5 -0
- data/docs/build/node_modules/hogan.js/web/favicon.ico +0 -0
- data/docs/build/node_modules/hogan.js/web/images/logo.png +0 -0
- data/docs/build/node_modules/hogan.js/web/images/noise.png +0 -0
- data/docs/build/node_modules/hogan.js/web/images/small-hogan-icon.png +0 -0
- data/docs/build/node_modules/hogan.js/web/images/stripes.png +0 -0
- data/docs/build/node_modules/hogan.js/web/index.html.mustache +139 -0
- data/docs/build/node_modules/hogan.js/web/stylesheets/layout.css +206 -0
- data/docs/build/node_modules/hogan.js/web/stylesheets/skeleton.css +236 -0
- data/docs/build/node_modules/hogan.js/wrappers/amd.js.mustache +21 -0
- data/docs/build/node_modules/hogan.js/wrappers/common.js.mustache +21 -0
- data/docs/build/node_modules/hogan.js/wrappers/js.mustache +17 -0
- data/docs/build/node_modules/hogan.js/wrappers/mustache.js.mustache +64 -0
- data/docs/build/package.json +6 -0
- data/docs/components.html +1931 -0
- data/docs/download.html +454 -0
- data/docs/examples.html +147 -0
- data/docs/examples/fluid.html +162 -0
- data/docs/examples/hero.html +109 -0
- data/docs/examples/starter-template.html +79 -0
- data/docs/index.html +259 -0
- data/docs/javascript.html +1520 -0
- data/docs/less.html +1060 -0
- data/docs/scaffolding.html +671 -0
- data/docs/templates/layout.mustache +146 -0
- data/docs/templates/pages/base-css.mustache +1594 -0
- data/docs/templates/pages/components.mustache +1815 -0
- data/docs/templates/pages/download.mustache +338 -0
- data/docs/templates/pages/examples.mustache +31 -0
- data/docs/templates/pages/index.mustache +144 -0
- data/docs/templates/pages/javascript.mustache +1405 -0
- data/docs/templates/pages/less.mustache +944 -0
- data/docs/templates/pages/scaffolding.mustache +555 -0
- data/docs/templates/pages/upgrading.mustache +194 -0
- data/docs/upgrading.html +310 -0
- data/js/tests/index.html +54 -0
- data/js/tests/phantom.js +63 -0
- data/js/tests/server.js +14 -0
- data/js/tests/unit/bootstrap-alert.js +56 -0
- data/js/tests/unit/bootstrap-button.js +77 -0
- data/js/tests/unit/bootstrap-carousel.js +28 -0
- data/js/tests/unit/bootstrap-collapse.js +54 -0
- data/js/tests/unit/bootstrap-dropdown.js +87 -0
- data/js/tests/unit/bootstrap-modal.js +114 -0
- data/js/tests/unit/bootstrap-phantom.js +21 -0
- data/js/tests/unit/bootstrap-popover.js +93 -0
- data/js/tests/unit/bootstrap-scrollspy.js +31 -0
- data/js/tests/unit/bootstrap-tab.js +61 -0
- data/js/tests/unit/bootstrap-tooltip.js +155 -0
- data/js/tests/unit/bootstrap-transition.js +13 -0
- data/js/tests/unit/bootstrap-typeahead.js +148 -0
- data/js/tests/vendor/jquery.js +9252 -0
- data/js/tests/vendor/qunit.css +232 -0
- data/js/tests/vendor/qunit.js +1510 -0
- data/lib/sass-twitter-bootstrap.rb +9 -0
- data/lib/sass/twitter/bootstrap/rails.rb +14 -0
- data/lib/sass/twitter/bootstrap/version.rb +7 -0
- data/package.json +25 -0
- data/sass-twitter-bootstrap.gemspec +19 -0
- data/vendor/assets/images/glyphicons-halflings-white.png +0 -0
- data/vendor/assets/images/glyphicons-halflings.png +0 -0
- data/vendor/assets/javascripts/README.md +112 -0
- data/vendor/assets/javascripts/twitter/bootstrap-alert.js +90 -0
- data/vendor/assets/javascripts/twitter/bootstrap-button.js +96 -0
- data/vendor/assets/javascripts/twitter/bootstrap-carousel.js +169 -0
- data/vendor/assets/javascripts/twitter/bootstrap-collapse.js +157 -0
- data/vendor/assets/javascripts/twitter/bootstrap-dropdown.js +100 -0
- data/vendor/assets/javascripts/twitter/bootstrap-modal.js +218 -0
- data/vendor/assets/javascripts/twitter/bootstrap-popover.js +98 -0
- data/vendor/assets/javascripts/twitter/bootstrap-scrollspy.js +151 -0
- data/vendor/assets/javascripts/twitter/bootstrap-tab.js +135 -0
- data/vendor/assets/javascripts/twitter/bootstrap-tooltip.js +275 -0
- data/vendor/assets/javascripts/twitter/bootstrap-transition.js +61 -0
- data/vendor/assets/javascripts/twitter/bootstrap-typeahead.js +285 -0
- data/vendor/assets/javascripts/twitter/bootstrap.js +12 -0
- data/vendor/assets/stylesheets/tests/css-tests.css +52 -0
- data/vendor/assets/stylesheets/tests/css-tests.html +917 -0
- data/vendor/assets/stylesheets/tests/forms.html +179 -0
- data/vendor/assets/stylesheets/tests/navbar.html +108 -0
- data/vendor/assets/stylesheets/twitter/_accordion.scss +33 -0
- data/vendor/assets/stylesheets/twitter/_alerts.scss +58 -0
- data/vendor/assets/stylesheets/twitter/_breadcrumbs.scss +24 -0
- data/vendor/assets/stylesheets/twitter/_button-groups.scss +191 -0
- data/vendor/assets/stylesheets/twitter/_buttons.scss +191 -0
- data/vendor/assets/stylesheets/twitter/_carousel.scss +121 -0
- data/vendor/assets/stylesheets/twitter/_close.scss +29 -0
- data/vendor/assets/stylesheets/twitter/_code.scss +57 -0
- data/vendor/assets/stylesheets/twitter/_component-animations.scss +20 -0
- data/vendor/assets/stylesheets/twitter/_dropdowns.scss +143 -0
- data/vendor/assets/stylesheets/twitter/_forms.scss +582 -0
- data/vendor/assets/stylesheets/twitter/_grid.scss +5 -0
- data/vendor/assets/stylesheets/twitter/_hero-unit.scss +22 -0
- data/vendor/assets/stylesheets/twitter/_labels-badges.scss +52 -0
- data/vendor/assets/stylesheets/twitter/_layouts.scss +17 -0
- data/vendor/assets/stylesheets/twitter/_mixins.scss +643 -0
- data/vendor/assets/stylesheets/twitter/_modals.scss +90 -0
- data/vendor/assets/stylesheets/twitter/_navbar.scss +358 -0
- data/vendor/assets/stylesheets/twitter/_navs.scss +363 -0
- data/vendor/assets/stylesheets/twitter/_pager.scss +36 -0
- data/vendor/assets/stylesheets/twitter/_pagination.scss +56 -0
- data/vendor/assets/stylesheets/twitter/_popovers.scss +49 -0
- data/vendor/assets/stylesheets/twitter/_progress-bars.scss +117 -0
- data/vendor/assets/stylesheets/twitter/_reset.scss +131 -0
- data/vendor/assets/stylesheets/twitter/_responsive-1200px-min.scss +26 -0
- data/vendor/assets/stylesheets/twitter/_responsive-767px-max.scss +149 -0
- data/vendor/assets/stylesheets/twitter/_responsive-768px-979px.scss +17 -0
- data/vendor/assets/stylesheets/twitter/_responsive-navbar.scss +153 -0
- data/vendor/assets/stylesheets/twitter/_responsive-utilities.scss +41 -0
- data/vendor/assets/stylesheets/twitter/_scaffolding.scss +29 -0
- data/vendor/assets/stylesheets/twitter/_sprites.scss +191 -0
- data/vendor/assets/stylesheets/twitter/_tables.scss +155 -0
- data/vendor/assets/stylesheets/twitter/_thumbnails.scss +47 -0
- data/vendor/assets/stylesheets/twitter/_tooltip.scss +35 -0
- data/vendor/assets/stylesheets/twitter/_type.scss +232 -0
- data/vendor/assets/stylesheets/twitter/_utilities.scss +23 -0
- data/vendor/assets/stylesheets/twitter/_variables.scss +204 -0
- data/vendor/assets/stylesheets/twitter/_wells.scss +27 -0
- data/vendor/assets/stylesheets/twitter/bootstrap.scss +62 -0
- data/vendor/assets/stylesheets/twitter/responsive.scss +48 -0
- metadata +304 -0
@@ -0,0 +1,582 @@
|
|
1
|
+
// Forms
|
2
|
+
// Base styles for various input types, form layouts, and states
|
3
|
+
// -------------------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
// GENERAL STYLES
|
7
|
+
// --------------
|
8
|
+
|
9
|
+
// Make all forms have space below them
|
10
|
+
form {
|
11
|
+
margin: 0 0 $baseLineHeight;
|
12
|
+
}
|
13
|
+
|
14
|
+
fieldset {
|
15
|
+
padding: 0;
|
16
|
+
margin: 0;
|
17
|
+
border: 0;
|
18
|
+
}
|
19
|
+
|
20
|
+
// Groups of fields with labels on top (legends)
|
21
|
+
legend {
|
22
|
+
display: block;
|
23
|
+
width: 100%;
|
24
|
+
padding: 0;
|
25
|
+
margin-bottom: $baseLineHeight * 1.5;
|
26
|
+
font-size: $baseFontSize * 1.5;
|
27
|
+
line-height: $baseLineHeight * 2;
|
28
|
+
color: $grayDark;
|
29
|
+
border: 0;
|
30
|
+
border-bottom: 1px solid #e5e5e5;
|
31
|
+
|
32
|
+
// Small
|
33
|
+
small {
|
34
|
+
font-size: $baseLineHeight * .75;
|
35
|
+
color: $grayLight;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
// Set font for forms
|
40
|
+
label,
|
41
|
+
input,
|
42
|
+
button,
|
43
|
+
select,
|
44
|
+
textarea {
|
45
|
+
@include font-shorthand($baseFontSize, normal, $baseLineHeight); // Set size, weight, line-height here
|
46
|
+
}
|
47
|
+
input,
|
48
|
+
button,
|
49
|
+
select,
|
50
|
+
textarea {
|
51
|
+
font-family: $baseFontFamily; // And only set font-family here for those that need it (note the missing label element)
|
52
|
+
}
|
53
|
+
|
54
|
+
// Identify controls by their labels
|
55
|
+
label {
|
56
|
+
display: block;
|
57
|
+
margin-bottom: 5px;
|
58
|
+
}
|
59
|
+
|
60
|
+
// Form controls
|
61
|
+
// -------------------------
|
62
|
+
|
63
|
+
// Shared size and type resets
|
64
|
+
select,
|
65
|
+
textarea,
|
66
|
+
input[type="text"],
|
67
|
+
input[type="password"],
|
68
|
+
input[type="datetime"],
|
69
|
+
input[type="datetime-local"],
|
70
|
+
input[type="date"],
|
71
|
+
input[type="month"],
|
72
|
+
input[type="time"],
|
73
|
+
input[type="week"],
|
74
|
+
input[type="number"],
|
75
|
+
input[type="email"],
|
76
|
+
input[type="url"],
|
77
|
+
input[type="search"],
|
78
|
+
input[type="tel"],
|
79
|
+
input[type="color"],
|
80
|
+
.uneditable-input {
|
81
|
+
display: inline-block;
|
82
|
+
height: $baseLineHeight;
|
83
|
+
padding: 4px;
|
84
|
+
margin-bottom: 9px;
|
85
|
+
font-size: $baseFontSize;
|
86
|
+
line-height: $baseLineHeight;
|
87
|
+
color: $gray;
|
88
|
+
}
|
89
|
+
|
90
|
+
// Reset appearance properties for textual inputs and textarea
|
91
|
+
// Declare width for legacy (can't be on input[type=*] selectors or it's too specific)
|
92
|
+
input,
|
93
|
+
textarea {
|
94
|
+
width: 210px;
|
95
|
+
}
|
96
|
+
// Reset height since textareas have rows
|
97
|
+
textarea {
|
98
|
+
height: auto;
|
99
|
+
}
|
100
|
+
// Everything else
|
101
|
+
textarea,
|
102
|
+
input[type="text"],
|
103
|
+
input[type="password"],
|
104
|
+
input[type="datetime"],
|
105
|
+
input[type="datetime-local"],
|
106
|
+
input[type="date"],
|
107
|
+
input[type="month"],
|
108
|
+
input[type="time"],
|
109
|
+
input[type="week"],
|
110
|
+
input[type="number"],
|
111
|
+
input[type="email"],
|
112
|
+
input[type="url"],
|
113
|
+
input[type="search"],
|
114
|
+
input[type="tel"],
|
115
|
+
input[type="color"],
|
116
|
+
.uneditable-input {
|
117
|
+
background-color: $inputBackground;
|
118
|
+
border: 1px solid $inputBorder;
|
119
|
+
@include border-radius($inputBorderRadius);
|
120
|
+
@include box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
|
121
|
+
@include transition(#{border linear .2s, box-shadow linear .2s});
|
122
|
+
|
123
|
+
// Focus state
|
124
|
+
&:focus {
|
125
|
+
border-color: rgba(82,168,236,.8);
|
126
|
+
outline: 0;
|
127
|
+
outline: thin dotted \9; /* IE6-9 */
|
128
|
+
@include box-shadow(#{inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)});
|
129
|
+
}
|
130
|
+
}
|
131
|
+
|
132
|
+
// Position radios and checkboxes better
|
133
|
+
input[type="radio"],
|
134
|
+
input[type="checkbox"] {
|
135
|
+
margin: 3px 0;
|
136
|
+
*margin-top: 0; /* IE7 */
|
137
|
+
line-height: normal;
|
138
|
+
cursor: pointer;
|
139
|
+
}
|
140
|
+
|
141
|
+
// Reset width of input buttons, radios, checkboxes
|
142
|
+
input[type="submit"],
|
143
|
+
input[type="reset"],
|
144
|
+
input[type="button"],
|
145
|
+
input[type="radio"],
|
146
|
+
input[type="checkbox"] {
|
147
|
+
width: auto; // Override of generic input selector
|
148
|
+
}
|
149
|
+
|
150
|
+
// Make uneditable textareas behave like a textarea
|
151
|
+
.uneditable-textarea {
|
152
|
+
width: auto;
|
153
|
+
height: auto;
|
154
|
+
}
|
155
|
+
|
156
|
+
// Set the height of select and file controls to match text inputs
|
157
|
+
select,
|
158
|
+
input[type="file"] {
|
159
|
+
height: 28px; /* In IE7, the height of the select element cannot be changed by height, only font-size */
|
160
|
+
*margin-top: 4px; /* For IE7, add top margin to align select with labels */
|
161
|
+
line-height: 28px;
|
162
|
+
}
|
163
|
+
|
164
|
+
// Make select elements obey height by applying a border
|
165
|
+
select {
|
166
|
+
width: 220px; // default input width + 10px of padding that doesn't get applied
|
167
|
+
border: 1px solid #bbb;
|
168
|
+
}
|
169
|
+
|
170
|
+
// Make multiple select elements height not fixed
|
171
|
+
select[multiple],
|
172
|
+
select[size] {
|
173
|
+
height: auto;
|
174
|
+
}
|
175
|
+
|
176
|
+
// Focus for select, file, radio, and checkbox
|
177
|
+
select:focus,
|
178
|
+
input[type="file"]:focus,
|
179
|
+
input[type="radio"]:focus,
|
180
|
+
input[type="checkbox"]:focus {
|
181
|
+
@include tab-focus();
|
182
|
+
}
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
// CHECKBOXES & RADIOS
|
187
|
+
// -------------------
|
188
|
+
|
189
|
+
// Indent the labels to position radios/checkboxes as hanging
|
190
|
+
.radio,
|
191
|
+
.checkbox {
|
192
|
+
min-height: 18px; // clear the floating input if there is no label text
|
193
|
+
padding-left: 18px;
|
194
|
+
}
|
195
|
+
.radio input[type="radio"],
|
196
|
+
.checkbox input[type="checkbox"] {
|
197
|
+
float: left;
|
198
|
+
margin-left: -18px;
|
199
|
+
}
|
200
|
+
|
201
|
+
// Move the options list down to align with labels
|
202
|
+
.controls > .radio:first-child,
|
203
|
+
.controls > .checkbox:first-child {
|
204
|
+
padding-top: 5px; // has to be padding because margin collaspes
|
205
|
+
}
|
206
|
+
|
207
|
+
// Radios and checkboxes on same line
|
208
|
+
// TODO v3: Convert .inline to .control-inline
|
209
|
+
.radio.inline,
|
210
|
+
.checkbox.inline {
|
211
|
+
display: inline-block;
|
212
|
+
padding-top: 5px;
|
213
|
+
margin-bottom: 0;
|
214
|
+
vertical-align: middle;
|
215
|
+
}
|
216
|
+
.radio.inline + .radio.inline,
|
217
|
+
.checkbox.inline + .checkbox.inline {
|
218
|
+
margin-left: 10px; // space out consecutive inline controls
|
219
|
+
}
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
// INPUT SIZES
|
224
|
+
// -----------
|
225
|
+
|
226
|
+
// General classes for quick sizes
|
227
|
+
.input-mini { width: 60px; }
|
228
|
+
.input-small { width: 90px; }
|
229
|
+
.input-medium { width: 150px; }
|
230
|
+
.input-large { width: 210px; }
|
231
|
+
.input-xlarge { width: 270px; }
|
232
|
+
.input-xxlarge { width: 530px; }
|
233
|
+
|
234
|
+
// Grid style input sizes
|
235
|
+
input[class*="span"],
|
236
|
+
select[class*="span"],
|
237
|
+
textarea[class*="span"],
|
238
|
+
.uneditable-input[class*="span"],
|
239
|
+
// Redeclare since the fluid row class is more specific
|
240
|
+
.row-fluid input[class*="span"],
|
241
|
+
.row-fluid select[class*="span"],
|
242
|
+
.row-fluid textarea[class*="span"],
|
243
|
+
.row-fluid .uneditable-input[class*="span"] {
|
244
|
+
float: none;
|
245
|
+
margin-left: 0;
|
246
|
+
}
|
247
|
+
// Ensure input-prepend/append never wraps
|
248
|
+
.input-append input[class*="span"],
|
249
|
+
.input-append .uneditable-input[class*="span"],
|
250
|
+
.input-prepend input[class*="span"],
|
251
|
+
.input-prepend .uneditable-input[class*="span"],
|
252
|
+
.row-fluid .input-prepend [class*="span"],
|
253
|
+
.row-fluid .input-append [class*="span"] {
|
254
|
+
display: inline-block;
|
255
|
+
}
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
// GRID SIZING FOR INPUTS
|
260
|
+
// ----------------------
|
261
|
+
|
262
|
+
@include grid-input($gridColumnWidth, $gridGutterWidth);
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
// DISABLED STATE
|
267
|
+
// --------------
|
268
|
+
|
269
|
+
// Disabled and read-only inputs
|
270
|
+
input[disabled],
|
271
|
+
select[disabled],
|
272
|
+
textarea[disabled],
|
273
|
+
input[readonly],
|
274
|
+
select[readonly],
|
275
|
+
textarea[readonly] {
|
276
|
+
cursor: not-allowed;
|
277
|
+
background-color: $inputDisabledBackground;
|
278
|
+
border-color: #ddd;
|
279
|
+
}
|
280
|
+
// Explicitly reset the colors here
|
281
|
+
input[type="radio"][disabled],
|
282
|
+
input[type="checkbox"][disabled],
|
283
|
+
input[type="radio"][readonly],
|
284
|
+
input[type="checkbox"][readonly] {
|
285
|
+
background-color: transparent;
|
286
|
+
}
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
// FORM FIELD FEEDBACK STATES
|
292
|
+
// --------------------------
|
293
|
+
|
294
|
+
// Warning
|
295
|
+
.control-group.warning {
|
296
|
+
@include formFieldState($warningText, $warningText, $warningBackground);
|
297
|
+
}
|
298
|
+
// Error
|
299
|
+
.control-group.error {
|
300
|
+
@include formFieldState($errorText, $errorText, $errorBackground);
|
301
|
+
}
|
302
|
+
// Success
|
303
|
+
.control-group.success {
|
304
|
+
@include formFieldState($successText, $successText, $successBackground);
|
305
|
+
}
|
306
|
+
|
307
|
+
// HTML5 invalid states
|
308
|
+
// Shares styles with the .control-group.error above
|
309
|
+
input:focus:required:invalid,
|
310
|
+
textarea:focus:required:invalid,
|
311
|
+
select:focus:required:invalid {
|
312
|
+
color: #b94a48;
|
313
|
+
border-color: #ee5f5b;
|
314
|
+
&:focus {
|
315
|
+
border-color: darken(#ee5f5b, 10%);
|
316
|
+
@include box-shadow(0 0 6px lighten(#ee5f5b, 20%));
|
317
|
+
}
|
318
|
+
}
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
// FORM ACTIONS
|
323
|
+
// ------------
|
324
|
+
|
325
|
+
.form-actions {
|
326
|
+
padding: ($baseLineHeight - 1) 20px $baseLineHeight;
|
327
|
+
margin-top: $baseLineHeight;
|
328
|
+
margin-bottom: $baseLineHeight;
|
329
|
+
background-color: $formActionsBackground;
|
330
|
+
border-top: 1px solid #e5e5e5;
|
331
|
+
@include clearfix(); // Adding clearfix to allow for .pull-right button containers
|
332
|
+
}
|
333
|
+
|
334
|
+
// For text that needs to appear as an input but should not be an input
|
335
|
+
.uneditable-input {
|
336
|
+
overflow: hidden; // prevent text from wrapping, but still cut it off like an input does
|
337
|
+
white-space: nowrap;
|
338
|
+
cursor: not-allowed;
|
339
|
+
background-color: $inputBackground;
|
340
|
+
border-color: #eee;
|
341
|
+
@include box-shadow(inset 0 1px 2px rgba(0,0,0,.025));
|
342
|
+
}
|
343
|
+
|
344
|
+
// Placeholder text gets special styles; can't be bundled together though for some reason
|
345
|
+
@include placeholder();
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
// HELP TEXT
|
350
|
+
// ---------
|
351
|
+
|
352
|
+
.help-block,
|
353
|
+
.help-inline {
|
354
|
+
color: $gray; // lighten the text some for contrast
|
355
|
+
}
|
356
|
+
|
357
|
+
.help-block {
|
358
|
+
display: block; // account for any element using help-block
|
359
|
+
margin-bottom: $baseLineHeight / 2;
|
360
|
+
}
|
361
|
+
|
362
|
+
.help-inline {
|
363
|
+
display: inline-block;
|
364
|
+
@include ie7-inline-block();
|
365
|
+
vertical-align: middle;
|
366
|
+
padding-left: 5px;
|
367
|
+
}
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
// INPUT GROUPS
|
372
|
+
// ------------
|
373
|
+
|
374
|
+
// Allow us to put symbols and text within the input field for a cleaner look
|
375
|
+
.input-prepend,
|
376
|
+
.input-append {
|
377
|
+
margin-bottom: 5px;
|
378
|
+
input,
|
379
|
+
select,
|
380
|
+
.uneditable-input {
|
381
|
+
position: relative; // placed here by default so that on :focus we can place the input above the .add-on for full border and box-shadow goodness
|
382
|
+
margin-bottom: 0; // prevent bottom margin from screwing up alignment in stacked forms
|
383
|
+
*margin-left: 0;
|
384
|
+
vertical-align: middle;
|
385
|
+
@include border-radius(0 $inputBorderRadius $inputBorderRadius 0);
|
386
|
+
// Make input on top when focused so blue border and shadow always show
|
387
|
+
&:focus {
|
388
|
+
z-index: 2;
|
389
|
+
}
|
390
|
+
}
|
391
|
+
.uneditable-input {
|
392
|
+
border-left-color: #ccc;
|
393
|
+
}
|
394
|
+
.add-on {
|
395
|
+
display: inline-block;
|
396
|
+
width: auto;
|
397
|
+
height: $baseLineHeight;
|
398
|
+
min-width: 16px;
|
399
|
+
padding: 4px 5px;
|
400
|
+
font-weight: normal;
|
401
|
+
line-height: $baseLineHeight;
|
402
|
+
text-align: center;
|
403
|
+
text-shadow: 0 1px 0 $white;
|
404
|
+
vertical-align: middle;
|
405
|
+
background-color: $grayLighter;
|
406
|
+
border: 1px solid #ccc;
|
407
|
+
}
|
408
|
+
.add-on,
|
409
|
+
.btn {
|
410
|
+
margin-left: -1px;
|
411
|
+
@include border-radius(0);
|
412
|
+
}
|
413
|
+
.active {
|
414
|
+
background-color: lighten($green, 30);
|
415
|
+
border-color: $green;
|
416
|
+
}
|
417
|
+
}
|
418
|
+
.input-prepend {
|
419
|
+
.add-on,
|
420
|
+
.btn {
|
421
|
+
margin-right: -1px;
|
422
|
+
}
|
423
|
+
.add-on:first-child,
|
424
|
+
.btn:first-child {
|
425
|
+
@include border-radius($inputBorderRadius 0 0 $inputBorderRadius);
|
426
|
+
}
|
427
|
+
}
|
428
|
+
.input-append {
|
429
|
+
input,
|
430
|
+
select,
|
431
|
+
.uneditable-input {
|
432
|
+
@include border-radius($inputBorderRadius 0 0 $inputBorderRadius);
|
433
|
+
}
|
434
|
+
.uneditable-input {
|
435
|
+
border-right-color: #ccc;
|
436
|
+
border-left-color: #eee;
|
437
|
+
}
|
438
|
+
.add-on:last-child,
|
439
|
+
.btn:last-child {
|
440
|
+
@include border-radius(0 $inputBorderRadius $inputBorderRadius 0);
|
441
|
+
}
|
442
|
+
}
|
443
|
+
// Remove all border-radius for inputs with both prepend and append
|
444
|
+
.input-prepend.input-append {
|
445
|
+
input,
|
446
|
+
select,
|
447
|
+
.uneditable-input {
|
448
|
+
@include border-radius(0);
|
449
|
+
}
|
450
|
+
.add-on:first-child,
|
451
|
+
.btn:first-child {
|
452
|
+
margin-right: -1px;
|
453
|
+
@include border-radius($inputBorderRadius 0 0 $inputBorderRadius);
|
454
|
+
}
|
455
|
+
.add-on:last-child,
|
456
|
+
.btn:last-child {
|
457
|
+
margin-left: -1px;
|
458
|
+
@include border-radius(0 $inputBorderRadius $inputBorderRadius 0);
|
459
|
+
}
|
460
|
+
}
|
461
|
+
|
462
|
+
|
463
|
+
|
464
|
+
// SEARCH FORM
|
465
|
+
// -----------
|
466
|
+
|
467
|
+
.search-query {
|
468
|
+
padding-right: 14px;
|
469
|
+
padding-right: 4px \9;
|
470
|
+
padding-left: 14px;
|
471
|
+
padding-left: 4px \9; /* IE7-8 doesn't have border-radius, so don't indent the padding */
|
472
|
+
margin-bottom: 0; // remove the default margin on all inputs
|
473
|
+
@include border-radius(14px);
|
474
|
+
}
|
475
|
+
|
476
|
+
|
477
|
+
|
478
|
+
// HORIZONTAL & VERTICAL FORMS
|
479
|
+
// ---------------------------
|
480
|
+
|
481
|
+
// Common properties
|
482
|
+
// -----------------
|
483
|
+
|
484
|
+
.form-search,
|
485
|
+
.form-inline,
|
486
|
+
.form-horizontal {
|
487
|
+
input,
|
488
|
+
textarea,
|
489
|
+
select,
|
490
|
+
.help-inline,
|
491
|
+
.uneditable-input,
|
492
|
+
.input-prepend,
|
493
|
+
.input-append {
|
494
|
+
display: inline-block;
|
495
|
+
@include ie7-inline-block();
|
496
|
+
margin-bottom: 0;
|
497
|
+
}
|
498
|
+
// Re-hide hidden elements due to specifity
|
499
|
+
.hide {
|
500
|
+
display: none;
|
501
|
+
}
|
502
|
+
}
|
503
|
+
.form-search label,
|
504
|
+
.form-inline label {
|
505
|
+
display: inline-block;
|
506
|
+
}
|
507
|
+
// Remove margin for input-prepend/-append
|
508
|
+
.form-search .input-append,
|
509
|
+
.form-inline .input-append,
|
510
|
+
.form-search .input-prepend,
|
511
|
+
.form-inline .input-prepend {
|
512
|
+
margin-bottom: 0;
|
513
|
+
}
|
514
|
+
// Inline checkbox/radio labels (remove padding on left)
|
515
|
+
.form-search .radio,
|
516
|
+
.form-search .checkbox,
|
517
|
+
.form-inline .radio,
|
518
|
+
.form-inline .checkbox {
|
519
|
+
padding-left: 0;
|
520
|
+
margin-bottom: 0;
|
521
|
+
vertical-align: middle;
|
522
|
+
}
|
523
|
+
// Remove float and margin, set to inline-block
|
524
|
+
.form-search .radio input[type="radio"],
|
525
|
+
.form-search .checkbox input[type="checkbox"],
|
526
|
+
.form-inline .radio input[type="radio"],
|
527
|
+
.form-inline .checkbox input[type="checkbox"] {
|
528
|
+
float: left;
|
529
|
+
margin-right: 3px;
|
530
|
+
margin-left: 0;
|
531
|
+
}
|
532
|
+
|
533
|
+
|
534
|
+
// Margin to space out fieldsets
|
535
|
+
.control-group {
|
536
|
+
margin-bottom: $baseLineHeight / 2;
|
537
|
+
}
|
538
|
+
|
539
|
+
// Legend collapses margin, so next element is responsible for spacing
|
540
|
+
legend + .control-group {
|
541
|
+
margin-top: $baseLineHeight;
|
542
|
+
-webkit-margin-top-collapse: separate;
|
543
|
+
}
|
544
|
+
|
545
|
+
// Horizontal-specific styles
|
546
|
+
// --------------------------
|
547
|
+
|
548
|
+
.form-horizontal {
|
549
|
+
// Increase spacing between groups
|
550
|
+
.control-group {
|
551
|
+
margin-bottom: $baseLineHeight;
|
552
|
+
@include clearfix();
|
553
|
+
}
|
554
|
+
// Float the labels left
|
555
|
+
.control-label {
|
556
|
+
float: left;
|
557
|
+
width: 140px;
|
558
|
+
padding-top: 5px;
|
559
|
+
text-align: right;
|
560
|
+
}
|
561
|
+
// Move over all input controls and content
|
562
|
+
.controls {
|
563
|
+
// Super jank IE7 fix to ensure the inputs in .input-append and input-prepend
|
564
|
+
// don't inherit the margin of the parent, in this case .controls
|
565
|
+
*display: inline-block;
|
566
|
+
*padding-left: 20px;
|
567
|
+
margin-left: 160px;
|
568
|
+
*margin-left: 0;
|
569
|
+
&:first-child {
|
570
|
+
*padding-left: 160px;
|
571
|
+
}
|
572
|
+
}
|
573
|
+
// Remove bottom margin on block level help text since that's accounted for on .control-group
|
574
|
+
.help-block {
|
575
|
+
margin-top: $baseLineHeight / 2;
|
576
|
+
margin-bottom: 0;
|
577
|
+
}
|
578
|
+
// Move over buttons in .form-actions to align with .controls
|
579
|
+
.form-actions {
|
580
|
+
padding-left: 160px;
|
581
|
+
}
|
582
|
+
}
|