twitter-bootstrap-rails 2.2.8 → 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 +160 -228
- data/Rakefile +4 -6
- data/app/assets/fonts/fontawesome-webfont.eot +0 -0
- data/app/assets/fonts/fontawesome-webfont.svg +279 -38
- 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/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/app/assets/javascripts/twitter/bootstrap.js +12 -13
- data/app/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +1 -890
- data/app/assets/stylesheets/twitter-bootstrap-static/fontawesome.css.erb +2026 -787
- data/app/assets/stylesheets/twitter-bootstrap-static/sprites.css.erb +1 -146
- data/app/helpers/bootstrap_flash_helper.rb +14 -7
- data/app/helpers/form_errors_helper.rb +22 -0
- data/app/helpers/glyph_helper.rb +8 -5
- data/app/helpers/modal_helper.rb +26 -22
- data/app/helpers/navbar_helper.rb +47 -32
- data/app/helpers/twitter_breadcrumbs_helper.rb +6 -2
- data/app/views/twitter-bootstrap/_breadcrumbs.html.erb +8 -8
- data/lib/generators/bootstrap/install/install_generator.rb +3 -2
- data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +13 -11
- data/lib/generators/bootstrap/install/templates/en.bootstrap.yml +5 -0
- data/lib/generators/bootstrap/layout/layout_generator.rb +1 -4
- data/lib/generators/bootstrap/layout/templates/layout.html.erb +27 -48
- data/lib/generators/bootstrap/layout/templates/layout.html.haml +19 -34
- data/lib/generators/bootstrap/layout/templates/layout.html.slim +13 -30
- 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.slim +1 -1
- data/lib/generators/bootstrap/themed/templates/index.html.erb +2 -2
- data/lib/generators/bootstrap/themed/templates/index.html.haml +2 -2
- data/lib/generators/bootstrap/themed/templates/index.html.slim +4 -5
- data/lib/generators/bootstrap/themed/templates/new.html.slim +1 -1
- data/lib/generators/bootstrap/themed/templates/show.html.erb +5 -7
- data/lib/generators/bootstrap/themed/templates/show.html.haml +4 -4
- data/lib/generators/bootstrap/themed/templates/show.html.slim +6 -7
- 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 +2 -2
- data/lib/twitter/bootstrap/rails/breadcrumbs.rb +69 -0
- data/lib/twitter/bootstrap/rails/engine.rb +17 -10
- data/lib/twitter/bootstrap/rails/version.rb +2 -2
- data/spec/lib/breadcrumbs_spec.rb +99 -0
- data/spec/lib/twitter_bootstrap_rails/badge_label_helper_spec.rb +12 -4
- 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 +15 -15
- data/spec/lib/twitter_bootstrap_rails/navbar_helper_spec.rb +207 -173
- data/spec/lib/twitter_bootstrap_rails/uri_state_spec.rb +18 -16
- data/spec/spec_helper.rb +11 -1
- data/vendor/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +5796 -1
- data/vendor/static-source/bootstrap.less +0 -1
- data/vendor/static-source/fontawesome.less +0 -1
- data/vendor/static-source/sprites.less +1 -1
- data/vendor/toolkit/fontawesome/bordered-pulled.less +16 -0
- data/vendor/toolkit/fontawesome/core.less +8 -126
- data/vendor/toolkit/fontawesome/fixed-width.less +6 -0
- data/vendor/toolkit/fontawesome/font-awesome.less +9 -25
- data/vendor/toolkit/fontawesome/icons.less +549 -378
- data/vendor/toolkit/fontawesome/larger.less +13 -0
- data/vendor/toolkit/fontawesome/list.less +19 -0
- data/vendor/toolkit/fontawesome/mixins.less +16 -39
- data/vendor/toolkit/fontawesome/path.less +5 -5
- 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 +557 -731
- 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 +115 -148
- 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/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/mixins.less +36 -699
- 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 +156 -130
- data/app/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
- data/app/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-affix.js +0 -117
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +0 -99
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-button.js +0 -105
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +0 -207
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +0 -167
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +0 -169
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +0 -247
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +0 -114
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +0 -162
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +0 -144
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +0 -361
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +0 -60
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +0 -335
- 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 -11
- data/vendor/toolkit/fontawesome/bootstrap.less +0 -84
- data/vendor/toolkit/fontawesome/extras.less +0 -93
- data/vendor/toolkit/fontawesome/font-awesome-ie7.less +0 -1953
- 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
@@ -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,92 +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
|
136
159
|
}
|
137
160
|
|
138
161
|
// Backdrop to catch body clicks on mobile, etc.
|
139
|
-
// ---------------------------
|
140
162
|
.dropdown-backdrop {
|
141
163
|
position: fixed;
|
142
164
|
left: 0;
|
143
165
|
right: 0;
|
144
166
|
bottom: 0;
|
145
167
|
top: 0;
|
146
|
-
z-index: @
|
168
|
+
z-index: (@zindex-dropdown - 10);
|
147
169
|
}
|
148
170
|
|
149
171
|
// Right aligned dropdowns
|
150
|
-
// ---------------------------
|
151
172
|
.pull-right > .dropdown-menu {
|
152
173
|
right: 0;
|
153
174
|
left: auto;
|
154
175
|
}
|
155
176
|
|
156
177
|
// Allow for dropdowns to go bottom up (aka, dropup-menu)
|
157
|
-
//
|
178
|
+
//
|
158
179
|
// Just add .dropup after the standard .dropdown class and you're set, bro.
|
159
180
|
// TODO: abstract this so that the navbar fixed styles are not placed here?
|
181
|
+
|
160
182
|
.dropup,
|
161
183
|
.navbar-fixed-bottom .dropdown {
|
162
184
|
// Reverse the caret
|
163
185
|
.caret {
|
164
186
|
border-top: 0;
|
165
|
-
border-bottom:
|
187
|
+
border-bottom: @caret-width-base solid;
|
166
188
|
content: "";
|
167
189
|
}
|
168
190
|
// Different positioning for bottom up menu
|
@@ -173,76 +195,21 @@
|
|
173
195
|
}
|
174
196
|
}
|
175
197
|
|
176
|
-
// Sub menus
|
177
|
-
// ---------------------------
|
178
|
-
.dropdown-submenu {
|
179
|
-
position: relative;
|
180
|
-
}
|
181
|
-
// Default dropdowns
|
182
|
-
.dropdown-submenu > .dropdown-menu {
|
183
|
-
top: 0;
|
184
|
-
left: 100%;
|
185
|
-
margin-top: -6px;
|
186
|
-
margin-left: -1px;
|
187
|
-
.border-radius(0 6px 6px 6px);
|
188
|
-
}
|
189
|
-
.dropdown-submenu:hover > .dropdown-menu {
|
190
|
-
display: block;
|
191
|
-
}
|
192
198
|
|
193
|
-
//
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
//
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
width: 0;
|
208
|
-
height: 0;
|
209
|
-
border-color: transparent;
|
210
|
-
border-style: solid;
|
211
|
-
border-width: 5px 0 5px 5px;
|
212
|
-
border-left-color: darken(@dropdownBackground, 20%);
|
213
|
-
margin-top: 5px;
|
214
|
-
margin-right: -10px;
|
215
|
-
}
|
216
|
-
.dropdown-submenu:hover > a:after {
|
217
|
-
border-left-color: @dropdownLinkColorHover;
|
218
|
-
}
|
219
|
-
|
220
|
-
// Left aligned submenus
|
221
|
-
.dropdown-submenu.pull-left {
|
222
|
-
// Undo the float
|
223
|
-
// Yes, this is awkward since .pull-left adds a float, but it sticks to our conventions elsewhere.
|
224
|
-
float: none;
|
225
|
-
|
226
|
-
// Positioning the submenu
|
227
|
-
> .dropdown-menu {
|
228
|
-
left: -100%;
|
229
|
-
margin-left: 10px;
|
230
|
-
.border-radius(6px 0 6px 6px);
|
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
|
+
}
|
231
213
|
}
|
232
214
|
}
|
233
215
|
|
234
|
-
// Tweak nav headers
|
235
|
-
// -----------------
|
236
|
-
// Increase padding from 15px to 20px on sides
|
237
|
-
.dropdown .dropdown-menu .nav-header {
|
238
|
-
padding-left: 20px;
|
239
|
-
padding-right: 20px;
|
240
|
-
}
|
241
|
-
|
242
|
-
// Typeahead
|
243
|
-
// ---------
|
244
|
-
.typeahead {
|
245
|
-
z-index: 1051;
|
246
|
-
margin-top: 2px; // give it some space to breathe
|
247
|
-
.border-radius(@baseBorderRadius);
|
248
|
-
}
|