compact.less
1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
.enable_compact_menu() when (@enable-compact-menu = true) {
@media (min-width: @screen-hover-menu) {
.sidebar.compact {
&, &.navbar-collapse {
width: @sidebar-compact-width;
}
.sidebar-shortcuts {
max-height: @breadcrumb-height - 1;//40px
}
.nav-list > li {
&:before {
height: auto;
bottom: -1px;
}
}
.nav-list > li > a {
height: auto;
line-height: 16px;
padding: 2px 0 8px;
text-align: center;
> .menu-icon {
display: block;
margin : 0;
vertical-align: inherit;
line-height: 32px;
height: 32px;
font-size: @nav-item-icon-size + 2;
}
> .arrow {
display: none;
}
}
.nav-list a {
.badge , .label {
right: 12px;
}
}
.nav-list > li.active > .submenu , .nav-list > li.open > .submenu {
display: none;
}
+ .main-content {
margin-left: @sidebar-compact-width;
}
}
}
//reset .compact styles for small screens with .navbar-collapse
.enable_collapsible_responsive_compact_menu() when (@enable-collapsible-responsive-menu = true) {
@media (min-width: @screen-compact-menu) and (max-width: @grid-float-breakpoint-max) {
.sidebar.compact + .main-content {
margin-left: 0;
}
.sidebar.navbar-collapse {
&.compact {
.nav-list > li > a {
text-align: left;
height: @nav-item-height;
line-height: (@nav-item-height - 2);
padding: 0 16px 0 7px;
> .menu-icon {
display: inline-block;
vertical-align: sub;
height: auto;
line-height: inherit;
margin: 0 2px 0 0;
font-size: @nav-item-icon-size;
}
> .menu-text {
display: inline;
}
> .arrow {
display: inline;
}
}
+ .main-content {
margin-left: 0;
}
}
}
}//@media
}
.enable_collapsible_responsive_compact_menu();
}
.enable_compact_menu();