123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568 |
- //side menu styling
- //some sidebar variables
- @sidebar-background: #F2F2F2;
- @sidebar-border: #CCC;
- @nav-item-color: #585858;
- @nav-item-background: #F8F8F8;
- @nav-item-border: #E5E5E5;
- @nav-item-color-hover: mix(#4B88B7 , @nav-item-color-focus , 25%);
- @nav-item-background-hover: #FFF;
- @nav-item-background-open: #FAFAFA;
- @nav-item-color-active: #2B7DBC;//#0B6CBC;
- @nav-item-background-active: #FFF;
- @nav-item-color-focus: #1963AA;
- @nav-item-icon-width: 30px;
- @nav-item-hover-indicator: #629CC9;
- @nav-item-arrow-color: #777;
- @nav-item-arrow-color-active: #4B88B7;
- @submenu-border: @nav-item-border;
- @submenu-background: #FFF;
- @submenu-item-background: #FFF;
- @submenu-item-color: #616161;
- @submenu-item-border: #E4E4E4;
- @submenu-item-icon-size: 18px;
- @submenu-item-color-hover: #4B88B7;
- @submenu-item-background-hover: #F1F5F9;
- @submenu-item-icon-active: #C86139;
- @submenu-item-background-active: #F5F7FA;
- @submenu-border-active: #83B6D1;
- @3rd-level-item-background-hover: @submenu-item-background-hover;
- @3rd-level-item-color-hover: @submenu-item-color-hover;
- @submenu-tree-line-style: dotted;
- @submenu-tree-line-color: mix(#BCCFE0 , #7EAACB);
- @submenu-tree-line-color-active: mix(mix(#BCCFE0 , #7EAACB) , #7EAACB);
- @menumin-text-background: #F5F5F5;
- @menumin-border: #CCC;
- @menumin-shadow1:~"2px 1px 2px 0 rgba(0,0,0,0.1)";//!ignore
- @menumin-shadow2:~"2px 2px 2px 0 rgba(0,0,0,0.1)";//!ignore
- @sidebar-toggle-background: #F3F3F3;
- @sidebar-toggle-border: #E0E0E0;
- @sidebar-toggle-icon-color: #AAA;
- @sidebar-toggle-icon-border: #BBB;
- @sidebar-toggle-icon-background: #FFF;
- @shortcuts-background: #FAFAFA;
- @shortcuts-border: #DDD;
- @hover-submenu-border: @menumin-border;
- @zindex-sidebar-fixed: @zindex-navbar-fixed - 3;
- @zindex-breadcrumbs-fixed: @zindex-sidebar-fixed - 3;//so that .sidebar-shortcuts appears above breadcrumbs.
- @zindex-submenu: @zindex-sidebar-fixed - 1;
- .sidebar {
- width: @sidebar-width;
- float: left;
- position: static;
- //why not simply position:absolute?
- //because we need the page height to be at least as high as the sidebar in case the page content is too small
- padding-left: 0;//override .nav-collapse
- padding-right: 0;
- //the grey background of sidebar
- &:before {
- content: "";
- display: block;
- width: inherit;
- position: absolute;//the relative parent is "html" element
- top: 0;
- bottom: 0;
- z-index: -1;
- background-color: inherit;
- border-style: inherit;
- border-color: inherit;
- border-width: inherit;
- }
- }
- //side navigation
- /**li .@{icon} {
- & , .nav-list & {
- width: auto;
- }
- }*/
- .nav-list {
- margin: 0;
- padding: 0;
- list-style: none;
-
- > li , > li > a , .nav-header {
- margin: 0;
- }
- li > a:focus {
- outline: none;
- }
- }
- .nav-list > li {
- display: block;
- position: relative;
- float: none;
- padding: 0;
- border-style: solid;
- border-width: 1px 0 0;
- &:last-child {
- border-bottom-width: 1px;
- }
- &.active > a {
- font-weight: bold;
- }
- /////////
- > a {
- display: block;
- height: @nav-item-height;
- line-height: floor(@nav-item-height / 2) - 2;
- padding-left: 7px;
- text-shadow: none !important;
- font-size: @nav-item-font-size;
- text-decoration: none;
- > .menu-icon {
- display: inline-block;
- min-width: @nav-item-icon-width;
- margin-right: 2px;
- vertical-align: sub;
- text-align: center;
- font-size: @nav-item-icon-size;
- font-weight: normal;
- }
- }
- //the blue hover border on left
- &:before {
- display: none;
- content: "";
- position: absolute;
- top: -1px;
- left: 0;
- z-index: 1;
- height: @nav-item-height + 2;
- width: 3px;
- max-width: 3px;
- overflow: hidden;
- background-color: @nav-item-hover-indicator;
-
- @media only screen and (min-width: @grid-float-breakpoint) {
- .main-container.container .sidebar:not(.h-sidebar) & {
- left: -2px;
- }
- }
- .main-container.container .sidebar.sidebar-fixed:not(.h-sidebar) & {
- //.main-container.container .sidebar.sidebar-scroll:not(.h-sidebar) & {
- left: 0;
- }
- }
- &:hover:before {
- display: block;
- }
- // the submenu indicator arrow
- a > .arrow {
- display: block;
- width: 14px !important;
- height: 14px;
- line-height: 14px;
-
- text-shadow: none;
- font-size: @nav-item-arrow-size;
- position: absolute;
- right: 10px;
- top: floor(@nav-item-height / 3) - 1;
- padding: 0;
- text-align: center;
- }
- &.separator {
- height: 3px;
- background-color: transparent;
- position: static;
- margin: 1px 0;
- .box-shadow(none);
- }
- //submenu
- &.active .submenu {
- display: block;
- }
-
-
- .submenu {
- display: none;
- list-style: none;
- margin: 0;
- padding: 0;
- line-height: 1.5;
- position: relative;
- > li {
- margin-left: 0;
- position: relative;
- > a {
- display: block;
- position: relative;
- padding: 7px 0 9px 37px;
- margin: 0;
- border-top-width: 1px;
- border-top-style: dotted;
- &:hover {
- text-decoration: none;
- }
- }
- //optional icon before each item
- a > .menu-icon {
- display: none;
- font-size: @font-size-submenu-item-icon;
- font-weight: normal;
- width: @submenu-item-icon-size;
- height: auto;
- line-height: 12px;
- text-align: center;
-
- position: absolute;
- left: 10px;
- top: 11px;
- z-index: 1;
- background-color: inherit;
- }
- &.active, &:hover {
- > a > .menu-icon {
- //show the icon on hover or when active
- display: inline-block;
- }
- }
- }// > li
- }//end of submenu
- //first level submenu
- > .submenu {
- border-top: 1px solid;
- > li {
- //tree like menu
- &:before {
- //the horizontal line
- content: "";
- display: block;
- width: 7px;
-
- position: absolute;
- z-index: 1;
- left: 20px;
- top: 17px;
- border: 1px @submenu-tree-line-style;
- border-width: 1px 0 0;
- }
- }
- //the vertical tree line
- &:before {
- content: "";
- display: block;
- position: absolute;
- z-index: 1;
- left: 18px;
- top: 0;
- bottom: 0;
- border: 1px @submenu-tree-line-style;
- border-width: 0 0 0 1px;
- }
- }
- }//end of .nav-list > li
- .nav-list li {
- &:hover > a > .arrow , &.active > a > .arrow , &.open > a > .arrow {
- color: inherit;
- }
- }
- .nav-list li.open > .submenu {
- display: block;
- }
- //override opera only
- no_such_element:-o-prefocus, .nav-list > li > a > .menu-icon {
- vertical-align: middle;
- }
- .3rd_level_icon() {
- display: inline-block;
- //font-size: @font-size-submenu-3rd-level-icon;
- //color: inherit;
- width: auto;
- position: static;
- background-color: transparent;
- margin-right: 4px;
- }
- //3rd & 4th level menu
- .nav-list > li > .submenu {
- li > .submenu {
- display: none;
- }
- li.active > .submenu {
- display: block;
- }
- a > .arrow {
- right: 10px;
- top: 10px;
- font-size: floor(@nav-item-arrow-size * 0.9);
- }
- > li:first-child > a {
- border-top-width: 0;
- }
- li > .submenu > li {
- line-height: 18px;
- &:before {
- //hide the tree like menu
- display: none;
- }
- > a {
- //3rd level
- margin-left: 20px;
- padding-left: 22px;
- }
- > .submenu > li > a {
- //4th level
- margin-left: 20px;
- padding-left: 38px;
- }
- a > .menu-icon {
- .3rd_level_icon();
- color: inherit;
- }
- a {
- //font-size: @base-font-size;
- .menu-icon , .arrow {
- color: inherit;
- }
- }
- }
- li.open:not(.hover) > a {
- > .menu-icon {
- display: inline-block;
- }
- }
- }//.nav-list > li > .submenu
- //labels and badges inside nav item
- .nav-list a {
- .badge , .label {
- position: absolute;
- top: 9px;
- right: 10px;
- opacity: 0.88;
- font-size: @base-font-size - 1;
- padding-left: 6px;
- padding-right: 6px;
- .@{icon} {
- vertical-align: middle;
- margin: 0;
- }
- }
- &.dropdown-toggle {
- .badge , .label {
- right: 26px;//move lefter because of .arrow
- }
- }
- }
- .nav-list li:hover > a {
- .badge , .label {
- opacity: 1;
- }
- }
- .nav-list .submenu .submenu a {
- .badge , .label {
- top: 6px;
- }
- }
- //shortcut buttons and sidebar toggle
- @import "sidebar/sidebar-fixed.less";
- //shortcut buttons and sidebar toggle
- @import "sidebar/shortcuts-toggle.less";
- //sidebar active state arrows , etc
- @import "sidebar/active.less";
- //submenu compact
- @import "sidebar/compact.less";
- //submenu hover style
- @import "sidebar/hover.less";
- @import "sidebar/sub-arrow.less";
- //minimized sidebar mode
- @import "sidebar/min.less";
- //horizontal sidebar style
- @import "sidebar/horizontal.less";
- //sidebar responsive styles
- @import "sidebar/responsive-1.less";//default
- @import "sidebar/old-toggle-button.less";//old style toggle button
- @import "sidebar/responsive-2.less";//like minimized sidebar
- @import "sidebar/responsive-3.less";//bootstrap style
- @import "sidebar/multiple.less";//when 2 sidebars are used!
- .sidebar-scroll {
- .sidebar-shortcuts {
- min-height: @breadcrumb-height;
- border-bottom: 1px solid;
- }
- .sidebar-toggle {
- border-top: 1px solid;
- }
- .nav-list > li:first-child {
- border-top-width: 0;
- }
- .nav-list > li:last-child {
- border-bottom-width: 0;
- }
-
- .nav-wrap {
- .sidebar-shortcuts {
- min-height: @breadcrumb-height - 1;
- border-bottom-width: 0;
-
- + .nav-list > li:first-child , + .nav-wrap-up .nav-list > li:first-child {
- border-top-width: 1px;
- }
- }
- }
- .nav-wrap-t {
- .sidebar-toggle {
- border-top-width: 0;
- }
- .nav-list > li:last-child {
- border-bottom-width: 1px;
- }
- }
- }
- .sidebar {
- .nav-wrap + .ace-scroll {
- position: absolute;
- right: 0;
- top: 0;
- z-index: 1;
- }
- .nav-wrap + .scrollout {
- right: -8px;
- }
- }
- .sidebar .submenu.sub-scroll {
- overflow-y: scroll;
- overflow-x: hidden;
- -webkit-overflow-scrolling: touch;
- //-webkit-transform: translate3d(0,0,0);
- }
|