1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00
twbs--bootstrap/scss/_nav.scss

169 lines
2.8 KiB
SCSS
Raw Normal View History

2012-06-29 00:46:45 -04:00
//
// Navs
// --------------------------------------------------
2014-07-09 16:51:49 -04:00
.nav {
2014-07-14 02:33:54 -04:00
margin-bottom: 0;
2014-12-02 17:02:35 -05:00
@extend .list-unstyled;
@include clearfix();
2014-07-09 16:51:49 -04:00
}
.nav-item {
position: relative;
display: inline-block;
2014-07-09 16:51:49 -04:00
}
.nav-link {
display: inline-block;
2014-12-02 17:02:35 -05:00
padding: $nav-link-padding;
line-height: $line-height-base;
2014-07-09 16:51:49 -04:00
&:hover,
&:focus {
text-decoration: none;
2014-12-02 17:02:35 -05:00
background-color: $nav-link-hover-bg;
2014-07-09 16:51:49 -04:00
}
// Disabled state sets text to gray and nukes hover/tab effects
.disabled > &,
&.disabled {
2014-12-02 17:02:35 -05:00
color: $nav-disabled-link-color;
2014-07-09 16:51:49 -04:00
&,
&:hover,
&:focus {
2014-12-02 17:02:35 -05:00
color: $nav-disabled-link-hover-color;
cursor: $cursor-disabled;
background-color: transparent;
2014-07-09 16:51:49 -04:00
}
}
}
//
2012-11-03 19:14:44 -04:00
// Tabs
//
.nav-tabs {
2014-12-02 17:02:35 -05:00
border-bottom: 1px solid $nav-tabs-border-color;
.nav-item {
2013-04-16 10:45:51 -04:00
float: left;
// Make the list-items overlay the bottom border
margin-bottom: -1px;
2013-04-16 10:45:51 -04:00
+ .nav-item {
margin-left: .2rem;
2013-04-16 10:45:51 -04:00
}
}
.nav-link {
display: block;
border: 1px solid transparent;
2014-12-02 17:02:35 -05:00
@include border-radius($border-radius-base $border-radius-base 0 0);
2013-04-16 10:45:51 -04:00
&:hover,
&:focus {
2014-12-02 17:02:35 -05:00
border-color: $nav-tabs-link-hover-border-color $nav-tabs-link-hover-border-color $nav-tabs-border-color;
2013-04-16 10:45:51 -04:00
}
}
2013-04-16 10:45:51 -04:00
.open > .nav-link,
.active > .nav-link,
.nav-link.open,
.nav-link.active {
&,
&:hover,
&:focus {
2014-12-02 17:02:35 -05:00
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;
2013-04-16 10:45:51 -04:00
}
}
.disabled > .nav-link,
.nav-link.disabled {
&,
&:hover,
&:focus {
2014-12-02 17:02:35 -05:00
color: $nav-disabled-link-color;
background-color: transparent;
border-color: transparent;
2013-04-16 10:45:51 -04:00
}
}
}
//
// Pills
//
.nav-pills {
.nav-item {
float: left;
+ .nav-item {
margin-left: .2rem;
}
}
.nav-link {
display: block;
2014-12-02 17:02:35 -05:00
@include border-radius($nav-pills-border-radius);
}
.open > .nav-link,
.active > .nav-link,
.nav-link.open,
.nav-link.active {
&,
&:hover,
&:focus {
2014-12-02 17:02:35 -05:00
color: $component-active-color;
cursor: default;
background-color: $component-active-bg;
}
}
}
.nav-stacked {
.nav-item {
display: block;
float: none;
+ .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;
Merge branch 'master' into derp Conflicts: Gruntfile.js 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/dropdowns.html docs/_includes/components/media.html docs/_includes/components/navs.html docs/_includes/components/progress-bars.html docs/_includes/components/responsive-embed.html docs/_includes/css/buttons.html docs/_includes/css/forms.html docs/_includes/css/less.html docs/_includes/css/overview.html docs/_includes/css/responsive-utilities.html docs/_includes/customizer-variables.html docs/_includes/getting-started/browser-device-support.html docs/_includes/getting-started/grunt.html docs/_includes/getting-started/template.html docs/_includes/header.html docs/_includes/js/alerts.html docs/_includes/js/buttons.html docs/_includes/js/carousel.html docs/_includes/js/collapse.html docs/_includes/js/dropdowns.html docs/_includes/js/modal.html docs/_includes/js/popovers.html docs/_includes/js/scrollspy.html docs/_includes/js/tabs.html docs/_includes/js/tooltips.html docs/_includes/nav/components.html docs/_includes/nav/getting-started.html docs/_layouts/default.html docs/about.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/components.html docs/components/navbar.md docs/css.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/blog/index.html docs/examples/carousel/index.html docs/examples/cover/index.html docs/examples/dashboard/index.html docs/examples/grid/index.html docs/examples/jumbotron-narrow/index.html docs/examples/jumbotron/index.html docs/examples/justified-nav/index.html docs/examples/navbar-fixed-top/index.html docs/examples/navbar-static-top/index.html docs/examples/navbar/index.html docs/examples/non-responsive/index.html docs/examples/offcanvas/index.html docs/examples/signin/index.html docs/examples/starter-template/index.html docs/examples/sticky-footer-navbar/index.html docs/examples/sticky-footer/index.html docs/examples/theme/index.html docs/examples/tooltip-viewport/index.html docs/getting-started.html docs/javascript.html docs/migration.html less/_animation.less less/_modal.less less/_navbar.less less/_variables.less less/glyphicons.less less/navs.less less/panels.less less/progress-bars.less
2014-10-27 01:31:59 -04:00
visibility: hidden;
}
2013-07-07 00:51:47 -04:00
> .active {
display: block;
Merge branch 'master' into derp Conflicts: Gruntfile.js 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/dropdowns.html docs/_includes/components/media.html docs/_includes/components/navs.html docs/_includes/components/progress-bars.html docs/_includes/components/responsive-embed.html docs/_includes/css/buttons.html docs/_includes/css/forms.html docs/_includes/css/less.html docs/_includes/css/overview.html docs/_includes/css/responsive-utilities.html docs/_includes/customizer-variables.html docs/_includes/getting-started/browser-device-support.html docs/_includes/getting-started/grunt.html docs/_includes/getting-started/template.html docs/_includes/header.html docs/_includes/js/alerts.html docs/_includes/js/buttons.html docs/_includes/js/carousel.html docs/_includes/js/collapse.html docs/_includes/js/dropdowns.html docs/_includes/js/modal.html docs/_includes/js/popovers.html docs/_includes/js/scrollspy.html docs/_includes/js/tabs.html docs/_includes/js/tooltips.html docs/_includes/nav/components.html docs/_includes/nav/getting-started.html docs/_layouts/default.html docs/about.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/components.html docs/components/navbar.md docs/css.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/blog/index.html docs/examples/carousel/index.html docs/examples/cover/index.html docs/examples/dashboard/index.html docs/examples/grid/index.html docs/examples/jumbotron-narrow/index.html docs/examples/jumbotron/index.html docs/examples/justified-nav/index.html docs/examples/navbar-fixed-top/index.html docs/examples/navbar-static-top/index.html docs/examples/navbar/index.html docs/examples/non-responsive/index.html docs/examples/offcanvas/index.html docs/examples/signin/index.html docs/examples/starter-template/index.html docs/examples/sticky-footer-navbar/index.html docs/examples/sticky-footer/index.html docs/examples/theme/index.html docs/examples/tooltip-viewport/index.html docs/getting-started.html docs/javascript.html docs/migration.html less/_animation.less less/_modal.less less/_navbar.less less/_variables.less less/glyphicons.less less/navs.less less/panels.less less/progress-bars.less
2014-10-27 01:31:59 -04:00
visibility: visible;
2013-07-07 00:51:47 -04:00
}
}
//
// Dropdowns
//
.nav-tabs .dropdown-menu {
// Make dropdown border overlap tab border
margin-top: -1px;
2012-11-03 19:14:44 -04:00
// Remove the top rounded corners here since there is a hard edge above the menu
2014-12-02 17:02:35 -05:00
@include border-top-radius(0);
}