bootstrap-sass 2.3.1.3 → 3.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (233) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +20 -0
  3. data/.travis.yml +19 -0
  4. data/CHANGELOG.md +215 -0
  5. data/CONTRIBUTING.md +86 -0
  6. data/Gemfile +7 -0
  7. data/LICENSE +18 -10
  8. data/README.md +290 -67
  9. data/Rakefile +98 -0
  10. data/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
  11. data/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +288 -0
  12. data/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
  13. data/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
  14. data/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2 +0 -0
  15. data/assets/images/.keep +0 -0
  16. data/assets/javascripts/bootstrap-sprockets.js +12 -0
  17. data/assets/javascripts/bootstrap.js +2580 -0
  18. data/assets/javascripts/bootstrap.min.js +6 -0
  19. data/assets/javascripts/bootstrap/affix.js +164 -0
  20. data/assets/javascripts/bootstrap/alert.js +95 -0
  21. data/assets/javascripts/bootstrap/button.js +125 -0
  22. data/assets/javascripts/bootstrap/carousel.js +246 -0
  23. data/assets/javascripts/bootstrap/collapse.js +212 -0
  24. data/assets/javascripts/bootstrap/dropdown.js +165 -0
  25. data/assets/javascripts/bootstrap/modal.js +358 -0
  26. data/assets/javascripts/bootstrap/popover.js +123 -0
  27. data/assets/javascripts/bootstrap/scrollspy.js +172 -0
  28. data/assets/javascripts/bootstrap/tab.js +155 -0
  29. data/assets/javascripts/bootstrap/tooltip.js +677 -0
  30. data/assets/javascripts/bootstrap/transition.js +59 -0
  31. data/assets/stylesheets/_bootstrap-compass.scss +9 -0
  32. data/assets/stylesheets/_bootstrap-mincer.scss +19 -0
  33. data/assets/stylesheets/_bootstrap-sprockets.scss +9 -0
  34. data/assets/stylesheets/_bootstrap.scss +56 -0
  35. data/assets/stylesheets/bootstrap/_alerts.scss +73 -0
  36. data/assets/stylesheets/bootstrap/_badges.scss +68 -0
  37. data/assets/stylesheets/bootstrap/_breadcrumbs.scss +28 -0
  38. data/assets/stylesheets/bootstrap/_button-groups.scss +244 -0
  39. data/assets/stylesheets/bootstrap/_buttons.scss +168 -0
  40. data/assets/stylesheets/bootstrap/_carousel.scss +271 -0
  41. data/{vendor/assets → assets}/stylesheets/bootstrap/_close.scss +13 -8
  42. data/assets/stylesheets/bootstrap/_code.scss +69 -0
  43. data/assets/stylesheets/bootstrap/_component-animations.scss +38 -0
  44. data/assets/stylesheets/bootstrap/_dropdowns.scss +213 -0
  45. data/assets/stylesheets/bootstrap/_forms.scss +607 -0
  46. data/assets/stylesheets/bootstrap/_glyphicons.scss +307 -0
  47. data/assets/stylesheets/bootstrap/_grid.scss +94 -0
  48. data/assets/stylesheets/bootstrap/_input-groups.scss +171 -0
  49. data/assets/stylesheets/bootstrap/_jumbotron.scss +54 -0
  50. data/assets/stylesheets/bootstrap/_labels.scss +66 -0
  51. data/assets/stylesheets/bootstrap/_list-group.scss +128 -0
  52. data/assets/stylesheets/bootstrap/_media.scss +66 -0
  53. data/assets/stylesheets/bootstrap/_mixins.scss +40 -0
  54. data/assets/stylesheets/bootstrap/_modals.scss +150 -0
  55. data/assets/stylesheets/bootstrap/_navbar.scss +656 -0
  56. data/assets/stylesheets/bootstrap/_navs.scss +242 -0
  57. data/assets/stylesheets/bootstrap/_normalize.scss +427 -0
  58. data/assets/stylesheets/bootstrap/_pager.scss +54 -0
  59. data/assets/stylesheets/bootstrap/_pagination.scss +86 -0
  60. data/assets/stylesheets/bootstrap/_panels.scss +271 -0
  61. data/assets/stylesheets/bootstrap/_popovers.scss +126 -0
  62. data/assets/stylesheets/bootstrap/_print.scss +99 -0
  63. data/assets/stylesheets/bootstrap/_progress-bars.scss +87 -0
  64. data/assets/stylesheets/bootstrap/_responsive-embed.scss +35 -0
  65. data/assets/stylesheets/bootstrap/_responsive-utilities.scss +179 -0
  66. data/assets/stylesheets/bootstrap/_scaffolding.scss +161 -0
  67. data/assets/stylesheets/bootstrap/_tables.scss +234 -0
  68. data/assets/stylesheets/bootstrap/_theme.scss +295 -0
  69. data/assets/stylesheets/bootstrap/_thumbnails.scss +38 -0
  70. data/assets/stylesheets/bootstrap/_tooltip.scss +112 -0
  71. data/assets/stylesheets/bootstrap/_type.scss +298 -0
  72. data/assets/stylesheets/bootstrap/_utilities.scss +55 -0
  73. data/assets/stylesheets/bootstrap/_variables.scss +874 -0
  74. data/assets/stylesheets/bootstrap/_wells.scss +29 -0
  75. data/assets/stylesheets/bootstrap/mixins/_alerts.scss +15 -0
  76. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +12 -0
  77. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +18 -0
  78. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +61 -0
  79. data/assets/stylesheets/bootstrap/mixins/_center-block.scss +7 -0
  80. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +22 -0
  81. data/assets/stylesheets/bootstrap/mixins/_forms.scss +88 -0
  82. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +56 -0
  83. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +81 -0
  84. data/assets/stylesheets/bootstrap/mixins/_grid.scss +122 -0
  85. data/assets/stylesheets/bootstrap/mixins/_hide-text.scss +21 -0
  86. data/assets/stylesheets/bootstrap/mixins/_image.scss +28 -0
  87. data/assets/stylesheets/bootstrap/mixins/_labels.scss +12 -0
  88. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +32 -0
  89. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +10 -0
  90. data/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +9 -0
  91. data/assets/stylesheets/bootstrap/mixins/_opacity.scss +7 -0
  92. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +24 -0
  93. data/assets/stylesheets/bootstrap/mixins/_panels.scss +24 -0
  94. data/assets/stylesheets/bootstrap/mixins/_progress-bar.scss +10 -0
  95. data/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +8 -0
  96. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +18 -0
  97. data/assets/stylesheets/bootstrap/mixins/_resize.scss +6 -0
  98. data/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +17 -0
  99. data/assets/stylesheets/bootstrap/mixins/_size.scss +10 -0
  100. data/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +9 -0
  101. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +28 -0
  102. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +12 -0
  103. data/assets/stylesheets/bootstrap/mixins/_text-overflow.scss +8 -0
  104. data/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +222 -0
  105. data/bootstrap-sass.gemspec +37 -0
  106. data/bower.json +36 -0
  107. data/composer.json +35 -0
  108. data/eyeglass-exports.js +7 -0
  109. data/lib/bootstrap-sass.rb +75 -35
  110. data/lib/bootstrap-sass/engine.rb +12 -2
  111. data/lib/bootstrap-sass/version.rb +4 -0
  112. data/package-lock.json +1611 -0
  113. data/package.json +44 -0
  114. data/sache.json +5 -0
  115. data/tasks/bower.rake +31 -0
  116. data/tasks/converter.rb +80 -0
  117. data/tasks/converter/char_string_scanner.rb +38 -0
  118. data/tasks/converter/fonts_conversion.rb +16 -0
  119. data/tasks/converter/js_conversion.rb +47 -0
  120. data/tasks/converter/less_conversion.rb +713 -0
  121. data/tasks/converter/logger.rb +57 -0
  122. data/tasks/converter/network.rb +97 -0
  123. data/templates/project/_bootstrap-variables.sass +875 -0
  124. data/templates/project/manifest.rb +15 -14
  125. data/templates/project/styles.sass +6 -0
  126. data/test/compilation_test.rb +30 -0
  127. data/test/dummy_node_mincer/apple-touch-icon-144-precomposed.png +0 -0
  128. data/test/dummy_node_mincer/application.css.ejs.scss +6 -0
  129. data/test/dummy_node_mincer/manifest.js +87 -0
  130. data/test/dummy_rails/README.rdoc +3 -0
  131. data/test/dummy_rails/Rakefile +6 -0
  132. data/test/dummy_rails/app/assets/images/.keep +0 -0
  133. data/test/dummy_rails/app/assets/javascripts/application.js +2 -0
  134. data/test/dummy_rails/app/assets/stylesheets/application.sass +2 -0
  135. data/test/dummy_rails/app/controllers/application_controller.rb +5 -0
  136. data/test/dummy_rails/app/controllers/pages_controller.rb +4 -0
  137. data/test/dummy_rails/app/helpers/application_helper.rb +2 -0
  138. data/test/dummy_rails/app/views/layouts/application.html.erb +14 -0
  139. data/test/dummy_rails/app/views/pages/root.html.slim +84 -0
  140. data/test/dummy_rails/config.ru +4 -0
  141. data/test/dummy_rails/config/application.rb +31 -0
  142. data/test/dummy_rails/config/boot.rb +5 -0
  143. data/test/dummy_rails/config/environment.rb +5 -0
  144. data/test/dummy_rails/config/environments/development.rb +23 -0
  145. data/test/dummy_rails/config/environments/production.rb +82 -0
  146. data/test/dummy_rails/config/environments/test.rb +38 -0
  147. data/test/dummy_rails/config/initializers/backtrace_silencers.rb +7 -0
  148. data/test/dummy_rails/config/initializers/filter_parameter_logging.rb +4 -0
  149. data/test/dummy_rails/config/initializers/inflections.rb +16 -0
  150. data/test/dummy_rails/config/initializers/mime_types.rb +5 -0
  151. data/test/dummy_rails/config/initializers/secret_token.rb +18 -0
  152. data/test/dummy_rails/config/initializers/session_store.rb +3 -0
  153. data/test/dummy_rails/config/initializers/wrap_parameters.rb +14 -0
  154. data/test/dummy_rails/config/locales/en.yml +3 -0
  155. data/test/dummy_rails/config/locales/es.yml +3 -0
  156. data/test/dummy_rails/config/routes.rb +3 -0
  157. data/test/dummy_rails/log/.keep +0 -0
  158. data/test/dummy_sass_only/Gemfile +4 -0
  159. data/test/dummy_sass_only/compile.rb +20 -0
  160. data/test/dummy_sass_only/import_all.scss +2 -0
  161. data/test/gemfiles/default.gemfile +3 -0
  162. data/test/node_mincer_test.rb +35 -0
  163. data/test/node_sass_compile_test.sh +9 -0
  164. data/test/pages_test.rb +14 -0
  165. data/test/sass_test.rb +29 -0
  166. data/test/sprockets_rails_test.rb +31 -0
  167. data/test/support/dummy_rails_integration.rb +22 -0
  168. data/test/support/reporting.rb +27 -0
  169. data/test/test_helper.rb +36 -0
  170. data/test/test_helper_rails.rb +6 -0
  171. metadata +404 -89
  172. data/lib/bootstrap-sass/compass_functions.rb +0 -24
  173. data/lib/bootstrap-sass/sass_functions.rb +0 -14
  174. data/templates/project/_variables.scss +0 -301
  175. data/templates/project/styles.scss +0 -8
  176. data/vendor/assets/images/glyphicons-halflings-white.png +0 -0
  177. data/vendor/assets/images/glyphicons-halflings.png +0 -0
  178. data/vendor/assets/javascripts/bootstrap-affix.js +0 -117
  179. data/vendor/assets/javascripts/bootstrap-alert.js +0 -99
  180. data/vendor/assets/javascripts/bootstrap-button.js +0 -105
  181. data/vendor/assets/javascripts/bootstrap-carousel.js +0 -207
  182. data/vendor/assets/javascripts/bootstrap-collapse.js +0 -167
  183. data/vendor/assets/javascripts/bootstrap-dropdown.js +0 -165
  184. data/vendor/assets/javascripts/bootstrap-modal.js +0 -247
  185. data/vendor/assets/javascripts/bootstrap-popover.js +0 -114
  186. data/vendor/assets/javascripts/bootstrap-scrollspy.js +0 -162
  187. data/vendor/assets/javascripts/bootstrap-tab.js +0 -144
  188. data/vendor/assets/javascripts/bootstrap-tooltip.js +0 -361
  189. data/vendor/assets/javascripts/bootstrap-transition.js +0 -60
  190. data/vendor/assets/javascripts/bootstrap-typeahead.js +0 -335
  191. data/vendor/assets/javascripts/bootstrap.js +0 -13
  192. data/vendor/assets/stylesheets/bootstrap-responsive.scss +0 -1
  193. data/vendor/assets/stylesheets/bootstrap.scss +0 -1
  194. data/vendor/assets/stylesheets/bootstrap/_accordion.scss +0 -34
  195. data/vendor/assets/stylesheets/bootstrap/_alerts.scss +0 -79
  196. data/vendor/assets/stylesheets/bootstrap/_breadcrumbs.scss +0 -24
  197. data/vendor/assets/stylesheets/bootstrap/_button-groups.scss +0 -229
  198. data/vendor/assets/stylesheets/bootstrap/_buttons.scss +0 -228
  199. data/vendor/assets/stylesheets/bootstrap/_carousel.scss +0 -158
  200. data/vendor/assets/stylesheets/bootstrap/_code.scss +0 -61
  201. data/vendor/assets/stylesheets/bootstrap/_component-animations.scss +0 -22
  202. data/vendor/assets/stylesheets/bootstrap/_dropdowns.scss +0 -237
  203. data/vendor/assets/stylesheets/bootstrap/_forms.scss +0 -689
  204. data/vendor/assets/stylesheets/bootstrap/_grid.scss +0 -21
  205. data/vendor/assets/stylesheets/bootstrap/_hero-unit.scss +0 -25
  206. data/vendor/assets/stylesheets/bootstrap/_labels-badges.scss +0 -83
  207. data/vendor/assets/stylesheets/bootstrap/_layouts.scss +0 -16
  208. data/vendor/assets/stylesheets/bootstrap/_media.scss +0 -55
  209. data/vendor/assets/stylesheets/bootstrap/_mixins.scss +0 -690
  210. data/vendor/assets/stylesheets/bootstrap/_modals.scss +0 -95
  211. data/vendor/assets/stylesheets/bootstrap/_navbar.scss +0 -497
  212. data/vendor/assets/stylesheets/bootstrap/_navs.scss +0 -409
  213. data/vendor/assets/stylesheets/bootstrap/_pager.scss +0 -43
  214. data/vendor/assets/stylesheets/bootstrap/_pagination.scss +0 -123
  215. data/vendor/assets/stylesheets/bootstrap/_popovers.scss +0 -133
  216. data/vendor/assets/stylesheets/bootstrap/_progress-bars.scss +0 -122
  217. data/vendor/assets/stylesheets/bootstrap/_reset.scss +0 -216
  218. data/vendor/assets/stylesheets/bootstrap/_responsive-1200px-min.scss +0 -28
  219. data/vendor/assets/stylesheets/bootstrap/_responsive-767px-max.scss +0 -193
  220. data/vendor/assets/stylesheets/bootstrap/_responsive-768px-979px.scss +0 -19
  221. data/vendor/assets/stylesheets/bootstrap/_responsive-navbar.scss +0 -189
  222. data/vendor/assets/stylesheets/bootstrap/_responsive-utilities.scss +0 -74
  223. data/vendor/assets/stylesheets/bootstrap/_scaffolding.scss +0 -53
  224. data/vendor/assets/stylesheets/bootstrap/_sprites.scss +0 -197
  225. data/vendor/assets/stylesheets/bootstrap/_tables.scss +0 -235
  226. data/vendor/assets/stylesheets/bootstrap/_thumbnails.scss +0 -53
  227. data/vendor/assets/stylesheets/bootstrap/_tooltip.scss +0 -70
  228. data/vendor/assets/stylesheets/bootstrap/_type.scss +0 -247
  229. data/vendor/assets/stylesheets/bootstrap/_utilities.scss +0 -45
  230. data/vendor/assets/stylesheets/bootstrap/_variables.scss +0 -301
  231. data/vendor/assets/stylesheets/bootstrap/_wells.scss +0 -29
  232. data/vendor/assets/stylesheets/bootstrap/bootstrap.scss +0 -63
  233. data/vendor/assets/stylesheets/bootstrap/responsive.scss +0 -48
