AdminLTE/build/less/sidebar-mini.less

142 lines
3.3 KiB
Plaintext
Raw Normal View History

2015-03-23 01:16:06 +00:00
/*
* Component: Sidebar Mini
*/
//Add sidebar-mini class to the body tag to activate this feature
.sidebar-mini {
//Sidebar mini should work only on devices larger than @screen-sm
@media (min-width: @screen-sm) {
2015-03-25 23:00:53 +00:00
//When the sidebar is collapsed...
2015-03-23 01:16:06 +00:00
&.sidebar-collapse {
//Apply the new margining to the main content and footer
.content-wrapper,
.right-side,
.main-footer {
2015-09-19 18:05:54 +00:00
margin-left: 50px !important;
2015-03-23 01:16:06 +00:00
z-index: 840;
}
2015-04-22 21:13:31 +00:00
//Modify the sidebar to shrink instead of disappearing
2015-03-23 01:16:06 +00:00
.main-sidebar {
//Don't go away! Just shrink
.translate(0, 0);
2015-09-19 18:05:54 +00:00
width: 50px !important;
2015-03-23 01:16:06 +00:00
z-index: 850;
}
2015-03-25 23:00:53 +00:00
2015-03-23 01:16:06 +00:00
.sidebar-menu {
> li {
position: relative;
> a {
2015-07-12 13:42:26 +00:00
margin-right: 0;
2015-03-23 01:16:06 +00:00
}
> a > span {
border-top-right-radius: 4px;
}
2015-03-25 23:00:53 +00:00
2015-03-23 01:16:06 +00:00
&:not(.treeview) {
> a > span {
border-bottom-right-radius: 4px;
}
}
2015-03-25 23:00:53 +00:00
2015-03-23 01:16:06 +00:00
> .treeview-menu {
//Add some padding to the treeview menu
padding-top: 5px;
padding-bottom: 5px;
border-bottom-right-radius: 4px;
}
//Show menu items on hover
&:hover {
2015-04-09 23:19:23 +00:00
> a {
2015-05-05 02:00:20 +00:00
//overflow: visible;
2015-04-09 23:19:23 +00:00
}
2015-03-23 01:16:06 +00:00
> a > span:not(.pull-right),
2015-09-19 18:05:54 +00:00
> .treeview-menu {
display: block !important;
2015-03-23 01:16:06 +00:00
position: absolute;
width: @sidebar-width - 50;
left: 50px;
}
2015-03-25 23:00:53 +00:00
2015-03-23 01:16:06 +00:00
//position the header & treeview menus
> a > span {
top: 0;
2015-04-09 22:52:51 +00:00
margin-left: -3px;
2015-03-23 01:16:06 +00:00
padding: 12px 5px 12px 20px;
background-color: inherit;
}
> .treeview-menu {
top: 44px;
margin-left: 0;
}
}
}
}
2015-04-22 21:13:31 +00:00
//Make the sidebar links, menus, labels, badges
2015-04-09 22:52:51 +00:00
//and angle icons disappear
.main-sidebar .user-panel > .info,
.sidebar-form,
.sidebar-menu > li > a > span,
.sidebar-menu > li > .treeview-menu,
2015-09-19 18:05:54 +00:00
.sidebar-menu > li > a > .pull-right,
2015-04-09 22:52:51 +00:00
.sidebar-menu li.header {
2015-09-19 18:05:54 +00:00
display: none !important;
-webkit-transform: translateZ(0);
2015-03-23 01:16:06 +00:00
}
2015-03-25 23:00:53 +00:00
.main-header {
2015-04-22 21:13:31 +00:00
//Let's make the logo also shrink and the mini logo to appear
2015-03-25 23:00:53 +00:00
.logo {
width: 50px;
> .logo-mini {
display: block;
margin-left: -15px;
margin-right: -15px;
font-size: 18px;
}
> .logo-lg {
display: none;
}
}
2015-04-09 22:52:51 +00:00
//Since the logo got smaller, we need to fix the navbar's position
2015-03-25 23:00:53 +00:00
.navbar {
margin-left: 50px;
}
}
2015-03-23 01:16:06 +00:00
}
}
2015-04-09 22:52:51 +00:00
}
//A fix for text overflow while transitioning from sidebar mini to full sidebar
2015-05-05 02:00:20 +00:00
.sidebar-menu,
2015-04-09 22:52:51 +00:00
.main-sidebar .user-panel,
2015-04-09 23:19:23 +00:00
.sidebar-menu > li.header {
2015-07-21 02:36:04 +00:00
white-space: nowrap;
2015-04-09 23:19:23 +00:00
overflow: hidden;
2015-04-09 22:52:51 +00:00
}
2015-09-19 18:05:54 +00:00
2015-05-05 02:00:20 +00:00
.sidebar-menu:hover {
overflow: visible;
}
2015-09-19 18:05:54 +00:00
2015-04-09 23:19:23 +00:00
.sidebar-form,
2015-04-09 22:52:51 +00:00
.sidebar-menu > li.header {
overflow: hidden;
text-overflow: clip;
}
2015-09-19 18:05:54 +00:00
2015-04-09 22:52:51 +00:00
.sidebar-menu li > a {
position: relative;
> .pull-right-container {
2015-10-23 14:48:01 +00:00
position: absolute;
right: 10px;
top: 50%;
margin-top: -7px;
2015-04-09 22:52:51 +00:00
}
2015-07-12 13:42:26 +00:00
}