1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00
twbs--bootstrap/less/_nav.less
Mark Otto 86af1f39ab Merge branch 'master' into derp
Conflicts:
	Gruntfile.js
	_config.yml
	dist/css/bootstrap-theme.css
	dist/css/bootstrap-theme.css.map
	dist/css/bootstrap-theme.min.css
	dist/css/bootstrap.css
	dist/css/bootstrap.css.map
	dist/css/bootstrap.min.css
	docs/_includes/components/button-groups.html
	docs/_includes/components/jumbotron.html
	docs/_includes/components/media.html
	docs/_includes/components/navs.html
	docs/_includes/customizer-variables.html
	docs/_includes/footer.html
	docs/_includes/getting-started/browser-device-support.html
	docs/_includes/js/carousel.html
	docs/_includes/js/dropdowns.html
	docs/_includes/js/modal.html
	docs/_includes/js/popovers.html
	docs/_includes/js/tooltips.html
	docs/_includes/nav/getting-started.html
	docs/_includes/nav/javascript.html
	docs/_layouts/default.html
	docs/assets/css/docs.min.css
	docs/assets/css/src/docs.css
	docs/assets/js/customize.min.js
	docs/assets/js/docs.min.js
	docs/assets/js/raw-files.min.js
	docs/browser-bugs.html
	docs/dist/css/bootstrap-theme.css
	docs/dist/css/bootstrap-theme.css.map
	docs/dist/css/bootstrap-theme.min.css
	docs/dist/css/bootstrap.css
	docs/dist/css/bootstrap.css.map
	docs/dist/css/bootstrap.min.css
	docs/examples/justified-nav/index.html
	less/_forms.less
	less/_tooltip.less
	less/navs.less
	less/theme.less
2014-11-09 22:02:53 -08:00

168 lines
2.8 KiB
Text

//
// Navs
// --------------------------------------------------
.nav {
margin-bottom: 0;
.list-unstyled();
&:extend(.clearfix all);
}
.nav-item {
position: relative;
display: inline-block;
}
.nav-link {
display: inline-block;
padding: @nav-link-padding;
line-height: @line-height-base;
&:hover,
&:focus {
text-decoration: none;
background-color: @nav-link-hover-bg;
}
// Disabled state sets text to gray and nukes hover/tab effects
.disabled > &,
&.disabled {
color: @nav-disabled-link-color;
&,
&:hover,
&:focus {
color: @nav-disabled-link-hover-color;
background-color: transparent;
cursor: @cursor-disabled;
}
}
}
//
// Tabs
//
.nav-tabs {
border-bottom: 1px solid @nav-tabs-border-color;
.nav-item {
float: left;
// Make the list-items overlay the bottom border
margin-bottom: -1px;
+ .nav-item {
margin-left: .2rem;
}
}
.nav-link {
display: block;
border: 1px solid transparent;
.border-radius(@border-radius-base @border-radius-base 0 0);
&:hover,
&:focus {
border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color @nav-tabs-border-color;
}
}
.open > .nav-link,
.active > .nav-link,
.nav-link.open,
.nav-link.active {
&,
&:hover,
&:focus {
color: @nav-tabs-active-link-hover-color;
background-color: @nav-tabs-active-link-hover-bg;
border-color: @nav-tabs-active-link-hover-border-color @nav-tabs-active-link-hover-border-color transparent;
}
}
.disabled > .nav-link,
.nav-link.disabled {
&,
&:hover,
&:focus {
color: @nav-disabled-link-color;
background-color: transparent;
border-color: transparent;
}
}
}
//
// Pills
//
.nav-pills {
.nav-item {
float: left;
+ .nav-item {
margin-left: .2rem;
}
}
.nav-link {
display: block;
.border-radius(@nav-pills-border-radius);
}
.open > .nav-link,
.active > .nav-link,
.nav-link.open,
.nav-link.active {
&,
&:hover,
&:focus {
color: @component-active-color;
background-color: @component-active-bg;
cursor: default;
}
}
}
.nav-stacked {
.nav-item {
float: none;
display: block;
+ .nav-item {
margin-top: .2rem;
margin-left: 0;
}
}
}
//
// Tabbable tabs
//
// Hide tabbable panes to start, show them when `.active`
.tab-content {
> .tab-pane {
display: none;
visibility: hidden;
}
> .active {
display: block;
visibility: visible;
}
}
//
// Dropdowns
//
.nav-tabs .dropdown-menu {
// Make dropdown border overlap tab border
margin-top: -1px;
// Remove the top rounded corners here since there is a hard edge above the menu
.border-top-radius(0);
}