compass_twitter_bootstrap 2.0.3 → 2.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. data/CHANGELOG.md +6 -0
  2. data/README.md +41 -7
  3. data/build/convert.rb +27 -11
  4. data/lib/compass_twitter_bootstrap/version.rb +1 -1
  5. data/stylesheets/_compass_twitter_bootstrap.scss +2 -1
  6. data/stylesheets/_compass_twitter_bootstrap_awesome.scss +1 -1
  7. data/stylesheets/_compass_twitter_bootstrap_responsive.scss +1 -1
  8. data/stylesheets/compass_twitter_bootstrap/_accordion.scss +4 -3
  9. data/stylesheets/compass_twitter_bootstrap/_alerts.scss +31 -10
  10. data/stylesheets/compass_twitter_bootstrap/_breadcrumbs.scss +14 -14
  11. data/stylesheets/compass_twitter_bootstrap/_button-groups.scss +91 -55
  12. data/stylesheets/compass_twitter_bootstrap/_buttons.scss +126 -84
  13. data/stylesheets/compass_twitter_bootstrap/_carousel.scss +33 -23
  14. data/stylesheets/compass_twitter_bootstrap/_close.scss +7 -5
  15. data/stylesheets/compass_twitter_bootstrap/_code.scss +12 -8
  16. data/stylesheets/compass_twitter_bootstrap/_component-animations.scss +9 -7
  17. data/stylesheets/compass_twitter_bootstrap/_dropdowns.scss +112 -22
  18. data/stylesheets/compass_twitter_bootstrap/_font-awesome.scss +258 -196
  19. data/stylesheets/compass_twitter_bootstrap/_forms.scss +262 -161
  20. data/stylesheets/compass_twitter_bootstrap/_grid.scss +18 -2
  21. data/stylesheets/compass_twitter_bootstrap/_hero-unit.scss +11 -8
  22. data/stylesheets/compass_twitter_bootstrap/_labels-badges.scss +42 -26
  23. data/stylesheets/compass_twitter_bootstrap/_layouts.scss +3 -4
  24. data/stylesheets/compass_twitter_bootstrap/_media.scss +55 -0
  25. data/stylesheets/compass_twitter_bootstrap/_mixins.scss +243 -189
  26. data/stylesheets/compass_twitter_bootstrap/_modals.scss +28 -23
  27. data/stylesheets/compass_twitter_bootstrap/_navbar.scss +269 -143
  28. data/stylesheets/compass_twitter_bootstrap/_navs.scss +59 -46
  29. data/stylesheets/compass_twitter_bootstrap/_pager.scss +17 -12
  30. data/stylesheets/compass_twitter_bootstrap/_pagination.scss +92 -27
  31. data/stylesheets/compass_twitter_bootstrap/_popovers.scss +116 -36
  32. data/stylesheets/compass_twitter_bootstrap/_progress-bars.scss +35 -30
  33. data/stylesheets/compass_twitter_bootstrap/_reset.scss +101 -11
  34. data/stylesheets/compass_twitter_bootstrap/_responsive-1200px-min.scss +9 -7
  35. data/stylesheets/compass_twitter_bootstrap/_responsive-767px-max.scss +115 -71
  36. data/stylesheets/compass_twitter_bootstrap/_responsive-768px-979px.scss +8 -6
  37. data/stylesheets/compass_twitter_bootstrap/_responsive-navbar.scss +53 -14
  38. data/stylesheets/compass_twitter_bootstrap/_responsive-utilities.scss +17 -15
  39. data/stylesheets/compass_twitter_bootstrap/_responsive.scss +48 -0
  40. data/stylesheets/compass_twitter_bootstrap/_scaffolding.scss +27 -4
  41. data/stylesheets/compass_twitter_bootstrap/_sprites.scss +24 -22
  42. data/stylesheets/compass_twitter_bootstrap/_tables.scss +122 -61
  43. data/stylesheets/compass_twitter_bootstrap/_thumbnails.scss +12 -7
  44. data/stylesheets/compass_twitter_bootstrap/_tooltip.scss +50 -15
  45. data/stylesheets/compass_twitter_bootstrap/_type.scss +93 -93
  46. data/stylesheets/compass_twitter_bootstrap/_utilities.scss +9 -2
  47. data/stylesheets/compass_twitter_bootstrap/_variables.scss +134 -38
  48. data/stylesheets/compass_twitter_bootstrap/_wells.scss +11 -10
  49. data/stylesheets_sass/_compass_twitter_bootstrap.sass +2 -1
  50. data/stylesheets_sass/_compass_twitter_bootstrap_awesome.sass +1 -1
  51. data/stylesheets_sass/_compass_twitter_bootstrap_responsive.sass +1 -1
  52. data/stylesheets_sass/compass_twitter_bootstrap/_accordion.sass +4 -3
  53. data/stylesheets_sass/compass_twitter_bootstrap/_alerts.sass +27 -9
  54. data/stylesheets_sass/compass_twitter_bootstrap/_breadcrumbs.sass +12 -13
  55. data/stylesheets_sass/compass_twitter_bootstrap/_button-groups.sass +93 -55
  56. data/stylesheets_sass/compass_twitter_bootstrap/_buttons.sass +113 -88
  57. data/stylesheets_sass/compass_twitter_bootstrap/_carousel.sass +31 -23
  58. data/stylesheets_sass/compass_twitter_bootstrap/_close.sass +5 -4
  59. data/stylesheets_sass/compass_twitter_bootstrap/_code.sass +12 -9
  60. data/stylesheets_sass/compass_twitter_bootstrap/_component-animations.sass +7 -6
  61. data/stylesheets_sass/compass_twitter_bootstrap/_dropdowns.sass +105 -21
  62. data/stylesheets_sass/compass_twitter_bootstrap/_font-awesome.sass +228 -31
  63. data/stylesheets_sass/compass_twitter_bootstrap/_forms.sass +255 -155
  64. data/stylesheets_sass/compass_twitter_bootstrap/_grid.sass +16 -2
  65. data/stylesheets_sass/compass_twitter_bootstrap/_hero-unit.sass +10 -7
  66. data/stylesheets_sass/compass_twitter_bootstrap/_labels-badges.sass +38 -31
  67. data/stylesheets_sass/compass_twitter_bootstrap/_layouts.sass +3 -4
  68. data/stylesheets_sass/compass_twitter_bootstrap/_media.sass +48 -0
  69. data/stylesheets_sass/compass_twitter_bootstrap/_mixins.sass +215 -174
  70. data/stylesheets_sass/compass_twitter_bootstrap/_modals.sass +25 -26
  71. data/stylesheets_sass/compass_twitter_bootstrap/_navbar.sass +229 -134
  72. data/stylesheets_sass/compass_twitter_bootstrap/_navs.sass +53 -46
  73. data/stylesheets_sass/compass_twitter_bootstrap/_pager.sass +16 -12
  74. data/stylesheets_sass/compass_twitter_bootstrap/_pagination.sass +78 -23
  75. data/stylesheets_sass/compass_twitter_bootstrap/_popovers.sass +106 -40
  76. data/stylesheets_sass/compass_twitter_bootstrap/_progress-bars.sass +35 -30
  77. data/stylesheets_sass/compass_twitter_bootstrap/_reset.sass +80 -12
  78. data/stylesheets_sass/compass_twitter_bootstrap/_responsive-1200px-min.sass +8 -7
  79. data/stylesheets_sass/compass_twitter_bootstrap/_responsive-767px-max.sass +89 -54
  80. data/stylesheets_sass/compass_twitter_bootstrap/_responsive-768px-979px.sass +7 -6
  81. data/stylesheets_sass/compass_twitter_bootstrap/_responsive-navbar.sass +38 -13
  82. data/stylesheets_sass/compass_twitter_bootstrap/_responsive-utilities.sass +18 -17
  83. data/stylesheets_sass/compass_twitter_bootstrap/_responsive.sass +44 -0
  84. data/stylesheets_sass/compass_twitter_bootstrap/_scaffolding.sass +24 -4
  85. data/stylesheets_sass/compass_twitter_bootstrap/_sprites.sass +25 -8
  86. data/stylesheets_sass/compass_twitter_bootstrap/_tables.sass +110 -83
  87. data/stylesheets_sass/compass_twitter_bootstrap/_thumbnails.sass +11 -7
  88. data/stylesheets_sass/compass_twitter_bootstrap/_tooltip.sass +43 -19
  89. data/stylesheets_sass/compass_twitter_bootstrap/_type.sass +123 -75
  90. data/stylesheets_sass/compass_twitter_bootstrap/_utilities.sass +7 -2
  91. data/stylesheets_sass/compass_twitter_bootstrap/_variables.sass +141 -37
  92. data/stylesheets_sass/compass_twitter_bootstrap/_wells.sass +10 -9
  93. data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
  94. data/vendor/assets/fonts/fontawesome-webfont.svg +247 -167
  95. data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
  96. data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
  97. data/vendor/assets/images/glyphicons-halflings-white.png +0 -0
  98. data/vendor/assets/images/glyphicons-halflings.png +0 -0
  99. data/vendor/assets/javascripts/bootstrap-affix.js +117 -0
  100. data/vendor/assets/javascripts/bootstrap-alert.js +13 -4
  101. data/vendor/assets/javascripts/bootstrap-all.js +2 -1
  102. data/vendor/assets/javascripts/bootstrap-button.js +17 -8
  103. data/vendor/assets/javascripts/bootstrap-carousel.js +30 -14
  104. data/vendor/assets/javascripts/bootstrap-collapse.js +24 -14
  105. data/vendor/assets/javascripts/bootstrap-dropdown.js +80 -19
  106. data/vendor/assets/javascripts/bootstrap-modal.js +111 -84
  107. data/vendor/assets/javascripts/bootstrap-popover.js +21 -5
  108. data/vendor/assets/javascripts/bootstrap-scrollspy.js +21 -10
  109. data/vendor/assets/javascripts/bootstrap-tab.js +17 -8
  110. data/vendor/assets/javascripts/bootstrap-tooltip.js +36 -24
  111. data/vendor/assets/javascripts/bootstrap-transition.js +6 -7
  112. data/vendor/assets/javascripts/bootstrap-typeahead.js +87 -49
  113. metadata +17 -7
