bootstrap-sass-rails-rtl 2.0.4.12

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.
Files changed (142) hide show
  1. data/LICENSE +14 -0
  2. data/README.md +115 -0
  3. data/Rakefile +37 -0
  4. data/lib/bootstrap-sass-rails-rtl.rb +9 -0
  5. data/lib/bootstrap/sass/extensions.rb +5 -0
  6. data/lib/bootstrap/sass/extensions/functions.rb +15 -0
  7. data/lib/bootstrap/sass/rails.rb +2 -0
  8. data/lib/bootstrap/sass/rails/engine.rb +9 -0
  9. data/lib/bootstrap/sass/rails/version.rb +7 -0
  10. data/test/cases/usage_css_spec.rb +216 -0
  11. data/test/cases/usage_js_spec.rb +40 -0
  12. data/test/dummy/Rakefile +7 -0
  13. data/test/dummy/app/assets/javascripts/application.js +3 -0
  14. data/test/dummy/app/assets/javascripts/individual.js +1 -0
  15. data/test/dummy/app/assets/stylesheets/application-rtl.css.scss +3 -0
  16. data/test/dummy/app/assets/stylesheets/application.css.scss +3 -0
  17. data/test/dummy/app/assets/stylesheets/individual-rtl.css.scss +11 -0
  18. data/test/dummy/app/assets/stylesheets/individual.css.scss +11 -0
  19. data/test/dummy/app/assets/stylesheets/sprockets-rtl.css +3 -0
  20. data/test/dummy/app/assets/stylesheets/sprockets.css +3 -0
  21. data/test/dummy/app/controllers/application_controller.rb +3 -0
  22. data/test/dummy/app/helpers/application_helper.rb +2 -0
  23. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  24. data/test/dummy/config.ru +4 -0
  25. data/test/dummy/config/application.rb +49 -0
  26. data/test/dummy/config/boot.rb +10 -0
  27. data/test/dummy/config/database.yml +25 -0
  28. data/test/dummy/config/environment.rb +5 -0
  29. data/test/dummy/config/environments/development.rb +30 -0
  30. data/test/dummy/config/environments/production.rb +60 -0
  31. data/test/dummy/config/environments/test.rb +39 -0
  32. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  33. data/test/dummy/config/initializers/inflections.rb +10 -0
  34. data/test/dummy/config/initializers/mime_types.rb +5 -0
  35. data/test/dummy/config/initializers/secret_token.rb +7 -0
  36. data/test/dummy/config/initializers/session_store.rb +8 -0
  37. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  38. data/test/dummy/config/locales/en.yml +5 -0
  39. data/test/dummy/config/routes.rb +58 -0
  40. data/test/dummy/public/404.html +26 -0
  41. data/test/dummy/public/422.html +26 -0
  42. data/test/dummy/public/500.html +26 -0
  43. data/test/dummy/public/favicon.ico +0 -0
  44. data/test/dummy/script/rails +6 -0
  45. data/test/spec_helper.rb +13 -0
  46. data/test/support/helpers.rb +35 -0
  47. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
  48. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
  49. data/vendor/assets/javascripts/twitter/bootstrap.js +12 -0
  50. data/vendor/assets/javascripts/twitter/bootstrap/alert.js +90 -0
  51. data/vendor/assets/javascripts/twitter/bootstrap/button.js +96 -0
  52. data/vendor/assets/javascripts/twitter/bootstrap/carousel.js +169 -0
  53. data/vendor/assets/javascripts/twitter/bootstrap/collapse.js +157 -0
  54. data/vendor/assets/javascripts/twitter/bootstrap/dropdown.js +100 -0
  55. data/vendor/assets/javascripts/twitter/bootstrap/modal.js +218 -0
  56. data/vendor/assets/javascripts/twitter/bootstrap/popover.js +98 -0
  57. data/vendor/assets/javascripts/twitter/bootstrap/scrollspy.js +151 -0
  58. data/vendor/assets/javascripts/twitter/bootstrap/tab.js +135 -0
  59. data/vendor/assets/javascripts/twitter/bootstrap/tooltip.js +275 -0
  60. data/vendor/assets/javascripts/twitter/bootstrap/transition.js +61 -0
  61. data/vendor/assets/javascripts/twitter/bootstrap/typeahead.js +285 -0
  62. data/vendor/assets/stylesheets/twitter/bootstrap.css.scss +62 -0
  63. data/vendor/assets/stylesheets/twitter/bootstrap/_accordion.scss +33 -0
  64. data/vendor/assets/stylesheets/twitter/bootstrap/_alerts.scss +59 -0
  65. data/vendor/assets/stylesheets/twitter/bootstrap/_breadcrumbs.scss +24 -0
  66. data/vendor/assets/stylesheets/twitter/bootstrap/_button-groups.scss +190 -0
  67. data/vendor/assets/stylesheets/twitter/bootstrap/_buttons.scss +193 -0
  68. data/vendor/assets/stylesheets/twitter/bootstrap/_carousel.scss +121 -0
  69. data/vendor/assets/stylesheets/twitter/bootstrap/_close.scss +29 -0
  70. data/vendor/assets/stylesheets/twitter/bootstrap/_code.scss +57 -0
  71. data/vendor/assets/stylesheets/twitter/bootstrap/_component-animations.scss +20 -0
  72. data/vendor/assets/stylesheets/twitter/bootstrap/_dropdowns.scss +142 -0
  73. data/vendor/assets/stylesheets/twitter/bootstrap/_forms.scss +589 -0
  74. data/vendor/assets/stylesheets/twitter/bootstrap/_grid.scss +8 -0
  75. data/vendor/assets/stylesheets/twitter/bootstrap/_hero-unit.scss +22 -0
  76. data/vendor/assets/stylesheets/twitter/bootstrap/_labels-badges.scss +54 -0
  77. data/vendor/assets/stylesheets/twitter/bootstrap/_layouts.scss +17 -0
  78. data/vendor/assets/stylesheets/twitter/bootstrap/_mixins.scss +612 -0
  79. data/vendor/assets/stylesheets/twitter/bootstrap/_modals.scss +90 -0
  80. data/vendor/assets/stylesheets/twitter/bootstrap/_navbar.scss +358 -0
  81. data/vendor/assets/stylesheets/twitter/bootstrap/_navs.scss +364 -0
  82. data/vendor/assets/stylesheets/twitter/bootstrap/_pager.scss +36 -0
  83. data/vendor/assets/stylesheets/twitter/bootstrap/_pagination.scss +56 -0
  84. data/vendor/assets/stylesheets/twitter/bootstrap/_popovers.scss +49 -0
  85. data/vendor/assets/stylesheets/twitter/bootstrap/_progress-bars.scss +118 -0
  86. data/vendor/assets/stylesheets/twitter/bootstrap/_reset.scss +131 -0
  87. data/vendor/assets/stylesheets/twitter/bootstrap/_responsive-1200px-min.scss +26 -0
  88. data/vendor/assets/stylesheets/twitter/bootstrap/_responsive-767px-max.scss +150 -0
  89. data/vendor/assets/stylesheets/twitter/bootstrap/_responsive-768px-979px.scss +19 -0
  90. data/vendor/assets/stylesheets/twitter/bootstrap/_responsive-navbar.scss +153 -0
  91. data/vendor/assets/stylesheets/twitter/bootstrap/_responsive-utilities.scss +41 -0
  92. data/vendor/assets/stylesheets/twitter/bootstrap/_responsive.scss +48 -0
  93. data/vendor/assets/stylesheets/twitter/bootstrap/_scaffolding.scss +29 -0
  94. data/vendor/assets/stylesheets/twitter/bootstrap/_sprites.scss +178 -0
  95. data/vendor/assets/stylesheets/twitter/bootstrap/_tables.scss +175 -0
  96. data/vendor/assets/stylesheets/twitter/bootstrap/_thumbnails.scss +47 -0
  97. data/vendor/assets/stylesheets/twitter/bootstrap/_tooltip.scss +35 -0
  98. data/vendor/assets/stylesheets/twitter/bootstrap/_type.scss +232 -0
  99. data/vendor/assets/stylesheets/twitter/bootstrap/_utilities.scss +23 -0
  100. data/vendor/assets/stylesheets/twitter/bootstrap/_variables.scss +206 -0
  101. data/vendor/assets/stylesheets/twitter/bootstrap/_wells.scss +27 -0
  102. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_accordion.scss +33 -0
  103. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_alerts.scss +59 -0
  104. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_breadcrumbs.scss +24 -0
  105. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_button-groups.scss +190 -0
  106. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_buttons.scss +193 -0
  107. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_carousel.scss +121 -0
  108. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_close.scss +29 -0
  109. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_code.scss +57 -0
  110. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_component-animations.scss +20 -0
  111. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_dropdowns.scss +142 -0
  112. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_forms.scss +589 -0
  113. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_grid.scss +8 -0
  114. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_hero-unit.scss +22 -0
  115. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_labels-badges.scss +54 -0
  116. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_layouts.scss +17 -0
  117. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_mixins.scss +612 -0
  118. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_modals.scss +90 -0
  119. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_navbar.scss +358 -0
  120. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_navs.scss +364 -0
  121. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_pager.scss +36 -0
  122. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_pagination.scss +56 -0
  123. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_popovers.scss +49 -0
  124. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_progress-bars.scss +118 -0
  125. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_reset.scss +131 -0
  126. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_responsive-1200px-min.scss +26 -0
  127. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_responsive-767px-max.scss +150 -0
  128. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_responsive-768px-979px.scss +19 -0
  129. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_responsive-navbar.scss +153 -0
  130. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_responsive-utilities.scss +41 -0
  131. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_responsive.scss +48 -0
  132. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_scaffolding.scss +29 -0
  133. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_sprites.scss +178 -0
  134. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_tables.scss +175 -0
  135. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_thumbnails.scss +47 -0
  136. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_tooltip.scss +35 -0
  137. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_type.scss +232 -0
  138. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_utilities.scss +23 -0
  139. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_variables.scss +206 -0
  140. data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_wells.scss +27 -0
  141. data/vendor/assets/stylesheets/twitter/bootstrap_rtl.css.scss +62 -0
  142. metadata +276 -0
