twitter-bootstrap-rails 2.2.3 → 3.2.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of twitter-bootstrap-rails might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/README.md +460 -185
- data/Rakefile +7 -1
- data/app/assets/fonts/fontawesome-webfont.eot +0 -0
- data/app/assets/fonts/fontawesome-webfont.svg +640 -0
- data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/app/assets/fonts/fontawesome-webfont.woff +0 -0
- data/app/assets/fonts/glyphicons-halflings-regular.eot +0 -0
- data/app/assets/fonts/glyphicons-halflings-regular.svg +229 -0
- data/app/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/app/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/app/assets/javascripts/twitter/bootstrap.js +12 -0
- data/app/assets/javascripts/twitter/bootstrap/affix.js +142 -0
- data/app/assets/javascripts/twitter/bootstrap/alert.js +92 -0
- data/app/assets/javascripts/twitter/bootstrap/button.js +110 -0
- data/app/assets/javascripts/twitter/bootstrap/carousel.js +223 -0
- data/app/assets/javascripts/twitter/bootstrap/collapse.js +170 -0
- data/app/assets/javascripts/twitter/bootstrap/dropdown.js +151 -0
- data/app/assets/javascripts/twitter/bootstrap/modal.js +280 -0
- data/app/assets/javascripts/twitter/bootstrap/popover.js +113 -0
- data/app/assets/javascripts/twitter/bootstrap/scrollspy.js +170 -0
- data/app/assets/javascripts/twitter/bootstrap/tab.js +128 -0
- data/app/assets/javascripts/twitter/bootstrap/tooltip.js +457 -0
- data/app/assets/javascripts/twitter/bootstrap/transition.js +59 -0
- data/{vendor → app}/assets/javascripts/twitter/bootstrap_ujs.js +0 -0
- data/app/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +1 -0
- data/app/assets/stylesheets/twitter-bootstrap-static/fontawesome.css.erb +2026 -0
- data/app/assets/stylesheets/twitter-bootstrap-static/sprites.css.erb +1 -0
- data/app/helpers/badge_label_helper.rb +16 -0
- data/app/helpers/bootstrap_flash_helper.rb +20 -6
- data/app/helpers/form_errors_helper.rb +22 -0
- data/app/helpers/glyph_helper.rb +13 -5
- data/app/helpers/modal_helper.rb +37 -20
- data/app/helpers/navbar_helper.rb +209 -0
- data/app/helpers/twitter_breadcrumbs_helper.rb +11 -2
- data/app/views/twitter-bootstrap/_breadcrumbs.html.erb +9 -9
- data/lib/generators/bootstrap/install/install_generator.rb +13 -8
- data/lib/generators/bootstrap/install/templates/bootstrap.coffee +2 -3
- data/lib/generators/bootstrap/install/templates/bootstrap.js +2 -3
- data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +14 -13
- data/lib/generators/bootstrap/install/templates/en.bootstrap.yml +11 -5
- data/lib/generators/bootstrap/layout/layout_generator.rb +1 -4
- data/lib/generators/bootstrap/layout/templates/layout.html.erb +34 -58
- data/lib/generators/bootstrap/layout/templates/layout.html.haml +25 -44
- data/lib/generators/bootstrap/layout/templates/layout.html.slim +20 -39
- data/lib/generators/bootstrap/partial/templates/_login.html.erb +2 -3
- data/lib/generators/bootstrap/themed/templates/_form.html.erb +30 -10
- data/lib/generators/bootstrap/themed/templates/_form.html.haml +10 -8
- data/lib/generators/bootstrap/themed/templates/_form.html.slim +11 -9
- data/lib/generators/bootstrap/themed/templates/edit.html.erb +1 -2
- data/lib/generators/bootstrap/themed/templates/edit.html.haml +1 -1
- data/lib/generators/bootstrap/themed/templates/edit.html.slim +2 -2
- data/lib/generators/bootstrap/themed/templates/index.html.erb +3 -3
- data/lib/generators/bootstrap/themed/templates/index.html.haml +3 -3
- data/lib/generators/bootstrap/themed/templates/index.html.slim +5 -6
- data/lib/generators/bootstrap/themed/templates/new.html.erb +1 -2
- data/lib/generators/bootstrap/themed/templates/new.html.haml +1 -1
- data/lib/generators/bootstrap/themed/templates/new.html.slim +2 -2
- data/lib/generators/bootstrap/themed/templates/show.html.erb +6 -8
- data/lib/generators/bootstrap/themed/templates/show.html.haml +5 -5
- data/lib/generators/bootstrap/themed/templates/show.html.slim +7 -8
- data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.erb +5 -5
- data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.haml +3 -3
- data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.slim +4 -4
- data/lib/generators/bootstrap/themed/themed_generator.rb +4 -4
- data/lib/twitter-bootstrap-rails.rb +4 -4
- data/lib/twitter/bootstrap/rails/breadcrumbs.rb +69 -0
- data/lib/twitter/bootstrap/rails/engine.rb +17 -7
- data/lib/twitter/bootstrap/rails/version.rb +1 -1
- data/spec/lib/breadcrumbs_spec.rb +99 -0
- data/spec/lib/twitter_bootstrap_rails/badge_label_helper_spec.rb +30 -0
- data/spec/lib/twitter_bootstrap_rails/bootstrap_flash_helper_spec.rb +128 -0
- data/spec/lib/twitter_bootstrap_rails/form_errors_helper_spec.rb +148 -0
- data/spec/lib/twitter_bootstrap_rails/glyph_helper_spec.rb +24 -0
- data/spec/lib/twitter_bootstrap_rails/modal_helper_spec.rb +62 -0
- data/spec/lib/twitter_bootstrap_rails/navbar_helper_spec.rb +396 -0
- data/spec/lib/twitter_bootstrap_rails/uri_state_spec.rb +49 -0
- data/spec/spec_helper.rb +21 -0
- data/vendor/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +5990 -195
- data/vendor/static-source/bootstrap.less +0 -1
- data/vendor/static-source/fontawesome.less +7 -6
- data/vendor/static-source/sprites.less +3 -3
- data/vendor/toolkit/fontawesome/bordered-pulled.less +16 -0
- data/vendor/toolkit/fontawesome/core.less +11 -0
- data/vendor/toolkit/fontawesome/fixed-width.less +6 -0
- data/vendor/toolkit/fontawesome/font-awesome.less +17 -0
- data/vendor/toolkit/fontawesome/icons.less +552 -0
- data/vendor/toolkit/fontawesome/larger.less +13 -0
- data/vendor/toolkit/fontawesome/list.less +19 -0
- data/vendor/toolkit/fontawesome/mixins.less +25 -0
- data/vendor/toolkit/fontawesome/path.less +14 -0
- data/vendor/toolkit/fontawesome/rotated-flipped.less +20 -0
- data/vendor/toolkit/fontawesome/spinning.less +29 -0
- data/vendor/toolkit/fontawesome/stacked.less +20 -0
- data/vendor/toolkit/fontawesome/variables.less +561 -0
- data/vendor/toolkit/twitter/bootstrap/alerts.less +47 -58
- data/vendor/toolkit/twitter/bootstrap/badges.less +55 -0
- data/vendor/toolkit/twitter/bootstrap/bootstrap.less +26 -39
- data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +11 -9
- data/vendor/toolkit/twitter/bootstrap/button-groups.less +168 -152
- data/vendor/toolkit/twitter/bootstrap/buttons.less +101 -170
- data/vendor/toolkit/twitter/bootstrap/carousel.less +150 -65
- data/vendor/toolkit/twitter/bootstrap/close.less +20 -19
- data/vendor/toolkit/twitter/bootstrap/code.less +38 -30
- data/vendor/toolkit/twitter/bootstrap/component-animations.less +12 -3
- data/vendor/toolkit/twitter/bootstrap/dropdowns.less +124 -146
- data/vendor/toolkit/twitter/bootstrap/forms.less +401 -547
- data/vendor/toolkit/twitter/bootstrap/glyphicons.less +234 -0
- data/vendor/toolkit/twitter/bootstrap/grid.less +74 -11
- data/vendor/toolkit/twitter/bootstrap/input-groups.less +166 -0
- data/vendor/toolkit/twitter/bootstrap/jumbotron.less +48 -0
- data/vendor/toolkit/twitter/bootstrap/labels.less +64 -0
- data/vendor/toolkit/twitter/bootstrap/list-group.less +132 -0
- data/vendor/toolkit/twitter/bootstrap/media.less +8 -7
- data/vendor/toolkit/twitter/bootstrap/mixins.less +36 -699
- data/vendor/toolkit/twitter/bootstrap/mixins/alerts.less +14 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/background-variant.less +8 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/border-radius.less +18 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/buttons.less +52 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/center-block.less +7 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/clearfix.less +22 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/forms.less +85 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/gradients.less +59 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/grid-framework.less +91 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/grid.less +122 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/hide-text.less +21 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/image.less +33 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/labels.less +12 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/list-group.less +29 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/nav-divider.less +10 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/nav-vertical-align.less +9 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/opacity.less +8 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/pagination.less +23 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/panels.less +24 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/progress-bar.less +10 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/reset-filter.less +8 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/resize.less +6 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/responsive-visibility.less +15 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/size.less +10 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/tab-focus.less +9 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/table-row.less +28 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/text-emphasis.less +8 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/text-overflow.less +8 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/vendor-prefixes.less +224 -0
- data/vendor/toolkit/twitter/bootstrap/modals.less +109 -54
- data/vendor/toolkit/twitter/bootstrap/navbar.less +542 -384
- data/vendor/toolkit/twitter/bootstrap/navs.less +192 -359
- data/vendor/toolkit/twitter/bootstrap/normalize.less +425 -0
- data/vendor/toolkit/twitter/bootstrap/pager.less +46 -34
- data/vendor/toolkit/twitter/bootstrap/pagination.less +70 -105
- data/vendor/toolkit/twitter/bootstrap/panels.less +248 -0
- data/vendor/toolkit/twitter/bootstrap/popovers.less +61 -61
- data/vendor/toolkit/twitter/bootstrap/print.less +101 -0
- data/vendor/toolkit/twitter/bootstrap/progress-bars.less +51 -73
- data/vendor/toolkit/twitter/bootstrap/responsive-embed.less +34 -0
- data/vendor/toolkit/twitter/bootstrap/responsive-utilities.less +177 -42
- data/vendor/toolkit/twitter/bootstrap/scaffolding.less +120 -23
- data/vendor/toolkit/twitter/bootstrap/tables.less +171 -182
- data/vendor/toolkit/twitter/bootstrap/theme.less +260 -0
- data/vendor/toolkit/twitter/bootstrap/thumbnails.less +26 -43
- data/vendor/toolkit/twitter/bootstrap/tooltip.less +49 -24
- data/vendor/toolkit/twitter/bootstrap/type.less +208 -147
- data/vendor/toolkit/twitter/bootstrap/utilities.less +33 -7
- data/vendor/toolkit/twitter/bootstrap/variables.less +761 -215
- data/vendor/toolkit/twitter/bootstrap/wells.less +7 -7
- metadata +199 -92
- data/lib/generators/bootstrap/partial/templates/_navbar.html.erb +0 -13
- data/lib/twitter/bootstrap/rails/twitter-bootstrap-breadcrumbs.rb +0 -42
- data/test/lib/breadcrumbs_test.rb +0 -75
- data/test/test_helper.rb +0 -8
- data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
- data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
- data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
- data/vendor/assets/javascripts/twitter/bootstrap.js +0 -13
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-affix.js +0 -117
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +0 -99
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-button.js +0 -105
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +0 -207
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +0 -167
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +0 -165
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +0 -247
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +0 -114
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +0 -162
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +0 -144
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +0 -353
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +0 -60
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +0 -335
- data/vendor/assets/stylesheets/twitter-bootstrap-static/fontawesome.css.erb +0 -531
- data/vendor/assets/stylesheets/twitter-bootstrap-static/sprites.css.erb +0 -146
- data/vendor/toolkit/fontawesome-ie7.less +0 -350
- data/vendor/toolkit/fontawesome.less +0 -532
- data/vendor/toolkit/twitter/bootstrap/accordion.less +0 -34
- data/vendor/toolkit/twitter/bootstrap/hero-unit.less +0 -25
- data/vendor/toolkit/twitter/bootstrap/labels-badges.less +0 -84
- data/vendor/toolkit/twitter/bootstrap/layouts.less +0 -16
- data/vendor/toolkit/twitter/bootstrap/reset.less +0 -216
- data/vendor/toolkit/twitter/bootstrap/responsive-1200px-min.less +0 -28
- data/vendor/toolkit/twitter/bootstrap/responsive-767px-max.less +0 -193
- data/vendor/toolkit/twitter/bootstrap/responsive-768px-979px.less +0 -19
- data/vendor/toolkit/twitter/bootstrap/responsive-navbar.less +0 -189
- data/vendor/toolkit/twitter/bootstrap/responsive.less +0 -48
- data/vendor/toolkit/twitter/bootstrap/sprites.less +0 -197
@@ -5,28 +5,29 @@
|
|
5
5
|
|
6
6
|
.close {
|
7
7
|
float: right;
|
8
|
-
font-size:
|
9
|
-
font-weight:
|
10
|
-
line-height:
|
11
|
-
color: @
|
12
|
-
text-shadow:
|
13
|
-
.opacity(
|
8
|
+
font-size: (@font-size-base * 1.5);
|
9
|
+
font-weight: @close-font-weight;
|
10
|
+
line-height: 1;
|
11
|
+
color: @close-color;
|
12
|
+
text-shadow: @close-text-shadow;
|
13
|
+
.opacity(.2);
|
14
|
+
|
14
15
|
&:hover,
|
15
16
|
&:focus {
|
16
|
-
color: @
|
17
|
+
color: @close-color;
|
17
18
|
text-decoration: none;
|
18
19
|
cursor: pointer;
|
19
|
-
.opacity(
|
20
|
+
.opacity(.5);
|
20
21
|
}
|
21
|
-
}
|
22
22
|
|
23
|
-
// Additional properties for button version
|
24
|
-
// iOS requires the button element instead of an anchor tag.
|
25
|
-
// If you want the anchor version, it requires `href="#"`.
|
26
|
-
button
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
}
|
23
|
+
// Additional properties for button version
|
24
|
+
// iOS requires the button element instead of an anchor tag.
|
25
|
+
// If you want the anchor version, it requires `href="#"`.
|
26
|
+
button& {
|
27
|
+
padding: 0;
|
28
|
+
cursor: pointer;
|
29
|
+
background: transparent;
|
30
|
+
border: 0;
|
31
|
+
-webkit-appearance: none;
|
32
|
+
}
|
33
|
+
}
|
@@ -1,61 +1,69 @@
|
|
1
1
|
//
|
2
|
-
// Code (inline and
|
2
|
+
// Code (inline and block)
|
3
3
|
// --------------------------------------------------
|
4
4
|
|
5
5
|
|
6
6
|
// Inline and block code styles
|
7
7
|
code,
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
font-
|
12
|
-
color: @grayDark;
|
13
|
-
.border-radius(3px);
|
8
|
+
kbd,
|
9
|
+
pre,
|
10
|
+
samp {
|
11
|
+
font-family: @font-family-monospace;
|
14
12
|
}
|
15
13
|
|
16
14
|
// Inline code
|
17
15
|
code {
|
18
16
|
padding: 2px 4px;
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
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: bold;
|
36
|
+
box-shadow: none;
|
37
|
+
}
|
23
38
|
}
|
24
39
|
|
25
40
|
// Blocks of code
|
26
41
|
pre {
|
27
42
|
display: block;
|
28
|
-
padding: (@
|
29
|
-
margin: 0 0 @
|
30
|
-
font-size: @
|
31
|
-
line-height: @
|
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;
|
32
47
|
word-break: break-all;
|
33
48
|
word-wrap: break-word;
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
border:
|
38
|
-
border: 1px solid rgba(0,0,0,.15);
|
39
|
-
.border-radius(@baseBorderRadius);
|
40
|
-
|
41
|
-
// Make prettyprint styles more spaced out for readability
|
42
|
-
&.prettyprint {
|
43
|
-
margin-bottom: @baseLineHeight;
|
44
|
-
}
|
49
|
+
color: @pre-color;
|
50
|
+
background-color: @pre-bg;
|
51
|
+
border: 1px solid @pre-border-color;
|
52
|
+
border-radius: @border-radius-base;
|
45
53
|
|
46
54
|
// Account for some code outputs that place code tags in pre tags
|
47
55
|
code {
|
48
56
|
padding: 0;
|
57
|
+
font-size: inherit;
|
49
58
|
color: inherit;
|
50
|
-
white-space: pre;
|
51
59
|
white-space: pre-wrap;
|
52
60
|
background-color: transparent;
|
53
|
-
border: 0;
|
61
|
+
border-radius: 0;
|
54
62
|
}
|
55
63
|
}
|
56
64
|
|
57
65
|
// Enable scrollable blocks of code
|
58
66
|
.pre-scrollable {
|
59
|
-
max-height:
|
67
|
+
max-height: @pre-scrollable-max-height;
|
60
68
|
overflow-y: scroll;
|
61
|
-
}
|
69
|
+
}
|
@@ -2,6 +2,10 @@
|
|
2
2
|
// Component animations
|
3
3
|
// --------------------------------------------------
|
4
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.
|
5
9
|
|
6
10
|
.fade {
|
7
11
|
opacity: 0;
|
@@ -12,11 +16,16 @@
|
|
12
16
|
}
|
13
17
|
|
14
18
|
.collapse {
|
19
|
+
display: none;
|
20
|
+
|
21
|
+
&.in { display: block; }
|
22
|
+
tr&.in { display: table-row; }
|
23
|
+
tbody&.in { display: table-row-group; }
|
24
|
+
}
|
25
|
+
|
26
|
+
.collapsing {
|
15
27
|
position: relative;
|
16
28
|
height: 0;
|
17
29
|
overflow: hidden;
|
18
30
|
.transition(height .35s ease);
|
19
|
-
&.in {
|
20
|
-
height: auto;
|
21
|
-
}
|
22
31
|
}
|
@@ -3,64 +3,52 @@
|
|
3
3
|
// --------------------------------------------------
|
4
4
|
|
5
5
|
|
6
|
-
// Use the .menu class on any <li> element within the topbar or ul.tabs and you'll get some superfancy dropdowns
|
7
|
-
.dropup,
|
8
|
-
.dropdown {
|
9
|
-
position: relative;
|
10
|
-
}
|
11
|
-
.dropdown-toggle {
|
12
|
-
// The caret makes the toggle a bit too tall in IE7
|
13
|
-
*margin-bottom: -3px;
|
14
|
-
}
|
15
|
-
.dropdown-toggle:active,
|
16
|
-
.open .dropdown-toggle {
|
17
|
-
outline: 0;
|
18
|
-
}
|
19
|
-
|
20
6
|
// Dropdown arrow/caret
|
21
|
-
// --------------------
|
22
7
|
.caret {
|
23
8
|
display: inline-block;
|
24
9
|
width: 0;
|
25
10
|
height: 0;
|
26
|
-
|
27
|
-
|
28
|
-
border-
|
29
|
-
border-
|
30
|
-
|
11
|
+
margin-left: 2px;
|
12
|
+
vertical-align: middle;
|
13
|
+
border-top: @caret-width-base solid;
|
14
|
+
border-right: @caret-width-base solid transparent;
|
15
|
+
border-left: @caret-width-base solid transparent;
|
31
16
|
}
|
32
17
|
|
33
|
-
//
|
34
|
-
.dropdown
|
35
|
-
|
36
|
-
|
18
|
+
// The dropdown wrapper (div)
|
19
|
+
.dropdown {
|
20
|
+
position: relative;
|
21
|
+
}
|
22
|
+
|
23
|
+
// Prevent the focus on the dropdown toggle when closing dropdowns
|
24
|
+
.dropdown-toggle:focus {
|
25
|
+
outline: 0;
|
37
26
|
}
|
38
27
|
|
39
28
|
// The dropdown menu (ul)
|
40
|
-
// ----------------------
|
41
29
|
.dropdown-menu {
|
42
30
|
position: absolute;
|
43
31
|
top: 100%;
|
44
32
|
left: 0;
|
45
|
-
z-index: @
|
33
|
+
z-index: @zindex-dropdown;
|
46
34
|
display: none; // none by default, but block on "open" of the menu
|
47
35
|
float: left;
|
48
36
|
min-width: 160px;
|
49
37
|
padding: 5px 0;
|
50
38
|
margin: 2px 0 0; // override default ul
|
51
39
|
list-style: none;
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
.box-shadow(0
|
59
|
-
|
60
|
-
-moz-background-clip: padding;
|
61
|
-
background-clip: padding-box;
|
40
|
+
font-size: @font-size-base;
|
41
|
+
text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
|
42
|
+
background-color: @dropdown-bg;
|
43
|
+
border: 1px solid @dropdown-fallback-border; // IE8 fallback
|
44
|
+
border: 1px solid @dropdown-border;
|
45
|
+
border-radius: @border-radius-base;
|
46
|
+
.box-shadow(0 6px 12px rgba(0,0,0,.175));
|
47
|
+
background-clip: padding-box;
|
62
48
|
|
63
49
|
// Aligns the dropdown menu to right
|
50
|
+
//
|
51
|
+
// Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`
|
64
52
|
&.pull-right {
|
65
53
|
right: 0;
|
66
54
|
left: auto;
|
@@ -68,7 +56,7 @@
|
|
68
56
|
|
69
57
|
// Dividers (basically an hr) within the dropdown
|
70
58
|
.divider {
|
71
|
-
.nav-divider(@
|
59
|
+
.nav-divider(@dropdown-divider-bg);
|
72
60
|
}
|
73
61
|
|
74
62
|
// Links within the dropdown menu
|
@@ -77,81 +65,126 @@
|
|
77
65
|
padding: 3px 20px;
|
78
66
|
clear: both;
|
79
67
|
font-weight: normal;
|
80
|
-
line-height: @
|
81
|
-
color: @
|
82
|
-
white-space: nowrap;
|
68
|
+
line-height: @line-height-base;
|
69
|
+
color: @dropdown-link-color;
|
70
|
+
white-space: nowrap; // prevent links from randomly breaking onto new lines
|
83
71
|
}
|
84
72
|
}
|
85
73
|
|
86
74
|
// Hover/Focus state
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
#gradient > .vertical(@dropdownLinkBackgroundHover, darken(@dropdownLinkBackgroundHover, 5%));
|
75
|
+
.dropdown-menu > li > a {
|
76
|
+
&:hover,
|
77
|
+
&:focus {
|
78
|
+
text-decoration: none;
|
79
|
+
color: @dropdown-link-hover-color;
|
80
|
+
background-color: @dropdown-link-hover-bg;
|
81
|
+
}
|
95
82
|
}
|
96
83
|
|
97
84
|
// Active state
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
85
|
+
.dropdown-menu > .active > a {
|
86
|
+
&,
|
87
|
+
&:hover,
|
88
|
+
&:focus {
|
89
|
+
color: @dropdown-link-active-color;
|
90
|
+
text-decoration: none;
|
91
|
+
outline: 0;
|
92
|
+
background-color: @dropdown-link-active-bg;
|
93
|
+
}
|
106
94
|
}
|
107
95
|
|
108
96
|
// Disabled state
|
109
|
-
//
|
97
|
+
//
|
110
98
|
// Gray out text and ensure the hover/focus state remains gray
|
111
|
-
|
112
|
-
.dropdown-menu > .disabled > a
|
113
|
-
|
114
|
-
|
99
|
+
|
100
|
+
.dropdown-menu > .disabled > a {
|
101
|
+
&,
|
102
|
+
&:hover,
|
103
|
+
&:focus {
|
104
|
+
color: @dropdown-link-disabled-color;
|
105
|
+
}
|
115
106
|
}
|
116
107
|
// Nuke hover/focus effects
|
117
|
-
.dropdown-menu > .disabled > a
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
108
|
+
.dropdown-menu > .disabled > a {
|
109
|
+
&:hover,
|
110
|
+
&:focus {
|
111
|
+
text-decoration: none;
|
112
|
+
background-color: transparent;
|
113
|
+
background-image: none; // Remove CSS gradient
|
114
|
+
.reset-filter();
|
115
|
+
cursor: not-allowed;
|
116
|
+
}
|
124
117
|
}
|
125
118
|
|
126
119
|
// Open state for the dropdown
|
127
|
-
// ---------------------------
|
128
120
|
.open {
|
129
|
-
//
|
130
|
-
|
131
|
-
*z-index: @zindexDropdown;
|
132
|
-
|
133
|
-
& > .dropdown-menu {
|
121
|
+
// Show the menu
|
122
|
+
> .dropdown-menu {
|
134
123
|
display: block;
|
135
124
|
}
|
125
|
+
|
126
|
+
// Remove the outline when :focus is triggered
|
127
|
+
> a {
|
128
|
+
outline: 0;
|
129
|
+
}
|
130
|
+
}
|
131
|
+
|
132
|
+
// Menu positioning
|
133
|
+
//
|
134
|
+
// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown
|
135
|
+
// menu with the parent.
|
136
|
+
.dropdown-menu-right {
|
137
|
+
left: auto; // Reset the default from `.dropdown-menu`
|
138
|
+
right: 0;
|
139
|
+
}
|
140
|
+
// With v3, we enabled auto-flipping if you have a dropdown within a right
|
141
|
+
// aligned nav component. To enable the undoing of that, we provide an override
|
142
|
+
// to restore the default dropdown menu alignment.
|
143
|
+
//
|
144
|
+
// This is only for left-aligning a dropdown menu within a `.navbar-right` or
|
145
|
+
// `.pull-right` nav component.
|
146
|
+
.dropdown-menu-left {
|
147
|
+
left: 0;
|
148
|
+
right: auto;
|
149
|
+
}
|
150
|
+
|
151
|
+
// Dropdown section headers
|
152
|
+
.dropdown-header {
|
153
|
+
display: block;
|
154
|
+
padding: 3px 20px;
|
155
|
+
font-size: @font-size-small;
|
156
|
+
line-height: @line-height-base;
|
157
|
+
color: @dropdown-header-color;
|
158
|
+
white-space: nowrap; // as with > li > a
|
159
|
+
}
|
160
|
+
|
161
|
+
// Backdrop to catch body clicks on mobile, etc.
|
162
|
+
.dropdown-backdrop {
|
163
|
+
position: fixed;
|
164
|
+
left: 0;
|
165
|
+
right: 0;
|
166
|
+
bottom: 0;
|
167
|
+
top: 0;
|
168
|
+
z-index: (@zindex-dropdown - 10);
|
136
169
|
}
|
137
170
|
|
138
171
|
// Right aligned dropdowns
|
139
|
-
// ---------------------------
|
140
172
|
.pull-right > .dropdown-menu {
|
141
173
|
right: 0;
|
142
174
|
left: auto;
|
143
175
|
}
|
144
176
|
|
145
177
|
// Allow for dropdowns to go bottom up (aka, dropup-menu)
|
146
|
-
//
|
178
|
+
//
|
147
179
|
// Just add .dropup after the standard .dropdown class and you're set, bro.
|
148
180
|
// TODO: abstract this so that the navbar fixed styles are not placed here?
|
181
|
+
|
149
182
|
.dropup,
|
150
183
|
.navbar-fixed-bottom .dropdown {
|
151
184
|
// Reverse the caret
|
152
185
|
.caret {
|
153
186
|
border-top: 0;
|
154
|
-
border-bottom:
|
187
|
+
border-bottom: @caret-width-base solid;
|
155
188
|
content: "";
|
156
189
|
}
|
157
190
|
// Different positioning for bottom up menu
|
@@ -162,76 +195,21 @@
|
|
162
195
|
}
|
163
196
|
}
|
164
197
|
|
165
|
-
// Sub menus
|
166
|
-
// ---------------------------
|
167
|
-
.dropdown-submenu {
|
168
|
-
position: relative;
|
169
|
-
}
|
170
|
-
// Default dropdowns
|
171
|
-
.dropdown-submenu > .dropdown-menu {
|
172
|
-
top: 0;
|
173
|
-
left: 100%;
|
174
|
-
margin-top: -6px;
|
175
|
-
margin-left: -1px;
|
176
|
-
.border-radius(0 6px 6px 6px);
|
177
|
-
}
|
178
|
-
.dropdown-submenu:hover > .dropdown-menu {
|
179
|
-
display: block;
|
180
|
-
}
|
181
|
-
|
182
|
-
// Dropups
|
183
|
-
.dropup .dropdown-submenu > .dropdown-menu {
|
184
|
-
top: auto;
|
185
|
-
bottom: 0;
|
186
|
-
margin-top: 0;
|
187
|
-
margin-bottom: -2px;
|
188
|
-
.border-radius(5px 5px 5px 0);
|
189
|
-
}
|
190
|
-
|
191
|
-
// Caret to indicate there is a submenu
|
192
|
-
.dropdown-submenu > a:after {
|
193
|
-
display: block;
|
194
|
-
content: " ";
|
195
|
-
float: right;
|
196
|
-
width: 0;
|
197
|
-
height: 0;
|
198
|
-
border-color: transparent;
|
199
|
-
border-style: solid;
|
200
|
-
border-width: 5px 0 5px 5px;
|
201
|
-
border-left-color: darken(@dropdownBackground, 20%);
|
202
|
-
margin-top: 5px;
|
203
|
-
margin-right: -10px;
|
204
|
-
}
|
205
|
-
.dropdown-submenu:hover > a:after {
|
206
|
-
border-left-color: @dropdownLinkColorHover;
|
207
|
-
}
|
208
|
-
|
209
|
-
// Left aligned submenus
|
210
|
-
.dropdown-submenu.pull-left {
|
211
|
-
// Undo the float
|
212
|
-
// Yes, this is awkward since .pull-left adds a float, but it sticks to our conventions elsewhere.
|
213
|
-
float: none;
|
214
198
|
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
199
|
+
// Component alignment
|
200
|
+
//
|
201
|
+
// Reiterate per navbar.less and the modified component alignment there.
|
202
|
+
|
203
|
+
@media (min-width: @grid-float-breakpoint) {
|
204
|
+
.navbar-right {
|
205
|
+
.dropdown-menu {
|
206
|
+
.dropdown-menu-right();
|
207
|
+
}
|
208
|
+
// Necessary for overrides of the default right aligned menu.
|
209
|
+
// Will remove come v4 in all likelihood.
|
210
|
+
.dropdown-menu-left {
|
211
|
+
.dropdown-menu-left();
|
212
|
+
}
|
220
213
|
}
|
221
214
|
}
|
222
215
|
|
223
|
-
// Tweak nav headers
|
224
|
-
// -----------------
|
225
|
-
// Increase padding from 15px to 20px on sides
|
226
|
-
.dropdown .dropdown-menu .nav-header {
|
227
|
-
padding-left: 20px;
|
228
|
-
padding-right: 20px;
|
229
|
-
}
|
230
|
-
|
231
|
-
// Typeahead
|
232
|
-
// ---------
|
233
|
-
.typeahead {
|
234
|
-
z-index: 1051;
|
235
|
-
margin-top: 2px; // give it some space to breathe
|
236
|
-
.border-radius(@baseBorderRadius);
|
237
|
-
}
|