diff options
| author | Mark Otto <[email protected]> | 2014-08-04 15:36:41 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2014-08-04 15:36:41 -0700 |
| commit | af0921062fd6deb16d3406ab5e2489f3c69793d9 (patch) | |
| tree | c0e99625dceaed5bd24b12a66b13a242c57995dd /less/_nav.less | |
| parent | ef9e76c2c5fc587e8d5df043e1a0967c1f9de658 (diff) | |
| download | bootstrap-af0921062fd6deb16d3406ab5e2489f3c69793d9.tar.xz bootstrap-af0921062fd6deb16d3406ab5e2489f3c69793d9.zip | |
rename imported files to preface with underscore; rerun grunt dist
Diffstat (limited to 'less/_nav.less')
| -rw-r--r-- | less/_nav.less | 166 |
1 files changed, 166 insertions, 0 deletions
diff --git a/less/_nav.less b/less/_nav.less new file mode 100644 index 000000000..07c319ab7 --- /dev/null +++ b/less/_nav.less @@ -0,0 +1,166 @@ +// +// 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: not-allowed; + } + } +} + + +// +// 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; + } + > .active { + display: block; + } +} + + +// +// 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); +} |