@@ -1,13 +1,6 @@
1
- // MODALS
2
- // ------
3
-
4
- // Recalculate z-index where appropriate
5
- .modal-open {
6
- .dropdown-menu { z-index: $zindexDropdown + $zindexModal; }
7
- .dropdown.open { *z-index: $zindexDropdown + $zindexModal; }
8
- .popover { z-index: $zindexPopover + $zindexModal; }
9
- .tooltip { z-index: $zindexTooltip + $zindexModal; }
10
- }
1
+ //
2
+ // Modals
3
+ // --------------------------------------------------
11
4
 
12
5
  // Background
13
6
  .modal-backdrop {
@@ -24,40 +17,48 @@
24
17
 
25
18
  .modal-backdrop,
26
19
  .modal-backdrop.fade.in {
27
- @include bootstrap-opacity(80);
20
+ @include ctb-opacity(80);
28
21
  }
29
22
 
30
23
  // Base modal
31
24
  .modal {
32
25
  position: fixed;
33
- top: 50%;
26
+ top: 10%;
34
27
  left: 50%;
35
28
  z-index: $zindexModal;
36
- overflow: auto;
37
29
  width: 560px;
38
- margin: -250px 0 0 -280px;
30
+ margin-left: -280px;
39
31
  background-color: $white;
40
32
  border: 1px solid #999;
41
33
  border: 1px solid rgba(0,0,0,.3);
42
34
  *border: 1px solid #999; /* IE6-7 */
43
- @include bootstrap-border-radius(6px);
44
- @include bootstrap-box-shadow(0 3px 7px rgba(0,0,0,0.3));
45
- @include bootstrap-background-clip(padding-box);
35
+ @include ctb-border-radius(6px);
36
+ @include ctb-box-shadow(0 3px 7px rgba(0,0,0,0.3));
37
+ @include ctb-background-clip(padding-box);
38
+ // Remove focus outline from opened modal
39
+ outline: none;
40
+
46
41
  &.fade {
47
- @include bootstrap-transition('opacity .3s linear, top .3s ease-out');
42
+ @include ctb-transition('opacity .3s linear, top .3s ease-out');
48
43
  top: -25%;
49
44
  }
50
- &.fade.in { top: 50%; }
45
+ &.fade.in { top: 10%; }
51
46
  }
52
47
  .modal-header {
53
48
  padding: 9px 15px;
54
49
  border-bottom: 1px solid #eee;
55
50
  // Close icon
56
51
  .close { margin-top: 2px; }
52
+ // Heading
53
+ h3 {
54
+ margin: 0;
55
+ line-height: 30px;
56
+ }
57
57
  }
58
58
 
59
- // Body (where all modal content resises)
59
+ // Body (where all modal content resides)
60
60
  .modal-body {
61
+ position: relative;
61
62
  overflow-y: auto;
62
63
  max-height: 400px;
63
64
  padding: 15px;
@@ -74,9 +75,9 @@
74
75
  text-align: right; // right align buttons
75
76
  background-color: #f5f5f5;
76
77
  border-top: 1px solid #ddd;
77
- @include bootstrap-border-radius(0 0 6px 6px);
78
- @include bootstrap-box-shadow(inset 0 1px 0 $white);
79
- @include bootstrap-clearfix(); // clear it in case folks use .pull-* classes on buttons
78
+ @include ctb-border-radius(0 0 6px 6px);
79
+ @include ctb-box-shadow(inset 0 1px 0 $white);
80
+ @include ctb-clearfix(); // clear it in case folks use .pull-* classes on buttons
80
81
 
81
82
  // Properly space out buttons
82
83
  .btn + .btn {
@@ -87,4 +88,8 @@
87
88
  .btn-group .btn + .btn {
88
89
  margin-left: -1px;
89
90
  }
91
+ // and override it for block buttons as well
92
+ .btn-block + .btn-block {
93
+ margin-left: 0;
94
+ }
90
95
  }
@@ -1,27 +1,34 @@
1
- // NAVBAR (FIXED AND STATIC)
2
- // -------------------------
1
+ //
2
+ // Navbars (Redux)
3
+ // --------------------------------------------------
3
4
 
4
5
 
5
6
  // COMMON STYLES
6
7
  // -------------
7
8
 
9
+ // Base class and wrapper
8
10
  .navbar {
11
+ overflow: visible;
12
+ margin-bottom: $baseLineHeight;
13
+
9
14
  // Fix for IE7's bad z-indexing so dropdowns don't appear below content that follows the navbar
10
15
  *position: relative;
11
16
  *z-index: 2;
12
-
13
- overflow: visible;
14
- margin-bottom: $baseLineHeight;
15
17
  }
16
18
 
17
- // Gradient is applied to it's own element because overflow visible is not honored by IE when filter is present
19
+ // Inner for background effects
20
+ // Gradient is applied to its own element because overflow visible is not honored by IE when filter is present
18
21
  .navbar-inner {
19
22
  min-height: $navbarHeight;
20
23
  padding-left: 20px;
21
24
  padding-right: 20px;
22
- @include bootstrap-gradient-vertical($navbarBackgroundHighlight, $navbarBackground);
23
- @include bootstrap-border-radius(4px);
24
- @include bootstrap-box-shadow("0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1)");
25
+ @include ctb-gradient-vertical($navbarBackgroundHighlight, $navbarBackground);
26
+ border: 1px solid $navbarBorder;
27
+ @include ctb-border-radius($baseBorderRadius);
28
+ @include ctb-box-shadow(0 1px 4px rgba(0,0,0,.065));
29
+
30
+ // Prevent floats from breaking the navbar
31
+ @include ctb-clearfix();
25
32
  }
26
33
 
27
34
  // Set width to auto for default container
@@ -33,63 +40,79 @@
33
40
  // Override the default collapsed state
34
41
  .nav-collapse.collapse {
35
42
  height: auto;
43
+ overflow: visible;
36
44
  }
37
45
 
38
46
 
39
- // Brand, links, text, and buttons
40
- .navbar {
41
- color: $navbarText;
42
- // Hover and active states
43
- .brand:hover {
47
+ // Brand: website or project name
48
+ // -------------------------
49
+ .navbar .brand {
50
+ float: left;
51
+ display: block;
52
+ // Vertically center the text given $navbarHeight
53
+ padding: (($navbarHeight - $baseLineHeight) / 2) 20px (($navbarHeight - $baseLineHeight) / 2);
54
+ margin-left: -20px; // negative indent to left-align the text down the page
55
+ font-size: 20px;
56
+ font-weight: 200;
57
+ color: $navbarBrandColor;
58
+ text-shadow: 0 1px 0 $navbarBackgroundHighlight;
59
+ &:hover {
44
60
  text-decoration: none;
45
61
  }
46
- // Website or project name
47
- .brand {
48
- float: left;
49
- display: block;
50
- // Vertically center the text given @navbarHeight
51
- $elementHeight: 20px;
52
- padding: (($navbarHeight - $elementHeight) / 2 - 2) 20px (($navbarHeight - $elementHeight) / 2 + 2);
53
- margin-left: -20px; // negative indent to left-align the text down the page
54
- font-size: 20px;
55
- font-weight: 200;
56
- line-height: 1;
57
- color: $navbarBrandColor;
58
- }
59
- // Plain text in topbar
60
- .navbar-text {
61
- margin-bottom: 0;
62
- line-height: $navbarHeight;
63
- }
64
- // Janky solution for now to account for links outside the .nav
65
- .navbar-link {
66
- color: $navbarLinkColor;
67
- &:hover {
68
- color: $navbarLinkColorHover;
69
- }
70
- }
71
- // Buttons in navbar
72
- .btn,
73
- .btn-group {
74
- @include bootstrap-navbarVerticalAlign(30px); // Vertically center in navbar
75
- }
76
- .btn-group .btn {
77
- margin: 0; // then undo the margin here so we don't accidentally double it
62
+ }
63
+
64
+ // Plain text in topbar
65
+ // -------------------------
66
+ .navbar-text {
67
+ margin-bottom: 0;
68
+ line-height: $navbarHeight;
69
+ color: $navbarText;
70
+ }
71
+
72
+ // Janky solution for now to account for links outside the .nav
73
+ // -------------------------
74
+ .navbar-link {
75
+ color: $navbarLinkColor;
76
+ &:hover {
77
+ color: $navbarLinkColorHover;
78
78
  }
79
79
  }
80
80
 
81
+ // Dividers in navbar
82
+ // -------------------------
83
+ .navbar .divider-vertical {
84
+ height: $navbarHeight;
85
+ margin: 0 9px;
86
+ border-left: 1px solid $navbarBackground;
87
+ border-right: 1px solid $navbarBackgroundHighlight;
88
+ }
89
+
90
+ // Buttons in navbar
91
+ // -------------------------
92
+ .navbar .btn,
93
+ .navbar .btn-group {
94
+ @include ctb-navbarVerticalAlign(30px); // Vertically center in navbar
95
+ }
96
+ .navbar .btn-group .btn,
97
+ .navbar .input-prepend .btn,
98
+ .navbar .input-append .btn {
99
+ margin-top: 0; // then undo the margin here so we don't accidentally double it
100
+ }
101
+
81
102
  // Navbar forms
103
+ // -------------------------
82
104
  .navbar-form {
83
105
  margin-bottom: 0; // remove default bottom margin
84
- @include bootstrap-clearfix();
106
+ @include ctb-clearfix();
85
107
  input,
86
108
  select,
87
109
  .radio,
88
110
  .checkbox {
89
- @include bootstrap-navbarVerticalAlign(30px); // Vertically center in navbar
111
+ @include ctb-navbarVerticalAlign(30px); // Vertically center in navbar
90
112
  }
91
113
  input,
92
- select {
114
+ select,
115
+ .btn {
93
116
  display: inline-block;
94
117
  margin-bottom: 0;
95
118
  }
@@ -100,7 +123,7 @@
100
123
  }
101
124
  .input-append,
102
125
  .input-prepend {
103
- margin-top: 6px;
126
+ margin-top: 5px;
104
127
  white-space: nowrap; // preven two items from separating within a .navbar-form that has .pull-left
105
128
  input {
106
129
  margin-top: 0; // remove the margin on top since it's on the parent
@@ -109,46 +132,37 @@
109
132
  }
110
133
 
111
134
  // Navbar search
135
+ // -------------------------
112
136
  .navbar-search {
113
137
  position: relative;
114
138
  float: left;
115
- @include bootstrap-navbarVerticalAlign(28px); // Vertically center in navbar
139
+ @include ctb-navbarVerticalAlign(30px); // Vertically center in navbar
116
140
  margin-bottom: 0;
117
141
  .search-query {
118
- padding: 4px 9px;
119
- @include bootstrap-font-sans-serif(13px, normal, 1);
120
- color: $white;
121
- background-color: $navbarSearchBackground;
122
- border: 1px solid $navbarSearchBorder;
123
- @include bootstrap-box-shadow("inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0px rgba(255,255,255,.15)");
124
- @include bootstrap-transition(none);
125
-
126
- // Placeholder text gets special styles; can't be a grouped selector
127
- &:-moz-placeholder {
128
- color: $navbarSearchPlaceholderColor;
129
- }
130
- &::-webkit-input-placeholder {
131
- color: $navbarSearchPlaceholderColor;
132
- }
142
+ margin-bottom: 0;
143
+ padding: 4px 14px;
144
+ @include ctb-font-sans-serif(13px, normal, 1);
145
+ @include ctb-border-radius(15px); // redeclare because of specificity of the type attribute
146
+ }
147
+ }
133
148
 
134
- // Focus states (we use .focused since IE7-8 and down doesn't support :focus)
135
- &:focus,
136
- &.focused {
137
- padding: 5px 10px;
138
- color: $grayDark;
139
- text-shadow: 0 1px 0 $white;
140
- background-color: $navbarSearchBackgroundFocus;
141
- border: 0;
142
- @include bootstrap-box-shadow(0 0 3px rgba(0,0,0,.15));
143
- outline: 0;
144
- }
149
+
150
+
151
+ // Static navbar
152
+ // -------------------------
153
+
154
+ .navbar-static-top {
155
+ position: static;
156
+ margin-bottom: 0; // remove 18px margin for default navbar
157
+ .navbar-inner {
158
+ @include ctb-border-radius(0);
145
159
  }
146
160
  }
147
161
 
148
162
 
149
163
 
150
- // FIXED NAVBAR
151
- // ------------
164
+ // Fixed navbar
165
+ // -------------------------
152
166
 
153
167
  // Shared (top/bottom) styles
154
168
  .navbar-fixed-top,
@@ -157,28 +171,47 @@
157
171
  right: 0;
158
172
  left: 0;
159
173
  z-index: $zindexFixedNavbar;
160
- margin-bottom: 0; // remove 18px margin for static navbar
174
+ margin-bottom: 0; // remove 18px margin for default navbar
175
+ }
176
+ .navbar-fixed-top .navbar-inner,
177
+ .navbar-static-top .navbar-inner {
178
+ border-width: 0 0 1px;
179
+ }
180
+ .navbar-fixed-bottom .navbar-inner {
181
+ border-width: 1px 0 0;
161
182
  }
162
183
  .navbar-fixed-top .navbar-inner,
163
184
  .navbar-fixed-bottom .navbar-inner {
164
185
  padding-left: 0;
165
186
  padding-right: 0;
166
- @include bootstrap-border-radius(0);
187
+ @include ctb-border-radius(0);
167
188
  }
168
189
 
190
+ // Reset container width
191
+ // Required here as we reset the width earlier on and the grid mixins don't override early enough
192
+ .navbar-static-top .container,
169
193
  .navbar-fixed-top .container,
170
194
  .navbar-fixed-bottom .container {
171
- @include bootstrap-grid-core-span($gridColumns, $gridColumnWidth, $gridGutterWidth);
195
+ @include ctb-core-span($gridColumns);
172
196
  }
173
197
 
174
198
  // Fixed to top
175
199
  .navbar-fixed-top {
176
200
  top: 0;
177
201
  }
202
+ .navbar-fixed-top,
203
+ .navbar-static-top {
204
+ .navbar-inner {
205
+ @include ctb-box-shadow(#{0 1px 10px rgba(0,0,0,.1)});
206
+ }
207
+ }
178
208
 
179
209
  // Fixed to bottom
180
210
  .navbar-fixed-bottom {
181
211
  bottom: 0;
212
+ .navbar-inner {
213
+ @include ctb-box-shadow(#{0 -1px 10px rgba(0,0,0,.1)});
214
+ }
182
215
  }
183
216
 
184
217
 
@@ -195,39 +228,28 @@
195
228
  }
196
229
  .navbar .nav.pull-right {
197
230
  float: right; // redeclare due to specificity
231
+ margin-right: 0; // remove margin on float right nav
198
232
  }
199
233
  .navbar .nav > li {
200
- display: block;
201
234
  float: left;
202
235
  }
203
236
 
204
237
  // Links
205
238
  .navbar .nav > li > a {
206
239
  float: none;
207
- // Vertically center the text given @navbarHeight
208
- $elementHeight: 20px;
209
- padding: (($navbarHeight - $elementHeight) / 2 - 1) 10px (($navbarHeight - $elementHeight) / 2 + 1);
210
- line-height: 19px;
240
+ // Vertically center the text given $navbarHeight
241
+ padding: (($navbarHeight - $baseLineHeight) / 2) 15px (($navbarHeight - $baseLineHeight) / 2);
211
242
  color: $navbarLinkColor;
212
243
  text-decoration: none;
213
- text-shadow: 0 -1px 0 rgba(0,0,0,.25);
244
+ text-shadow: 0 1px 0 $navbarBackgroundHighlight;
214
245
  }
215
- // Buttons
216
- .navbar .btn {
217
- display: inline-block;
218
- padding: 4px 10px 4px;
219
- // Vertically center the button given @navbarHeight
220
- $elementHeight: 28px;
221
- margin: (($navbarHeight - $elementHeight) / 2 - 1) 5px (($navbarHeight - $elementHeight) / 2);
222
- line-height: $baseLineHeight;
223
- }
224
- .navbar .btn-group {
225
- margin: 0;
226
- // Vertically center the button given @navbarHeight
227
- $elementHeight: 28px;
228
- padding: (($navbarHeight - $elementHeight) / 2 - 1) 5px (($navbarHeight - $elementHeight) / 2);
246
+ .navbar .nav .dropdown-toggle .caret {
247
+ margin-top: 8px;
248
+
229
249
  }
250
+
230
251
  // Hover
252
+ .navbar .nav > li > a:focus,
231
253
  .navbar .nav > li > a:hover {
232
254
  background-color: $navbarLinkBackgroundHover; // "transparent" is default to differentiate :hover from .active
233
255
  color: $navbarLinkColorHover;
@@ -235,27 +257,13 @@
235
257
  }
236
258
 
237
259
  // Active nav items
238
- .navbar .nav .active > a,
239
- .navbar .nav .active > a:hover {
260
+ .navbar .nav > .active > a,
261
+ .navbar .nav > .active > a:hover,
262
+ .navbar .nav > .active > a:focus {
240
263
  color: $navbarLinkColorActive;
241
264
  text-decoration: none;
242
265
  background-color: $navbarLinkBackgroundActive;
243
- }
244
-
245
- // Dividers (basically a vertical hr)
246
- .navbar .divider-vertical {
247
- height: $navbarHeight;
248
- width: 1px;
249
- margin: 0 9px;
250
- overflow: hidden;
251
- background-color: $navbarBackground;
252
- border-right: 1px solid $navbarBackgroundHighlight;
253
- }
254
-
255
- // Secondary (floated right) nav in topbar
256
- .navbar .nav.pull-right {
257
- margin-left: 10px;
258
- margin-right: 0;
266
+ @include ctb-box-shadow(inset 0 3px 8px rgba(0,0,0,.125));
259
267
  }
260
268
 
261
269
  // Navbar button for toggling navbar items in responsive layouts
@@ -266,27 +274,28 @@
266
274
  padding: 7px 10px;
267
275
  margin-left: 5px;
268
276
  margin-right: 5px;
269
- @include bootstrap-buttonBackground($navbarBackgroundHighlight, $navbarBackground);
270
- @include bootstrap-box-shadow("inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075)");
277
+ @include ctb-buttonBackground(darken($navbarBackgroundHighlight, 5%), darken($navbarBackground, 5%));
278
+ @include ctb-box-shadow(#{inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075)});
271
279
  }
272
280
  .navbar .btn-navbar .icon-bar {
273
281
  display: block;
274
282
  width: 18px;
275
283
  height: 2px;
276
284
  background-color: #f5f5f5;
277
- @include bootstrap-border-radius(1px);
278
- @include bootstrap-box-shadow(0 1px 0 rgba(0,0,0,.25));
285
+ @include ctb-border-radius(1px);
286
+ @include ctb-box-shadow(0 1px 0 rgba(0,0,0,.25));
279
287
  }
280
288
  .btn-navbar .icon-bar + .icon-bar {
281
289
  margin-top: 3px;
282
290
  }
283
291
 
284
292
 
293
+
285
294
  // Dropdown menus
286
295
  // --------------
287
296
 
288
297
  // Menu position and menu carets
289
- .navbar .dropdown-menu {
298
+ .navbar .nav > li > .dropdown-menu {
290
299
  &:before {
291
300
  content: '';
292
301
  display: inline-block;
@@ -310,7 +319,7 @@
310
319
  }
311
320
  }
312
321
  // Menu position and menu caret support for dropups via extra dropup class
313
- .navbar-fixed-bottom .dropdown-menu {
322
+ .navbar-fixed-bottom .nav > li > .dropdown-menu {
314
323
  &:before {
315
324
  border-top: 7px solid #ccc;
316
325
  border-top-color: $dropdownBorder;
@@ -325,32 +334,34 @@
325
334
  top: auto;
326
335
  }
327
336
  }
328
- // Dropdown toggle caret
329
- .navbar .nav li.dropdown .dropdown-toggle .caret,
330
- .navbar .nav li.dropdown.open .caret {
331
- border-top-color: $white;
332
- border-bottom-color: $white;
333
- }
334
- .navbar .nav li.dropdown.active .caret {
335
- @include bootstrap-opacity(100);
337
+
338
+ // Caret should match text color on hover
339
+ .navbar .nav li.dropdown > a:hover .caret {
340
+ border-top-color: $navbarLinkColorActive;
341
+ border-bottom-color: $navbarLinkColorActive;
336
342
  }
337
343
 
338
344
  // Remove background color from open dropdown
339
345
  .navbar .nav li.dropdown.open > .dropdown-toggle,
340
346
  .navbar .nav li.dropdown.active > .dropdown-toggle,
341
347
  .navbar .nav li.dropdown.open.active > .dropdown-toggle {
342
- background-color: transparent;
348
+ background-color: $navbarLinkBackgroundActive;
349
+ color: $navbarLinkColorActive;
343
350
  }
344
-
345
- // Dropdown link on hover
346
- .navbar .nav li.dropdown.active > .dropdown-toggle:hover {
347
- color: $white;
351
+ .navbar .nav li.dropdown > .dropdown-toggle .caret {
352
+ border-top-color: $navbarLinkColor;
353
+ border-bottom-color: $navbarLinkColor;
354
+ }
355
+ .navbar .nav li.dropdown.open > .dropdown-toggle .caret,
356
+ .navbar .nav li.dropdown.active > .dropdown-toggle .caret,
357
+ .navbar .nav li.dropdown.open.active > .dropdown-toggle .caret {
358
+ border-top-color: $navbarLinkColorActive;
359
+ border-bottom-color: $navbarLinkColorActive;
348
360
  }
349
361
 
350
362
  // Right aligned menus need alt position
351
- // TODO: rejigger this at some point to simplify the selectors
352
- .navbar .pull-right .dropdown-menu,
353
- .navbar .dropdown-menu.pull-right {
363
+ .navbar .pull-right > li > .dropdown-menu,
364
+ .navbar .nav > li > .dropdown-menu.pull-right {
354
365
  left: auto;
355
366
  right: 0;
356
367
  &:before {
@@ -361,4 +372,119 @@
361
372
  left: auto;
362
373
  right: 13px;
363
374
  }
364
- }
375
+ .dropdown-menu {
376
+ left: auto;
377
+ right: 100%;
378
+ margin-left: 0;
379
+ margin-right: -1px;
380
+ @include ctb-border-radius(6px 0 6px 6px);
381
+ }
382
+ }
383
+
384
+
385
+ // Inverted navbar
386
+ // -------------------------
387
+
388
+ .navbar-inverse {
389
+
390
+ .navbar-inner {
391
+ @include ctb-gradient-vertical($navbarInverseBackgroundHighlight, $navbarInverseBackground);
392
+ border-color: $navbarInverseBorder;
393
+ }
394
+
395
+ .brand,
396
+ .nav > li > a {
397
+ color: $navbarInverseLinkColor;
398
+ text-shadow: 0 -1px 0 rgba(0,0,0,.25);
399
+ &:hover {
400
+ color: $navbarInverseLinkColorHover;
401
+ }
402
+ }
403
+
404
+ .brand {
405
+ color: $navbarInverseBrandColor;
406
+ }
407
+
408
+ .navbar-text {
409
+ color: $navbarInverseText;
410
+ }
411
+
412
+ .nav > li > a:focus,
413
+ .nav > li > a:hover {
414
+ background-color: $navbarInverseLinkBackgroundHover;
415
+ color: $navbarInverseLinkColorHover;
416
+ }
417
+
418
+ .nav .active > a,
419
+ .nav .active > a:hover,
420
+ .nav .active > a:focus {
421
+ color: $navbarInverseLinkColorActive;
422
+ background-color: $navbarInverseLinkBackgroundActive;
423
+ }
424
+
425
+ // Inline text links
426
+ .navbar-link {
427
+ color: $navbarInverseLinkColor;
428
+ &:hover {
429
+ color: $navbarInverseLinkColorHover;
430
+ }
431
+ }
432
+
433
+ // Dividers in navbar
434
+ .divider-vertical {
435
+ border-left-color: $navbarInverseBackground;
436
+ border-right-color: $navbarInverseBackgroundHighlight;
437
+ }
438
+
439
+ // Dropdowns
440
+ .nav li.dropdown.open > .dropdown-toggle,
441
+ .nav li.dropdown.active > .dropdown-toggle,
442
+ .nav li.dropdown.open.active > .dropdown-toggle {
443
+ background-color: $navbarInverseLinkBackgroundActive;
444
+ color: $navbarInverseLinkColorActive;
445
+ }
446
+ .nav li.dropdown > a:hover .caret {
447
+ border-top-color: $navbarInverseLinkColorActive;
448
+ border-bottom-color: $navbarInverseLinkColorActive;
449
+ }
450
+ .nav li.dropdown > .dropdown-toggle .caret {
451
+ border-top-color: $navbarInverseLinkColor;
452
+ border-bottom-color: $navbarInverseLinkColor;
453
+ }
454
+ .nav li.dropdown.open > .dropdown-toggle .caret,
455
+ .nav li.dropdown.active > .dropdown-toggle .caret,
456
+ .nav li.dropdown.open.active > .dropdown-toggle .caret {
457
+ border-top-color: $navbarInverseLinkColorActive;
458
+ border-bottom-color: $navbarInverseLinkColorActive;
459
+ }
460
+
461
+ // Navbar search
462
+ .navbar-search {
463
+ .search-query {
464
+ color: $white;
465
+ background-color: $navbarInverseSearchBackground;
466
+ border-color: $navbarInverseSearchBorder;
467
+ @include ctb-box-shadow(#{inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15)});
468
+ @include ctb-transition(none);
469
+ @include ctb-placeholder($navbarInverseSearchPlaceholderColor);
470
+
471
+ // Focus states (we use .focused since IE7-8 and down doesn't support :focus)
472
+ &:focus,
473
+ &.focused {
474
+ padding: 5px 15px;
475
+ color: $grayDark;
476
+ text-shadow: 0 1px 0 $white;
477
+ background-color: $navbarInverseSearchBackgroundFocus;
478
+ border: 0;
479
+ @include ctb-box-shadow(0 0 3px rgba(0,0,0,.15));
480
+ outline: 0;
481
+ }
482
+ }
483
+ }
484
+
485
+ // Navbar collapse button
486
+ .btn-navbar {
487
+ @include ctb-buttonBackground(darken($navbarInverseBackgroundHighlight, 5%), darken($navbarInverseBackground, 5%));
488
+ }
489
+
490
+ }