mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-18 03:11:19 +02:00
Start some nav and dropdown cleanup
* Remove border-radii on top of tab dropdown menus * Remove the .dropdown and .dropup styles and instead place on all * Use on dropdown carets intead of separately applying margin with a top alignment * Some other misc cleanup
This commit is contained in:
23
docs/assets/css/bootstrap.css
vendored
23
docs/assets/css/bootstrap.css
vendored
@@ -2693,13 +2693,7 @@ input[type="button"].btn-block {
|
|||||||
content: "\e160";
|
content: "\e160";
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropup,
|
.open > a {
|
||||||
.dropdown {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown-toggle:active,
|
|
||||||
.open .dropdown-toggle {
|
|
||||||
outline: 0;
|
outline: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2707,18 +2701,15 @@ input[type="button"].btn-block {
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 0;
|
width: 0;
|
||||||
height: 0;
|
height: 0;
|
||||||
vertical-align: top;
|
margin-top: 8px;
|
||||||
|
margin-left: 2px;
|
||||||
|
vertical-align: middle;
|
||||||
border-top: 4px solid #000;
|
border-top: 4px solid #000;
|
||||||
border-right: 4px solid transparent;
|
border-right: 4px solid transparent;
|
||||||
border-left: 4px solid transparent;
|
border-left: 4px solid transparent;
|
||||||
content: "";
|
content: "";
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown .caret {
|
|
||||||
margin-top: 8px;
|
|
||||||
margin-left: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown-menu {
|
.dropdown-menu {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 100%;
|
top: 100%;
|
||||||
@@ -3140,6 +3131,7 @@ button.close {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.nav > li {
|
.nav > li {
|
||||||
|
position: relative;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3320,6 +3312,11 @@ button.close {
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nav-tabs .dropdown-menu {
|
||||||
|
border-top-right-radius: 0;
|
||||||
|
border-top-left-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// Prevent IE8 from misplacing imgs
|
// Prevent IE8 from misplacing imgs
|
||||||
// See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989
|
// See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989
|
||||||
|
@@ -2,14 +2,8 @@
|
|||||||
// Dropdown menus
|
// Dropdown menus
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
|
// Remove the outline when :focus is triggered
|
||||||
// Use the .menu class on any <li> element within the topbar or ul.tabs and you'll get some superfancy dropdowns
|
.open > a {
|
||||||
.dropup,
|
|
||||||
.dropdown {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.dropdown-toggle:active,
|
|
||||||
.open .dropdown-toggle {
|
|
||||||
outline: 0;
|
outline: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -19,19 +13,14 @@
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 0;
|
width: 0;
|
||||||
height: 0;
|
height: 0;
|
||||||
vertical-align: top;
|
margin-left: 2px;
|
||||||
|
vertical-align: middle;
|
||||||
border-top: 4px solid #000;
|
border-top: 4px solid #000;
|
||||||
border-right: 4px solid transparent;
|
border-right: 4px solid transparent;
|
||||||
border-left: 4px solid transparent;
|
border-left: 4px solid transparent;
|
||||||
content: "";
|
content: "";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Place the caret
|
|
||||||
.dropdown .caret {
|
|
||||||
margin-top: 8px;
|
|
||||||
margin-left: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
// The dropdown menu (ul)
|
// The dropdown menu (ul)
|
||||||
// ----------------------
|
// ----------------------
|
||||||
.dropdown-menu {
|
.dropdown-menu {
|
||||||
|
@@ -12,8 +12,11 @@
|
|||||||
padding-left: 0; // Override default ul/ol
|
padding-left: 0; // Override default ul/ol
|
||||||
list-style: none;
|
list-style: none;
|
||||||
.clearfix();
|
.clearfix();
|
||||||
|
|
||||||
> li {
|
> li {
|
||||||
|
position: relative;
|
||||||
display: block;
|
display: block;
|
||||||
|
|
||||||
> a {
|
> a {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: block;
|
display: block;
|
||||||
@@ -44,7 +47,7 @@
|
|||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
// Space the headers out when they follow another list item (link)
|
// Space the headers out when they follow another list item (link)
|
||||||
&+ .nav-header {
|
+ .nav-header {
|
||||||
margin-top: 9px;
|
margin-top: 9px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -215,6 +218,15 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Dropdowns
|
||||||
|
// -------------------------
|
||||||
|
|
||||||
|
.nav-tabs .dropdown-menu {
|
||||||
|
// Remove the top rounded corners here since there is a hard edge above the menu
|
||||||
|
.border-top-radius(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// Prevent IE8 from misplacing imgs
|
// Prevent IE8 from misplacing imgs
|
||||||
// See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989
|
// See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989
|
||||||
|
Reference in New Issue
Block a user