@@ -0,0 +1,29 @@
1
+ // CLOSE ICONS
2
+ // -----------
3
+
4
+ .close {
5
+ float: right;
6
+ font-size: 20px;
7
+ font-weight: bold;
8
+ line-height: $baseLineHeight;
9
+ color: $black;
10
+ text-shadow: 0 1px 0 rgba(255,255,255,1);
11
+ @include opacity(20);
12
+ &:hover {
13
+ color: $black;
14
+ text-decoration: none;
15
+ cursor: pointer;
16
+ @include opacity(40);
17
+ }
18
+ }
19
+
20
+ // Additional properties for button version
21
+ // iOS requires the button element instead of an anchor tag.
22
+ // If you want the anchor version, it requires `href="#"`.
23
+ button.close {
24
+ padding: 0;
25
+ cursor: pointer;
26
+ background: transparent;
27
+ border: 0;
28
+ -webkit-appearance: none;
29
+ }
@@ -0,0 +1,57 @@
1
+ // Code.less
2
+ // Code typography styles for the <code> and <pre> elements
3
+ // --------------------------------------------------------
4
+
5
+ // Inline and block code styles
6
+ code,
7
+ pre {
8
+ padding: 0 3px 2px;
9
+ @include font-family-monospace();
10
+ font-size: $baseFontSize - 1;
11
+ color: $grayDark;
12
+ @include border-radius(3px);
13
+ }
14
+
15
+ // Inline code
16
+ code {
17
+ padding: 2px 4px;
18
+ color: #d14;
19
+ background-color: #f7f7f9;
20
+ border: 1px solid #e1e1e8;
21
+ }
22
+
23
+ // Blocks of code
24
+ pre {
25
+ display: block;
26
+ padding: ($baseLineHeight - 1) / 2;
27
+ margin: 0 0 $baseLineHeight / 2;
28
+ font-size: $baseFontSize * .925; // 13px to 12px
29
+ line-height: $baseLineHeight;
30
+ word-break: break-all;
31
+ word-wrap: break-word;
32
+ white-space: pre;
33
+ white-space: pre-wrap;
34
+ background-color: #f5f5f5;
35
+ border: 1px solid #ccc; // fallback for IE7-8
36
+ border: 1px solid rgba(0,0,0,.15);
37
+ @include border-radius(4px);
38
+
39
+ // Make prettyprint styles more spaced out for readability
40
+ &.prettyprint {
41
+ margin-bottom: $baseLineHeight;
42
+ }
43
+
44
+ // Account for some code outputs that place code tags in pre tags
45
+ code {
46
+ padding: 0;
47
+ color: inherit;
48
+ background-color: transparent;
49
+ border: 0;
50
+ }
51
+ }
52
+
53
+ // Enable scrollable blocks of code
54
+ .pre-scrollable {
55
+ max-height: 340px;
56
+ overflow-y: scroll;
57
+ }
@@ -0,0 +1,20 @@
1
+ // COMPONENT ANIMATIONS
2
+ // --------------------
3
+
4
+ .fade {
5
+ opacity: 0;
6
+ @include transition(opacity .15s linear);
7
+ &.in {
8
+ opacity: 1;
9
+ }
10
+ }
11
+
12
+ .collapse {
13
+ position: relative;
14
+ height: 0;
15
+ overflow: hidden;
16
+ @include transition(height .35s ease);
17
+ &.in {
18
+ height: auto;
19
+ }
20
+ }
@@ -0,0 +1,142 @@
1
+ // DROPDOWN MENUS
2
+ // --------------
3
+
4
+ // Use the .menu class on any <li> element within the topbar or ul.tabs and you'll get some superfancy dropdowns
5
+ .dropup,
6
+ .dropdown {
7
+ position: relative;
8
+ }
9
+ .dropdown-toggle {
10
+ // The caret makes the toggle a bit too tall in IE7
11
+ *margin-bottom: -3px;
12
+ }
13
+ .dropdown-toggle:active,
14
+ .open .dropdown-toggle {
15
+ outline: 0;
16
+ }
17
+
18
+ // Dropdown arrow/caret
19
+ // --------------------
20
+ .caret {
21
+ display: inline-block;
22
+ width: 0;
23
+ height: 0;
24
+ vertical-align: top;
25
+ border-top: 4px solid $black;
26
+ border-right: 4px solid transparent;
27
+ border-left: 4px solid transparent;
28
+ content: "";
29
+ @include opacity(30);
30
+ }
31
+ // Place the caret
32
+ .dropdown .caret {
33
+ margin-top: 8px;
34
+ margin-left: 2px;
35
+ }
36
+ .dropdown:hover .caret,
37
+ .open .caret {
38
+ @include opacity(100);
39
+ }
40
+
41
+ // The dropdown menu (ul)
42
+ // ----------------------
43
+ .dropdown-menu {
44
+ position: absolute;
45
+ top: 100%;
46
+ left: 0;
47
+ z-index: $zindexDropdown;
48
+ display: none; // none by default, but block on "open" of the menu
49
+ float: left;
50
+ min-width: 160px;
51
+ padding: 4px 0;
52
+ margin: 1px 0 0; // override default ul
53
+ list-style: none;
54
+ background-color: $dropdownBackground;
55
+ border: 1px solid #ccc;
56
+ border: 1px solid rgba(0,0,0,.2);
57
+ *border-right-width: 2px;
58
+ *border-bottom-width: 2px;
59
+ @include border-radius(5px);
60
+ @include box-shadow(0 5px 10px rgba(0,0,0,.2));
61
+ -webkit-background-clip: padding-box;
62
+ -moz-background-clip: padding;
63
+ background-clip: padding-box;
64
+
65
+ // Aligns the dropdown menu to right
66
+ &.pull-right {
67
+ right: 0;
68
+ left: auto;
69
+ }
70
+
71
+ // Dividers (basically an hr) within the dropdown
72
+ .divider {
73
+ @include nav-divider($dropdownDividerTop, $dropdownDividerBottom);
74
+ }
75
+
76
+ // Links within the dropdown menu
77
+ a {
78
+ display: block;
79
+ padding: 3px 15px;
80
+ clear: both;
81
+ font-weight: normal;
82
+ line-height: $baseLineHeight;
83
+ color: $dropdownLinkColor;
84
+ white-space: nowrap;
85
+ }
86
+ }
87
+
88
+ // Hover state
89
+ // -----------
90
+ .dropdown-menu li > a:hover,
91
+ .dropdown-menu .active > a,
92
+ .dropdown-menu .active > a:hover {
93
+ color: $dropdownLinkColorHover;
94
+ text-decoration: none;
95
+ background-color: $dropdownLinkBackgroundHover;
96
+ }
97
+
98
+ // Open state for the dropdown
99
+ // ---------------------------
100
+ .open {
101
+ // IE7's z-index only goes to the nearest positioned ancestor, which would
102
+ // make the menu appear below buttons that appeared later on the page
103
+ *z-index: $zindexDropdown;
104
+
105
+ & > .dropdown-menu {
106
+ display: block;
107
+ }
108
+ }
109
+
110
+ // Right aligned dropdowns
111
+ // ---------------------------
112
+ .pull-right > .dropdown-menu {
113
+ right: 0;
114
+ left: auto;
115
+ }
116
+
117
+ // Allow for dropdowns to go bottom up (aka, dropup-menu)
118
+ // ------------------------------------------------------
119
+ // Just add .dropup after the standard .dropdown class and you're set, bro.
120
+ // TODO: abstract this so that the navbar fixed styles are not placed here?
121
+ .dropup,
122
+ .navbar-fixed-bottom .dropdown {
123
+ // Reverse the caret
124
+ .caret {
125
+ border-top: 0;
126
+ border-bottom: 4px solid $black;
127
+ content: "\2191";
128
+ }
129
+ // Different positioning for bottom up menu
130
+ .dropdown-menu {
131
+ top: auto;
132
+ bottom: 100%;
133
+ margin-bottom: 1px;
134
+ }
135
+ }
136
+
137
+ // Typeahead
138
+ // ---------
139
+ .typeahead {
140
+ margin-top: 2px; // give it some space to breathe
141
+ @include border-radius(4px);
142
+ }
@@ -0,0 +1,589 @@
1
+ // Forms.less
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
+
267
+ // DISABLED STATE
268
+ // --------------
269
+
270
+ // Disabled and read-only inputs
271
+ input[disabled],
272
+ select[disabled],
273
+ textarea[disabled],
274
+ input[readonly],
275
+ select[readonly],
276
+ textarea[readonly] {
277
+ cursor: not-allowed;
278
+ background-color: $inputDisabledBackground;
279
+ border-color: #ddd;
280
+ }
281
+ // Explicitly reset the colors here
282
+ input[type="radio"][disabled],
283
+ input[type="checkbox"][disabled],
284
+ input[type="radio"][readonly],
285
+ input[type="checkbox"][readonly] {
286
+ background-color: transparent;
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
+ :-moz-placeholder {
346
+ color: $placeholderText;
347
+ }
348
+ :-ms-input-placeholder {
349
+ color: $placeholderText;
350
+ }
351
+ ::-webkit-input-placeholder {
352
+ color: $placeholderText;
353
+ }
354
+
355
+
356
+
357
+ // HELP TEXT
358
+ // ---------
359
+
360
+ .help-block,
361
+ .help-inline {
362
+ color: $gray; // lighten the text some for contrast
363
+ }
364
+
365
+ .help-block {
366
+ display: block; // account for any element using help-block
367
+ margin-bottom: $baseLineHeight / 2;
368
+ }
369
+
370
+ .help-inline {
371
+ display: inline-block;
372
+ @include ie7-inline-block();
373
+ vertical-align: middle;
374
+ padding-left: 5px;
375
+ }
376
+
377
+
378
+
379
+ // INPUT GROUPS
380
+ // ------------
381
+
382
+ // Allow us to put symbols and text within the input field for a cleaner look
383
+ .input-prepend,
384
+ .input-append {
385
+ margin-bottom: 5px;
386
+ input,
387
+ select,
388
+ .uneditable-input {
389
+ 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
390
+ margin-bottom: 0; // prevent bottom margin from screwing up alignment in stacked forms
391
+ *margin-left: 0;
392
+ vertical-align: middle;
393
+ @include border-radius(0 $inputBorderRadius $inputBorderRadius 0);
394
+ // Make input on top when focused so blue border and shadow always show
395
+ &:focus {
396
+ z-index: 2;
397
+ }
398
+ }
399
+ .uneditable-input {
400
+ border-left-color: #ccc;
401
+ }
402
+ .add-on {
403
+ display: inline-block;
404
+ width: auto;
405
+ height: $baseLineHeight;
406
+ min-width: 16px;
407
+ padding: 4px 5px;
408
+ font-weight: normal;
409
+ line-height: $baseLineHeight;
410
+ text-align: center;
411
+ text-shadow: 0 1px 0 $white;
412
+ vertical-align: middle;
413
+ background-color: $grayLighter;
414
+ border: 1px solid #ccc;
415
+ }
416
+ .add-on,
417
+ .btn {
418
+ margin-left: -1px;
419
+ @include border-radius(0);
420
+ }
421
+ .active {
422
+ background-color: lighten($green, 30);
423
+ border-color: $green;
424
+ }
425
+ }
426
+ .input-prepend {
427
+ .add-on,
428
+ .btn {
429
+ margin-right: -1px;
430
+ }
431
+ .add-on:first-child,
432
+ .btn:first-child {
433
+ @include border-radius($inputBorderRadius 0 0 $inputBorderRadius);
434
+ }
435
+ }
436
+ .input-append {
437
+ input,
438
+ select,
439
+ .uneditable-input {
440
+ @include border-radius($inputBorderRadius 0 0 $inputBorderRadius);
441
+ }
442
+ .uneditable-input {
443
+ border-right-color: #ccc;
444
+ border-left-color: #eee;
445
+ }
446
+ .add-on:last-child,
447
+ .btn:last-child {
448
+ @include border-radius(0 $inputBorderRadius $inputBorderRadius 0);
449
+ }
450
+ }
451
+ // Remove all border-radius for inputs with both prepend and append
452
+ .input-prepend.input-append {
453
+ input,
454
+ select,
455
+ .uneditable-input {
456
+ @include border-radius(0);
457
+ }
458
+ .add-on:first-child,
459
+ .btn:first-child {
460
+ margin-right: -1px;
461
+ @include border-radius($inputBorderRadius 0 0 $inputBorderRadius);
462
+ }
463
+ .add-on:last-child,
464
+ .btn:last-child {
465
+ margin-left: -1px;
466
+ @include border-radius(0 $inputBorderRadius $inputBorderRadius 0);
467
+ }
468
+ }
469
+
470
+
471
+ // SEARCH FORM
472
+ // -----------
473
+
474
+ .search-query {
475
+ padding-right: 14px;
476
+ padding-right: 4px \9;
477
+ padding-left: 14px;
478
+ padding-left: 4px \9; /* IE7-8 doesn't have border-radius, so don't indent the padding */
479
+ margin-bottom: 0; // remove the default margin on all inputs
480
+ @include border-radius(14px);
481
+ }
482
+
483
+
484
+
485
+ // HORIZONTAL & VERTICAL FORMS
486
+ // ---------------------------
487
+
488
+ // Common properties
489
+ // -----------------
490
+
491
+ .form-search,
492
+ .form-inline,
493
+ .form-horizontal {
494
+ input,
495
+ textarea,
496
+ select,
497
+ .help-inline,
498
+ .uneditable-input,
499
+ .input-prepend,
500
+ .input-append {
501
+ display: inline-block;
502
+ @include ie7-inline-block();
503
+ margin-bottom: 0;
504
+ }
505
+ // Re-hide hidden elements due to specifity
506
+ .hide {
507
+ display: none;
508
+ }
509
+ }
510
+ .form-search label,
511
+ .form-inline label {
512
+ display: inline-block;
513
+ }
514
+ // Remove margin for input-prepend/-append
515
+ .form-search .input-append,
516
+ .form-inline .input-append,
517
+ .form-search .input-prepend,
518
+ .form-inline .input-prepend {
519
+ margin-bottom: 0;
520
+ }
521
+ // Inline checkbox/radio labels (remove padding on left)
522
+ .form-search .radio,
523
+ .form-search .checkbox,
524
+ .form-inline .radio,
525
+ .form-inline .checkbox {
526
+ padding-left: 0;
527
+ margin-bottom: 0;
528
+ vertical-align: middle;
529
+ }
530
+ // Remove float and margin, set to inline-block
531
+ .form-search .radio input[type="radio"],
532
+ .form-search .checkbox input[type="checkbox"],
533
+ .form-inline .radio input[type="radio"],
534
+ .form-inline .checkbox input[type="checkbox"] {
535
+ float: left;
536
+ margin-right: 3px;
537
+ margin-left: 0;
538
+ }
539
+
540
+
541
+ // Margin to space out fieldsets
542
+ .control-group {
543
+ margin-bottom: $baseLineHeight / 2;
544
+ }
545
+
546
+ // Legend collapses margin, so next element is responsible for spacing
547
+ legend + .control-group {
548
+ margin-top: $baseLineHeight;
549
+ -webkit-margin-top-collapse: separate;
550
+ }
551
+
552
+ // Horizontal-specific styles
553
+ // --------------------------
554
+
555
+ .form-horizontal {
556
+ // Increase spacing between groups
557
+ .control-group {
558
+ margin-bottom: $baseLineHeight;
559
+ @include clearfix();
560
+ }
561
+ // Float the labels left
562
+ .control-label {
563
+ float: left;
564
+ width: 140px;
565
+ padding-top: 5px;
566
+ text-align: right;
567
+ }
568
+ // Move over all input controls and content
569
+ .controls {
570
+ // Super jank IE7 fix to ensure the inputs in .input-append and input-prepend
571
+ // don't inherit the margin of the parent, in this case .controls
572
+ *display: inline-block;
573
+ *padding-left: 20px;
574
+ margin-left: 160px;
575
+ *margin-left: 0;
576
+ &:first-child {
577
+ *padding-left: 160px;
578
+ }
579
+ }
580
+ // Remove bottom margin on block level help text since that's accounted for on .control-group
581
+ .help-block {
582
+ margin-top: $baseLineHeight / 2;
583
+ margin-bottom: 0;
584
+ }
585
+ // Move over buttons in .form-actions to align with .controls
586
+ .form-actions {
587
+ padding-left: 160px;
588
+ }
589
+ }