@@ -0,0 +1,69 @@
1
+ //
2
+ // Code (inline and block)
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Inline and block code styles
7
+ code,
8
+ kbd,
9
+ pre,
10
+ samp {
11
+ font-family: $font-family-monospace;
12
+ }
13
+
14
+ // Inline code
15
+ code {
16
+ padding: 2px 4px;
17
+ font-size: 90%;
18
+ color: $code-color;
19
+ background-color: $code-bg;
20
+ border-radius: $border-radius-base;
21
+ }
22
+
23
+ // User input typically entered via keyboard
24
+ kbd {
25
+ padding: 2px 4px;
26
+ font-size: 90%;
27
+ color: $kbd-color;
28
+ background-color: $kbd-bg;
29
+ border-radius: $border-radius-small;
30
+ box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);
31
+
32
+ kbd {
33
+ padding: 0;
34
+ font-size: 100%;
35
+ font-weight: 700;
36
+ box-shadow: none;
37
+ }
38
+ }
39
+
40
+ // Blocks of code
41
+ pre {
42
+ display: block;
43
+ padding: (($line-height-computed - 1) / 2);
44
+ margin: 0 0 ($line-height-computed / 2);
45
+ font-size: ($font-size-base - 1); // 14px to 13px
46
+ line-height: $line-height-base;
47
+ color: $pre-color;
48
+ word-break: break-all;
49
+ word-wrap: break-word;
50
+ background-color: $pre-bg;
51
+ border: 1px solid $pre-border-color;
52
+ border-radius: $border-radius-base;
53
+
54
+ // Account for some code outputs that place code tags in pre tags
55
+ code {
56
+ padding: 0;
57
+ font-size: inherit;
58
+ color: inherit;
59
+ white-space: pre-wrap;
60
+ background-color: transparent;
61
+ border-radius: 0;
62
+ }
63
+ }
64
+
65
+ // Enable scrollable blocks of code
66
+ .pre-scrollable {
67
+ max-height: $pre-scrollable-max-height;
68
+ overflow-y: scroll;
69
+ }
@@ -0,0 +1,38 @@
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
+
14
+ &.in {
15
+ opacity: 1;
16
+ }
17
+ }
18
+
19
+ .collapse {
20
+ display: none;
21
+
22
+ &.in { display: block; }
23
+ // [converter] extracted tr&.in to tr.collapse.in
24
+ // [converter] extracted tbody&.in to tbody.collapse.in
25
+ }
26
+
27
+ tr.collapse.in { display: table-row; }
28
+
29
+ tbody.collapse.in { display: table-row-group; }
30
+
31
+ .collapsing {
32
+ position: relative;
33
+ height: 0;
34
+ overflow: hidden;
35
+ @include transition-property(height, visibility);
36
+ @include transition-duration(.35s);
37
+ @include transition-timing-function(ease);
38
+ }
@@ -0,0 +1,213 @@
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 dashed;
14
+ border-top: $caret-width-base solid \9; // IE8
15
+ border-right: $caret-width-base solid transparent;
16
+ border-left: $caret-width-base solid transparent;
17
+ }
18
+
19
+ // The dropdown wrapper (div)
20
+ .dropup,
21
+ .dropdown {
22
+ position: relative;
23
+ }
24
+
25
+ // Prevent the focus on the dropdown toggle when closing dropdowns
26
+ .dropdown-toggle:focus {
27
+ outline: 0;
28
+ }
29
+
30
+ // The dropdown menu (ul)
31
+ .dropdown-menu {
32
+ position: absolute;
33
+ top: 100%;
34
+ left: 0;
35
+ z-index: $zindex-dropdown;
36
+ display: none; // none by default, but block on "open" of the menu
37
+ float: left;
38
+ min-width: 160px;
39
+ padding: 5px 0;
40
+ margin: 2px 0 0; // override default ul
41
+ font-size: $font-size-base;
42
+ text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
43
+ list-style: none;
44
+ background-color: $dropdown-bg;
45
+ background-clip: padding-box;
46
+ border: 1px solid $dropdown-fallback-border; // IE8 fallback
47
+ border: 1px solid $dropdown-border;
48
+ border-radius: $border-radius-base;
49
+ @include box-shadow(0 6px 12px rgba(0, 0, 0, .175));
50
+
51
+ // Aligns the dropdown menu to right
52
+ //
53
+ // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`
54
+ &.pull-right {
55
+ right: 0;
56
+ left: auto;
57
+ }
58
+
59
+ // Dividers (basically an hr) within the dropdown
60
+ .divider {
61
+ @include nav-divider($dropdown-divider-bg);
62
+ }
63
+
64
+ // Links within the dropdown menu
65
+ > li > a {
66
+ display: block;
67
+ padding: 3px 20px;
68
+ clear: both;
69
+ font-weight: 400;
70
+ line-height: $line-height-base;
71
+ color: $dropdown-link-color;
72
+ white-space: nowrap; // prevent links from randomly breaking onto new lines
73
+
74
+ &:hover,
75
+ &:focus {
76
+ color: $dropdown-link-hover-color;
77
+ text-decoration: none;
78
+ background-color: $dropdown-link-hover-bg;
79
+ }
80
+ }
81
+ }
82
+
83
+ // Active state
84
+ .dropdown-menu > .active > a {
85
+ &,
86
+ &:hover,
87
+ &:focus {
88
+ color: $dropdown-link-active-color;
89
+ text-decoration: none;
90
+ background-color: $dropdown-link-active-bg;
91
+ outline: 0;
92
+ }
93
+ }
94
+
95
+ // Disabled state
96
+ //
97
+ // Gray out text and ensure the hover/focus state remains gray
98
+
99
+ .dropdown-menu > .disabled > a {
100
+ &,
101
+ &:hover,
102
+ &:focus {
103
+ color: $dropdown-link-disabled-color;
104
+ }
105
+
106
+ // Nuke hover/focus effects
107
+ &:hover,
108
+ &:focus {
109
+ text-decoration: none;
110
+ cursor: $cursor-disabled;
111
+ background-color: transparent;
112
+ background-image: none; // Remove CSS gradient
113
+ @include reset-filter;
114
+ }
115
+ }
116
+
117
+ // Open state for the dropdown
118
+ .open {
119
+ // Show the menu
120
+ > .dropdown-menu {
121
+ display: block;
122
+ }
123
+
124
+ // Remove the outline when :focus is triggered
125
+ > a {
126
+ outline: 0;
127
+ }
128
+ }
129
+
130
+ // Menu positioning
131
+ //
132
+ // Add extra class to `.dropdown-menu` to flip the alignment of the dropdown
133
+ // menu with the parent.
134
+ .dropdown-menu-right {
135
+ right: 0;
136
+ left: auto; // Reset the default from `.dropdown-menu`
137
+ }
138
+ // With v3, we enabled auto-flipping if you have a dropdown within a right
139
+ // aligned nav component. To enable the undoing of that, we provide an override
140
+ // to restore the default dropdown menu alignment.
141
+ //
142
+ // This is only for left-aligning a dropdown menu within a `.navbar-right` or
143
+ // `.pull-right` nav component.
144
+ .dropdown-menu-left {
145
+ right: auto;
146
+ left: 0;
147
+ }
148
+
149
+ // Dropdown section headers
150
+ .dropdown-header {
151
+ display: block;
152
+ padding: 3px 20px;
153
+ font-size: $font-size-small;
154
+ line-height: $line-height-base;
155
+ color: $dropdown-header-color;
156
+ white-space: nowrap; // as with > li > a
157
+ }
158
+
159
+ // Backdrop to catch body clicks on mobile, etc.
160
+ .dropdown-backdrop {
161
+ position: fixed;
162
+ top: 0;
163
+ right: 0;
164
+ bottom: 0;
165
+ left: 0;
166
+ z-index: ($zindex-dropdown - 10);
167
+ }
168
+
169
+ // Right aligned dropdowns
170
+ .pull-right > .dropdown-menu {
171
+ right: 0;
172
+ left: auto;
173
+ }
174
+
175
+ // Allow for dropdowns to go bottom up (aka, dropup-menu)
176
+ //
177
+ // Just add .dropup after the standard .dropdown class and you're set, bro.
178
+ // TODO: abstract this so that the navbar fixed styles are not placed here?
179
+
180
+ .dropup,
181
+ .navbar-fixed-bottom .dropdown {
182
+ // Reverse the caret
183
+ .caret {
184
+ content: "";
185
+ border-top: 0;
186
+ border-bottom: $caret-width-base dashed;
187
+ border-bottom: $caret-width-base solid \9; // IE8
188
+ }
189
+ // Different positioning for bottom up menu
190
+ .dropdown-menu {
191
+ top: auto;
192
+ bottom: 100%;
193
+ margin-bottom: 2px;
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
+ }
@@ -0,0 +1,607 @@
1
+ //
2
+ // Forms
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Normalize non-controls
7
+ //
8
+ // Restyle and baseline non-control form elements.
9
+
10
+ fieldset {
11
+ // Chrome and Firefox set a `min-width: min-content;` on fieldsets,
12
+ // so we reset that to ensure it behaves more like a standard block element.
13
+ // See https://github.com/twbs/bootstrap/issues/12359.
14
+ min-width: 0;
15
+ padding: 0;
16
+ margin: 0;
17
+ border: 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: 700;
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
+ input[type="search"] {
47
+ // Override content-box in Normalize (* isn't specific enough)
48
+ @include box-sizing(border-box);
49
+
50
+ // Search inputs in iOS
51
+ //
52
+ // This overrides the extra rounded corners on search inputs in iOS so that our
53
+ // `.form-control` class can properly style them. Note that this cannot simply
54
+ // be added to `.form-control` as it's not specific enough. For details, see
55
+ // https://github.com/twbs/bootstrap/issues/11586.
56
+ -webkit-appearance: none;
57
+ appearance: none;
58
+ }
59
+
60
+ // Position radios and checkboxes better
61
+ input[type="radio"],
62
+ input[type="checkbox"] {
63
+ margin: 4px 0 0;
64
+ margin-top: 1px \9; // IE8-9
65
+ line-height: normal;
66
+
67
+ // Apply same disabled cursor tweak as for inputs
68
+ // Some special care is needed because <label>s don't inherit their parent's `cursor`.
69
+ //
70
+ // Note: Neither radios nor checkboxes can be readonly.
71
+ &[disabled],
72
+ &.disabled,
73
+ fieldset[disabled] & {
74
+ cursor: $cursor-disabled;
75
+ }
76
+ }
77
+
78
+ input[type="file"] {
79
+ display: block;
80
+ }
81
+
82
+ // Make range inputs behave like textual form controls
83
+ input[type="range"] {
84
+ display: block;
85
+ width: 100%;
86
+ }
87
+
88
+ // Make multiple select elements height not fixed
89
+ select[multiple],
90
+ select[size] {
91
+ height: auto;
92
+ }
93
+
94
+ // Focus for file, radio, and checkbox
95
+ input[type="file"]:focus,
96
+ input[type="radio"]:focus,
97
+ input[type="checkbox"]:focus {
98
+ @include tab-focus;
99
+ }
100
+
101
+ // Adjust output element
102
+ output {
103
+ display: block;
104
+ padding-top: ($padding-base-vertical + 1);
105
+ font-size: $font-size-base;
106
+ line-height: $line-height-base;
107
+ color: $input-color;
108
+ }
109
+
110
+
111
+ // Common form controls
112
+ //
113
+ // Shared size and type resets for form controls. Apply `.form-control` to any
114
+ // of the following form controls:
115
+ //
116
+ // select
117
+ // textarea
118
+ // input[type="text"]
119
+ // input[type="password"]
120
+ // input[type="datetime"]
121
+ // input[type="datetime-local"]
122
+ // input[type="date"]
123
+ // input[type="month"]
124
+ // input[type="time"]
125
+ // input[type="week"]
126
+ // input[type="number"]
127
+ // input[type="email"]
128
+ // input[type="url"]
129
+ // input[type="search"]
130
+ // input[type="tel"]
131
+ // input[type="color"]
132
+
133
+ .form-control {
134
+ display: block;
135
+ width: 100%;
136
+ height: $input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)
137
+ padding: $padding-base-vertical $padding-base-horizontal;
138
+ font-size: $font-size-base;
139
+ line-height: $line-height-base;
140
+ color: $input-color;
141
+ background-color: $input-bg;
142
+ background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
143
+ border: 1px solid $input-border;
144
+ border-radius: $input-border-radius; // Note: This has no effect on <select>s in some browsers, due to the limited stylability of <select>s in CSS.
145
+ @include box-shadow(inset 0 1px 1px rgba(0, 0, 0, .075));
146
+ @include transition(border-color ease-in-out .15s, box-shadow ease-in-out .15s);
147
+
148
+ // Customize the `:focus` state to imitate native WebKit styles.
149
+ @include form-control-focus;
150
+
151
+ // Placeholder
152
+ @include placeholder;
153
+
154
+ // Unstyle the caret on `<select>`s in IE10+.
155
+ &::-ms-expand {
156
+ background-color: transparent;
157
+ border: 0;
158
+ }
159
+
160
+ // Disabled and read-only inputs
161
+ //
162
+ // HTML5 says that controls under a fieldset > legend:first-child won't be
163
+ // disabled if the fieldset is disabled. Due to implementation difficulty, we
164
+ // don't honor that edge case; we style them as disabled anyway.
165
+ &[disabled],
166
+ &[readonly],
167
+ fieldset[disabled] & {
168
+ background-color: $input-bg-disabled;
169
+ opacity: 1; // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655
170
+ }
171
+
172
+ &[disabled],
173
+ fieldset[disabled] & {
174
+ cursor: $cursor-disabled;
175
+ }
176
+
177
+ // [converter] extracted textarea& to textarea.form-control
178
+ }
179
+
180
+ // Reset height for `textarea`s
181
+ textarea.form-control {
182
+ height: auto;
183
+ }
184
+
185
+
186
+ // Special styles for iOS temporal inputs
187
+ //
188
+ // In Mobile Safari, setting `display: block` on temporal inputs causes the
189
+ // text within the input to become vertically misaligned. As a workaround, we
190
+ // set a pixel line-height that matches the given height of the input, but only
191
+ // for Safari. See https://bugs.webkit.org/show_bug.cgi?id=139848
192
+ //
193
+ // Note that as of 9.3, iOS doesn't support `week`.
194
+
195
+ @media screen and (-webkit-min-device-pixel-ratio: 0) {
196
+ input[type="date"],
197
+ input[type="time"],
198
+ input[type="datetime-local"],
199
+ input[type="month"] {
200
+ &.form-control {
201
+ line-height: $input-height-base;
202
+ }
203
+
204
+ &.input-sm,
205
+ .input-group-sm & {
206
+ line-height: $input-height-small;
207
+ }
208
+
209
+ &.input-lg,
210
+ .input-group-lg & {
211
+ line-height: $input-height-large;
212
+ }
213
+ }
214
+ }
215
+
216
+
217
+ // Form groups
218
+ //
219
+ // Designed to help with the organization and spacing of vertical forms. For
220
+ // horizontal forms, use the predefined grid classes.
221
+
222
+ .form-group {
223
+ margin-bottom: $form-group-margin-bottom;
224
+ }
225
+
226
+
227
+ // Checkboxes and radios
228
+ //
229
+ // Indent the labels to position radios/checkboxes as hanging controls.
230
+
231
+ .radio,
232
+ .checkbox {
233
+ position: relative;
234
+ display: block;
235
+ margin-top: 10px;
236
+ margin-bottom: 10px;
237
+
238
+ // These are used on elements with <label> descendants
239
+ &.disabled,
240
+ fieldset[disabled] & {
241
+ label {
242
+ cursor: $cursor-disabled;
243
+ }
244
+ }
245
+
246
+ label {
247
+ min-height: $line-height-computed; // Ensure the input doesn't jump when there is no text
248
+ padding-left: 20px;
249
+ margin-bottom: 0;
250
+ font-weight: 400;
251
+ cursor: pointer;
252
+ }
253
+ }
254
+ .radio input[type="radio"],
255
+ .radio-inline input[type="radio"],
256
+ .checkbox input[type="checkbox"],
257
+ .checkbox-inline input[type="checkbox"] {
258
+ position: absolute;
259
+ margin-top: 4px \9;
260
+ margin-left: -20px;
261
+ }
262
+
263
+ .radio + .radio,
264
+ .checkbox + .checkbox {
265
+ margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing
266
+ }
267
+
268
+ // Radios and checkboxes on same line
269
+ .radio-inline,
270
+ .checkbox-inline {
271
+ position: relative;
272
+ display: inline-block;
273
+ padding-left: 20px;
274
+ margin-bottom: 0;
275
+ font-weight: 400;
276
+ vertical-align: middle;
277
+ cursor: pointer;
278
+
279
+ // These are used directly on <label>s
280
+ &.disabled,
281
+ fieldset[disabled] & {
282
+ cursor: $cursor-disabled;
283
+ }
284
+ }
285
+ .radio-inline + .radio-inline,
286
+ .checkbox-inline + .checkbox-inline {
287
+ margin-top: 0;
288
+ margin-left: 10px; // space out consecutive inline controls
289
+ }
290
+
291
+
292
+ // Static form control text
293
+ //
294
+ // Apply class to a `p` element to make any string of text align with labels in
295
+ // a horizontal form layout.
296
+
297
+ .form-control-static {
298
+ min-height: ($line-height-computed + $font-size-base);
299
+ // Size it appropriately next to real form controls
300
+ padding-top: ($padding-base-vertical + 1);
301
+ padding-bottom: ($padding-base-vertical + 1);
302
+ // Remove default margin from `p`
303
+ margin-bottom: 0;
304
+
305
+ &.input-lg,
306
+ &.input-sm {
307
+ padding-right: 0;
308
+ padding-left: 0;
309
+ }
310
+ }
311
+
312
+
313
+ // Form control sizing
314
+ //
315
+ // Build on `.form-control` with modifier classes to decrease or increase the
316
+ // height and font-size of form controls.
317
+ //
318
+ // The `.form-group-* form-control` variations are sadly duplicated to avoid the
319
+ // issue documented in https://github.com/twbs/bootstrap/issues/15074.
320
+
321
+ @include input-size('.input-sm', $input-height-small, $padding-small-vertical, $padding-small-horizontal, $font-size-small, $line-height-small, $input-border-radius-small);
322
+ .form-group-sm {
323
+ .form-control {
324
+ height: $input-height-small;
325
+ padding: $padding-small-vertical $padding-small-horizontal;
326
+ font-size: $font-size-small;
327
+ line-height: $line-height-small;
328
+ border-radius: $input-border-radius-small;
329
+ }
330
+ select.form-control {
331
+ height: $input-height-small;
332
+ line-height: $input-height-small;
333
+ }
334
+ textarea.form-control,
335
+ select[multiple].form-control {
336
+ height: auto;
337
+ }
338
+ .form-control-static {
339
+ height: $input-height-small;
340
+ min-height: ($line-height-computed + $font-size-small);
341
+ padding: ($padding-small-vertical + 1) $padding-small-horizontal;
342
+ font-size: $font-size-small;
343
+ line-height: $line-height-small;
344
+ }
345
+ }
346
+
347
+ @include input-size('.input-lg', $input-height-large, $padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $input-border-radius-large);
348
+ .form-group-lg {
349
+ .form-control {
350
+ height: $input-height-large;
351
+ padding: $padding-large-vertical $padding-large-horizontal;
352
+ font-size: $font-size-large;
353
+ line-height: $line-height-large;
354
+ border-radius: $input-border-radius-large;
355
+ }
356
+ select.form-control {
357
+ height: $input-height-large;
358
+ line-height: $input-height-large;
359
+ }
360
+ textarea.form-control,
361
+ select[multiple].form-control {
362
+ height: auto;
363
+ }
364
+ .form-control-static {
365
+ height: $input-height-large;
366
+ min-height: ($line-height-computed + $font-size-large);
367
+ padding: ($padding-large-vertical + 1) $padding-large-horizontal;
368
+ font-size: $font-size-large;
369
+ line-height: $line-height-large;
370
+ }
371
+ }
372
+
373
+
374
+ // Form control feedback states
375
+ //
376
+ // Apply contextual and semantic states to individual form controls.
377
+
378
+ .has-feedback {
379
+ // Enable absolute positioning
380
+ position: relative;
381
+
382
+ // Ensure icons don't overlap text
383
+ .form-control {
384
+ padding-right: ($input-height-base * 1.25);
385
+ }
386
+ }
387
+ // Feedback icon (requires .glyphicon classes)
388
+ .form-control-feedback {
389
+ position: absolute;
390
+ top: 0;
391
+ right: 0;
392
+ z-index: 2; // Ensure icon is above input groups
393
+ display: block;
394
+ width: $input-height-base;
395
+ height: $input-height-base;
396
+ line-height: $input-height-base;
397
+ text-align: center;
398
+ pointer-events: none;
399
+ }
400
+ .input-lg + .form-control-feedback,
401
+ .input-group-lg + .form-control-feedback,
402
+ .form-group-lg .form-control + .form-control-feedback {
403
+ width: $input-height-large;
404
+ height: $input-height-large;
405
+ line-height: $input-height-large;
406
+ }
407
+ .input-sm + .form-control-feedback,
408
+ .input-group-sm + .form-control-feedback,
409
+ .form-group-sm .form-control + .form-control-feedback {
410
+ width: $input-height-small;
411
+ height: $input-height-small;
412
+ line-height: $input-height-small;
413
+ }
414
+
415
+ // Feedback states
416
+ .has-success {
417
+ @include form-control-validation($state-success-text, $state-success-text, $state-success-bg);
418
+ }
419
+ .has-warning {
420
+ @include form-control-validation($state-warning-text, $state-warning-text, $state-warning-bg);
421
+ }
422
+ .has-error {
423
+ @include form-control-validation($state-danger-text, $state-danger-text, $state-danger-bg);
424
+ }
425
+
426
+ // Reposition feedback icon if input has visible label above
427
+ .has-feedback label {
428
+
429
+ & ~ .form-control-feedback {
430
+ top: ($line-height-computed + 5); // Height of the `label` and its margin
431
+ }
432
+ &.sr-only ~ .form-control-feedback {
433
+ top: 0;
434
+ }
435
+ }
436
+
437
+
438
+ // Help text
439
+ //
440
+ // Apply to any element you wish to create light text for placement immediately
441
+ // below a form control. Use for general help, formatting, or instructional text.
442
+
443
+ .help-block {
444
+ display: block; // account for any element using help-block
445
+ margin-top: 5px;
446
+ margin-bottom: 10px;
447
+ color: lighten($text-color, 25%); // lighten the text some for contrast
448
+ }
449
+
450
+
451
+ // Inline forms
452
+ //
453
+ // Make forms appear inline(-block) by adding the `.form-inline` class. Inline
454
+ // forms begin stacked on extra small (mobile) devices and then go inline when
455
+ // viewports reach <768px.
456
+ //
457
+ // Requires wrapping inputs and labels with `.form-group` for proper display of
458
+ // default HTML form controls and our custom form controls (e.g., input groups).
459
+ //
460
+ // Heads up! This is mixin-ed into `.navbar-form` in navbars.less.
461
+
462
+ // [converter] extracted from `.form-inline` for libsass compatibility
463
+ @mixin form-inline {
464
+
465
+ // Kick in the inline
466
+ @media (min-width: $screen-sm-min) {
467
+ // Inline-block all the things for "inline"
468
+ .form-group {
469
+ display: inline-block;
470
+ margin-bottom: 0;
471
+ vertical-align: middle;
472
+ }
473
+
474
+ // In navbar-form, allow folks to *not* use `.form-group`
475
+ .form-control {
476
+ display: inline-block;
477
+ width: auto; // Prevent labels from stacking above inputs in `.form-group`
478
+ vertical-align: middle;
479
+ }
480
+
481
+ // Make static controls behave like regular ones
482
+ .form-control-static {
483
+ display: inline-block;
484
+ }
485
+
486
+ .input-group {
487
+ display: inline-table;
488
+ vertical-align: middle;
489
+
490
+ .input-group-addon,
491
+ .input-group-btn,
492
+ .form-control {
493
+ width: auto;
494
+ }
495
+ }
496
+
497
+ // Input groups need that 100% width though
498
+ .input-group > .form-control {
499
+ width: 100%;
500
+ }
501
+
502
+ .control-label {
503
+ margin-bottom: 0;
504
+ vertical-align: middle;
505
+ }
506
+
507
+ // Remove default margin on radios/checkboxes that were used for stacking, and
508
+ // then undo the floating of radios and checkboxes to match.
509
+ .radio,
510
+ .checkbox {
511
+ display: inline-block;
512
+ margin-top: 0;
513
+ margin-bottom: 0;
514
+ vertical-align: middle;
515
+
516
+ label {
517
+ padding-left: 0;
518
+ }
519
+ }
520
+ .radio input[type="radio"],
521
+ .checkbox input[type="checkbox"] {
522
+ position: relative;
523
+ margin-left: 0;
524
+ }
525
+
526
+ // Re-override the feedback icon.
527
+ .has-feedback .form-control-feedback {
528
+ top: 0;
529
+ }
530
+ }
531
+ }
532
+ // [converter] extracted as `@mixin form-inline` for libsass compatibility
533
+ .form-inline {
534
+ @include form-inline;
535
+ }
536
+
537
+
538
+
539
+ // Horizontal forms
540
+ //
541
+ // Horizontal forms are built on grid classes and allow you to create forms with
542
+ // labels on the left and inputs on the right.
543
+
544
+ .form-horizontal {
545
+
546
+ // Consistent vertical alignment of radios and checkboxes
547
+ //
548
+ // Labels also get some reset styles, but that is scoped to a media query below.
549
+ .radio,
550
+ .checkbox,
551
+ .radio-inline,
552
+ .checkbox-inline {
553
+ padding-top: ($padding-base-vertical + 1); // Default padding plus a border
554
+ margin-top: 0;
555
+ margin-bottom: 0;
556
+ }
557
+ // Account for padding we're adding to ensure the alignment and of help text
558
+ // and other content below items
559
+ .radio,
560
+ .checkbox {
561
+ min-height: ($line-height-computed + ($padding-base-vertical + 1));
562
+ }
563
+
564
+ // Make form groups behave like rows
565
+ .form-group {
566
+ @include make-row;
567
+ }
568
+
569
+ // Reset spacing and right align labels, but scope to media queries so that
570
+ // labels on narrow viewports stack the same as a default form example.
571
+ @media (min-width: $screen-sm-min) {
572
+ .control-label {
573
+ padding-top: ($padding-base-vertical + 1); // Default padding plus a border
574
+ margin-bottom: 0;
575
+ text-align: right;
576
+ }
577
+ }
578
+
579
+ // Validation states
580
+ //
581
+ // Reposition the icon because it's now within a grid column and columns have
582
+ // `position: relative;` on them. Also accounts for the grid gutter padding.
583
+ .has-feedback .form-control-feedback {
584
+ right: floor(($grid-gutter-width / 2));
585
+ }
586
+
587
+ // Form group sizes
588
+ //
589
+ // Quick utility class for applying `.input-lg` and `.input-sm` styles to the
590
+ // inputs and labels within a `.form-group`.
591
+ .form-group-lg {
592
+ @media (min-width: $screen-sm-min) {
593
+ .control-label {
594
+ padding-top: ($padding-large-vertical + 1);
595
+ font-size: $font-size-large;
596
+ }
597
+ }
598
+ }
599
+ .form-group-sm {
600
+ @media (min-width: $screen-sm-min) {
601
+ .control-label {
602
+ padding-top: ($padding-small-vertical + 1);
603
+ font-size: $font-size-small;
604
+ }
605
+ }
606
+ }
607
+ }