123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882 |
- //
- // Navbars
- // --------------------------------------------------
- // Wrapper and base class
- //
- // Provide a static navbar from which we expand to create full-width, fixed, and
- // other navbar variations.
- .navbar {
- font-size: floor((@component-font-size-base * 1.067)); // ~16px
- min-height: @navbar-height-base;
- margin-bottom: @navbar-margin-bottom;
- border: none;
- border-radius: @navbar-border-radius;
- }
- // Navbar heading
- //
- // Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy
- // styling of responsive aspects.
- .navbar-header {
- @media (min-width: @grid-float-breakpoint) {
- float: left;
- }
- }
- // Navbar collapse (body)
- //
- // Group your navbar content into this for easy collapsing and expanding across
- // various device sizes. By default, this content is collapsed when <768px, but
- // will expand past that for a horizontal display.
- //
- // To start (on mobile devices) the navbar links, forms, and buttons are stacked
- // vertically and include a `max-height` to overflow in case you have too much
- // content for the user's viewport.
- .navbar-collapse {
- box-shadow: none;
- padding-right: 21px;
- padding-left: 21px;
- .navbar-form:first-child {
- border:none;
- }
- @media (min-width: @grid-float-breakpoint) {
- // Account for first and last children spacing
- .navbar-nav.navbar-left:first-child {
- margin-left: -21px;
- > li:first-child a {
- .border-left-radius(@navbar-border-radius);
- }
- }
- .navbar-nav.navbar-right:last-child {
- margin-right: -21px;
- > .dropdown:last-child > a {
- border-radius: 0 @navbar-border-radius @navbar-border-radius 0;
- }
- }
- .navbar-form.navbar-right:last-child {
- .navbar-fixed-top &,
- .navbar-fixed-bottom & {
- margin-right: 0;
- }
- }
- }
- @media (max-width: @grid-float-breakpoint-max) {
- .navbar-nav.navbar-right:last-child {
- margin-bottom: 3px;
- }
- }
- }
- // Both navbar header and collapse
- //
- // When a container is present, change the behavior of the header and collapse.
- .navbar {
- .container,
- .container-fluid {
- padding-left: 21px;
- padding-right: 21px;
- > .navbar-header,
- > .navbar-collapse {
- margin-right: -21px;
- margin-left: -21px;
- @media (min-width: @grid-float-breakpoint) {
- margin-right: 0;
- margin-left: 0;
- }
- }
- }
- }
- //
- // Navbar alignment options
- //
- // Display the navbar across the entirety of the page or fixed it to the top or
- // bottom of the page.
- // Static top (unfixed, but 100% wide) navbar
- .navbar-static-top {
- z-index: @zindex-navbar;
- border-width: 0;
- border-radius: 0;
- }
- // Fix the top/bottom navbars when screen real estate supports it
- .navbar-fixed-top,
- .navbar-fixed-bottom {
- z-index: @zindex-navbar-fixed;
- border-radius: 0;
- }
- .navbar-fixed-top {
- border-width: 0;
- }
- .navbar-fixed-bottom {
- margin-bottom: 0; // override .navbar defaults
- border-width: 0;
- }
- // Brand/project name
- .navbar-brand {
- font-size: floor((@component-font-size-base * 1.6)); // ~24px
- line-height: 1.042; // ~25px
- height: @navbar-height-base;
- font-weight: 700;
- padding: ((@navbar-height-base - 25px) / 2) 21px;
- > [class*="fui-"] {
- font-size: floor((@component-font-size-base * 1.267)); // ~19px
- line-height: 1.263; // ~24px
- vertical-align: top;
- }
- @media (min-width: @grid-float-breakpoint) {
- .navbar > .container &,
- .navbar > .container-fluid & {
- margin-left: -21px;
- }
- }
- }
- // Navbar toggle
- //
- // Custom button for toggling the `.navbar-collapse`, powered by the collapse
- // JavaScript plugin.
- .navbar-toggle {
- border: none;
- color: @brand-primary;
- margin: 0 0 0 21px;
- padding: 0 21px;
- height: @navbar-height-base;
- line-height: @navbar-height-base;
- &:before {
- color: @link-color;
- content: "\e61a";
- font-family: "Flat-UI-Icons";
- font-size: floor((@component-font-size-base * 1.467)); // ~22px
- font-style: normal;
- font-weight: normal;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- transition: color .25s linear;
- }
- &:hover,
- &:focus {
- outline: none;
- &:before {
- color: @link-hover-color;
- }
- }
- .icon-bar {
- display: none;
- }
- @media (min-width: @grid-float-breakpoint) {
- display: none;
- }
- }
- // Navbar nav links
- //
- // Builds on top of the `.nav` components with it's own modifier class to make
- // the nav the full height of the horizontal nav (above 768px).
- .navbar-nav {
- margin: 0;
- > li > a {
- font-size: floor((@component-font-size-base * 1.067)); // ~16px
- padding: ((@navbar-height-base - 23px) / 2) 21px;
- line-height: 23px;
- font-weight: 700;
- }
- > li > a:hover,
- > li > a:focus,
- .open > a:focus,
- .open > a:hover {
- background-color: transparent;
- }
- [class^="fui-"] {
- line-height: 20px;
- position: relative;
- top: 1px;
- }
- .visible-sm,
- .visible-xs {
- > [class^="fui-"] {
- margin-left: 12px;
- }
- }
- @media (max-width: @grid-float-breakpoint-max) {
- margin: 0 -21px;
- // Dropdowns get custom display when collapsed
- .open .dropdown-menu {
- > li > a,
- .dropdown-header {
- padding: 7px 15px 7px 31px !important;
- }
- > li > a {
- line-height: 23px;
- }
- }
- > li > a {
- padding-top: 7px;
- padding-bottom: 7px;
- }
- }
- }
- // Navbar form
- //
- // Extension of the `.form-inline` with some extra flavor for optimum display in
- // our navbars.
- .navbar-input {
- .input-size(@input-height-sm; 5px; 10px; @input-font-size-sm; @navbar-input-line-height);
- }
- .navbar-form {
- box-shadow: none;
- margin-top: 0;
- margin-bottom: 0;
- padding-right: 19px;
- padding-left: 19px;
- // Vertically center in expanded, horizontal navbar
- .navbar-vertical-align(@input-height-sm);
- @media (max-width: @grid-float-breakpoint-max) {
- margin: 3px -21px;
- width: auto;
- }
- // Controls sizing
- .form-control,
- .input-group-addon,
- .btn { .navbar-input(); }
- .btn {
- margin: 0;
- }
- // Reset rounded corners
- .form-controls-corners-reset();
- .form-control {
- font-size: @component-font-size-base;
- border-radius: 5px;
- display: table-cell;
- }
- .form-group ~ .btn {
- font-size: @component-font-size-base;
- border-radius: 5px;
- margin-left: 5px;
- }
- .form-group + .btn {
- margin-right: 5px;
- }
- @media (min-width: @grid-float-breakpoint) {
- .input-group { // Width fix for Webkit and IE11
- width: 195px;
- }
- }
- @media (max-width: @grid-float-breakpoint-max) {
- .form-group {
- margin-bottom: 7px;
- &:last-child {
- margin-bottom: 0;
- }
- }
- .form-group + .btn {
- margin-left: 0;
- }
- }
- }
- // Dropdown menus
- // Menu position and menu carets
- .navbar-nav > li {
- > .dropdown-menu {
- min-width: 100%;
- margin-top: 9px;
- border-radius: @border-radius-base;
- }
- &.open > .dropdown-menu {
- @media (max-width: @grid-float-breakpoint-max) {
- margin-top: 0 !important;
- }
- }
- }
- // Menu position and menu caret support for dropups via extra dropup class
- .navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
- .border-bottom-radius(@border-radius-base);
- }
- .navbar-nav > .open > .dropdown-toggle,
- .navbar-nav > .open > .dropdown-toggle:focus,
- .navbar-nav > .open > .dropdown-toggle:hover {
- background-color: transparent;
- }
- // Text in navbars
- //
- // Add a class to make any element properly align itself vertically within the navbars.
- .navbar-text {
- font-size: floor((@component-font-size-base * 1.067)); // ~16px
- line-height: 1.438; // ~23px
- color: @brand-primary;
- margin-top: 0;
- margin-bottom: 0;
- .navbar-vertical-align(23px, @navbar-height-base);
- @media (min-width: @grid-float-breakpoint) {
- margin-left: 21px;
- margin-right: 21px;
- // Outdent the form if last child to line up with content down the page
- &.navbar-right:last-child {
- margin-right: 0;
- }
- }
- }
- // Buttons in navbars
- //
- // Vertically center a button within a navbar (when *not* in a form).
- .navbar-btn {
- margin-top: ((@navbar-height-base - @input-height-base) / 2);
- margin-bottom: ((@navbar-height-base - @input-height-base) / 2);
- &.btn-sm {
- margin-top: ((@navbar-height-base - @input-height-sm) / 2);
- margin-bottom: (((@navbar-height-base - @input-height-sm) / 2) - 1);
- }
- &.btn-xs {
- margin-top: ((@navbar-height-base - 25) / 2);
- margin-bottom: ((@navbar-height-base - 25) / 2);
- }
- }
- // Unread icon
- //
- .navbar-unread,
- .navbar-new {
- font-family: @font-family-base;
- background-color: @brand-secondary;
- border-radius: 50%;
- color: @inverse;
- font-size: 0;
- font-weight: 700;
- height: 6px;
- line-height: 1;
- position: absolute;
- right: 12px;
- text-align: center;
- top: 35%;
- width: 6px;
- z-index: 10;
- @media (max-width: @grid-float-breakpoint) {
- position: static;
- float: right;
- margin: 0 0 0 10px;
- }
- .active & {
- background-color: @inverse;
- display: none;
- }
- }
- .navbar-new {
- background-color: @brand-danger;
- font-size: 12px;
- height: 18px;
- line-height: 17px;
- margin: -6px -10px;
- min-width: 18px;
- padding: 0 1px;
- width: auto;
- -webkit-font-smoothing: subpixel-antialiased;
- }
- // Alternate navbars
- // --------------------------------------------------
- // Default navbar
- .navbar-default {
- background-color: @navbar-default-bg;
- .navbar-brand {
- color: @navbar-default-brand-color;
- &:hover,
- &:focus {
- color: @navbar-default-brand-hover-color;
- background-color: @navbar-default-brand-hover-bg;
- }
- }
- .navbar-toggle {
- &:before {
- color: @navbar-default-toggle-color;
- }
- &:hover,
- &:focus {
- background-color: transparent;
- &:before {
- color: @navbar-default-toggle-hover-color;
- }
- }
- }
- .navbar-collapse,
- .navbar-form {
- border-color: @navbar-default-form-border;
- border-width: 2px;
- }
- .navbar-nav {
- > li > a {
- color: @navbar-default-link-color;
- &:hover,
- &:focus {
- color: @navbar-default-link-hover-color;
- background-color: @navbar-default-link-hover-bg;
- }
- }
- > .active > a {
- &,
- &:hover,
- &:focus {
- color: @navbar-default-link-active-color;
- background-color: @navbar-default-link-active-bg;
- }
- }
- > .disabled > a {
- &,
- &:hover,
- &:focus {
- color: @navbar-default-link-disabled-color;
- background-color: @navbar-default-link-disabled-bg;
- }
- }
- }
- // Dropdown menu items and carets
- .navbar-nav {
- // Caret text color
- > .dropdown > a .caret {
- border-top-color: @navbar-default-caret-color;
- border-bottom-color: @navbar-default-caret-color;
- }
- // Caret should match text color on active
- > .active > a .caret {
- border-top-color: @navbar-default-caret-active-color;
- border-bottom-color: @navbar-default-caret-active-color;
- }
- // Caret should match text color on hover
- > .dropdown > a:hover .caret,
- > .dropdown > a:focus .caret {
- border-top-color: @navbar-default-caret-hover-color;
- border-bottom-color: @navbar-default-caret-hover-color;
- }
- // Remove background color from open dropdown
- > .open > a {
- &,
- &:hover,
- &:focus {
- background-color: @navbar-default-link-active-bg;
- color: @navbar-default-link-active-color;
- .caret {
- border-top-color: @navbar-default-caret-active-color;
- border-bottom-color: @navbar-default-caret-active-color;
- }
- }
- }
- @media (max-width: @grid-float-breakpoint-max) {
- // Dropdowns get custom display when collapsed
- .open .dropdown-menu {
- > li > a {
- color: @navbar-default-link-color;
- &:hover,
- &:focus {
- color: @navbar-default-link-hover-color;
- background-color: @navbar-default-link-hover-bg;
- }
- }
- > .active > a {
- &,
- &:hover,
- &:focus {
- color: @navbar-default-link-active-color;
- background-color: @navbar-default-link-active-bg;
- }
- }
- > .disabled > a {
- &,
- &:hover,
- &:focus {
- color: @navbar-default-link-disabled-color;
- background-color: @navbar-default-link-disabled-bg;
- }
- }
- }
- }
- }
- .navbar-form {
- .form-control {
- border-color: transparent;
- .placeholder(@navbar-default-form-placeholder);
- &:focus {
- border-color: @brand-secondary;
- color: @brand-secondary;
- }
- }
- .input-group-btn .btn {
- border-color: transparent;
- color: @navbar-default-form-icon;
- }
- .input-group.focus {
- .form-control,
- .input-group-btn .btn {
- border-color: @brand-secondary;
- color: @brand-secondary;
- }
- }
- }
- .navbar-text {
- color: @brand-primary;
- }
- // Links in navbars
- //
- // Add a class to ensure links outside the navbar nav are colored correctly.
- .navbar-link {
- color: @navbar-default-link-color;
- &:hover {
- color: @navbar-default-link-hover-color;
- }
- }
- .btn-link {
- color: @navbar-default-link-color;
- &:hover,
- &:focus {
- color: @navbar-default-link-hover-color;
- }
- &[disabled],
- fieldset[disabled] & {
- &:hover,
- &:focus {
- color: @navbar-default-link-disabled-color;
- }
- }
- }
- }
- // Inverse navbar
- .navbar-inverse {
- background-color: @navbar-inverse-bg;
- .navbar-brand {
- color: @navbar-inverse-brand-color;
- &:hover,
- &:focus {
- color: @navbar-inverse-brand-hover-color;
- background-color: @navbar-inverse-brand-hover-bg;
- }
- }
- .navbar-toggle {
- &:before {
- color: @navbar-inverse-toggle-color;
- }
- &:hover,
- &:focus {
- background-color: transparent;
- &:before {
- color: @navbar-inverse-toggle-hover-color;
- }
- }
- }
- .navbar-collapse {
- border-color: @navbar-inverse-form-border;
- border-width: 2px;
- }
- .navbar-nav {
- > li > a {
- color: @navbar-inverse-link-color;
- &:hover,
- &:focus {
- color: @navbar-inverse-link-hover-color;
- background-color: @navbar-inverse-link-hover-bg;
- }
- }
- > .active > a {
- &,
- &:hover,
- &:focus {
- color: @navbar-inverse-link-active-color;
- background-color: @navbar-inverse-link-active-bg;
- }
- }
- > .disabled > a {
- &,
- &:hover,
- &:focus {
- color: @navbar-inverse-link-disabled-color;
- background-color: @navbar-inverse-link-disabled-bg;
- }
- }
- }
- // Dropdown menu items and carets
- .navbar-nav {
- // Caret should match text color on hover
- > .dropdown > a:hover .caret,
- > .dropdown > a:focus .caret {
- border-top-color: @navbar-inverse-caret-hover-color;
- border-bottom-color: @navbar-inverse-caret-hover-color;
- }
- // Remove background color from open dropdown
- > .open > a {
- &,
- &:hover,
- &:focus {
- background-color: @navbar-inverse-link-active-bg;
- color: @navbar-inverse-link-active-color;
- border-left-color: transparent;
- .caret {
- border-top-color: @navbar-inverse-link-active-color;
- border-bottom-color: @navbar-inverse-link-active-color;
- }
- }
- }
- > .dropdown > a .caret {
- border-top-color: @navbar-inverse-caret-color;
- border-bottom-color: @navbar-inverse-caret-color;
- }
- > .open {
- > .dropdown-menu {
- background-color: @navbar-inverse-dropdown-bg;
- padding: 3px 4px;
- > li > a {
- color: @navbar-inverse-dropdown-link-color;
- border-radius: @border-radius-base;
- padding: 6px 9px;
- &:hover,
- &:focus {
- color: @navbar-inverse-dropdown-link-hover-color;
- background-color: @navbar-inverse-dropdown-link-hover-bg;
- }
- }
- > .divider {
- background-color: @navbar-inverse-divider;
- height: 2px;
- margin-left: -4px;
- margin-right: -4px;
- }
- }
- }
- @media (max-width: @grid-float-breakpoint-max) {
- > li > a {
- border-left-width: 0;
- }
- // Dropdowns get custom display when collapsed
- .open .dropdown-menu {
- > li > a {
- color: @navbar-inverse-link-color;
- &:hover,
- &:focus {
- color: @navbar-inverse-link-hover-color;
- background-color: @navbar-inverse-link-hover-bg;
- }
- }
- > .active > a {
- &,
- &:hover,
- &:focus {
- color: @navbar-inverse-link-active-color;
- background-color: @navbar-inverse-link-active-bg;
- }
- }
- > .disabled > a {
- &,
- &:hover,
- &:focus {
- color: @navbar-inverse-link-disabled-color;
- background-color: @navbar-inverse-link-disabled-bg;
- }
- }
- }
- // Custom background for dividers when collapsed
- .dropdown-menu .divider {
- background-color: @navbar-inverse-divider;
- }
- }
- }
- .navbar-form {
- .form-control {
- color: @navbar-inverse-form-placeholder;
- border-color: transparent;
- background-color: @navbar-inverse-form-bg;
- .placeholder(@navbar-inverse-form-placeholder);
- &:focus {
- border-color: @brand-secondary;
- color: @brand-secondary;
- }
- }
- .btn {
- .button-variant(@btn-default-color, @brand-secondary, @btn-primary-hover-bg, @btn-primary-active-bg);
- }
- .input-group-btn .btn {
- border-color: transparent;
- background-color: @navbar-inverse-form-bg;
- color: @navbar-inverse-form-icon;
- }
- .input-group.focus {
- .form-control,
- .input-group-btn .btn {
- border-color: @brand-secondary;
- color: @brand-secondary;
- }
- }
- @media (max-width: @grid-float-breakpoint-max) {
- border-color: @navbar-inverse-form-border;
- border-width: 2px 0;
- }
- }
- .navbar-text {
- color: @inverse;
- a {
- color: @navbar-inverse-link-color;
- &:hover,
- &:focus {
- color: @navbar-inverse-link-hover-color;
- }
- }
- }
- .navbar-btn {
- .button-variant(@btn-default-color, @brand-secondary, @btn-primary-hover-bg, @btn-primary-active-bg);
- }
- }
- // Embossed navbar
- .navbar-embossed {
- @media (min-width: @grid-float-breakpoint) {
- > .navbar-collapse {
- border-radius: @navbar-border-radius;
- box-shadow: inset 0 -2px 0 fade(black, 15%);
- }
- &.navbar-inverse .navbar-nav {
- .active > a,
- .open > a {
- box-shadow: inset 0 -2px 0 fade(black, 15%);
- }
- }
- }
- }
- // Large navbar
- .navbar-lg {
- min-height: @navbar-height-large;
- .navbar-brand {
- line-height: 1;
- height: @navbar-height-large;
- padding-top: ((@navbar-height-large - 24px) / 2);
- padding-bottom: ((@navbar-height-large - 24px) / 2);
- > [class*="fui-"] {
- font-size: floor((@component-font-size-base * 1.6)); // ~24px
- line-height: 1;
- }
- }
- .navbar-nav {
- > li > a {
- font-size: @component-font-size-base;
- line-height: 1.6;
- @media (min-width: @grid-float-breakpoint) {
- padding-top: ((@navbar-height-large - 24px) / 2);
- padding-bottom: ((@navbar-height-large - 24px) / 2);
- }
- }
- }
- .navbar-toggle {
- height: @navbar-height-large;
- line-height: @navbar-height-large;
- }
- .navbar-form {
- .navbar-vertical-align(@input-height-sm; @navbar-height-large);
- }
- .navbar-text {
- .navbar-vertical-align(23px; @navbar-height-large);
- }
- .navbar-btn {
- margin-top: ((@navbar-height-large - @input-height-base) / 2);
- margin-bottom: ((@navbar-height-large - @input-height-base) / 2);
- &.btn-sm {
- margin-top: ((@navbar-height-large - @input-height-sm) / 2);
- margin-bottom: ((@navbar-height-large - @input-height-sm) / 2);
- }
- &.btn-xs {
- margin-top: ((@navbar-height-large - 25px) / 2);
- margin-bottom: ((@navbar-height-large - 25px) / 2);
- }
- }
- }
|