mirror of https://github.com/ColorlibHQ/AdminLTE
Updated control sidebar to get rid of the need for javascript to keep up with its height
parent
9a122a39d6
commit
a00ab59882
|
@ -1,32 +1,50 @@
|
||||||
/*
|
/*
|
||||||
* Component: Control sidebar. By deafult, this is the right sidebar.
|
* Component: Control sidebar. By deafult, this is the right sidebar.
|
||||||
*/
|
*/
|
||||||
|
//The sidebar's backhround control class
|
||||||
|
//This is a hack to make the background visible while scrolling
|
||||||
|
.control-sidebar-bg {
|
||||||
|
position: fixed;
|
||||||
|
z-index: 900;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
width: @control-sidebar-width;
|
||||||
|
background: @sidebar-dark-bg;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Transitions
|
||||||
|
.control-sidebar-bg,
|
||||||
.control-sidebar {
|
.control-sidebar {
|
||||||
.translate(@control-sidebar-width, 0);
|
.translate(@control-sidebar-width, 0);
|
||||||
.transition-transform(@transition-speed ease-in-out);
|
.transition-transform(@transition-speed ease-in-out);
|
||||||
|
}
|
||||||
|
.control-sidebar {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: @navbar-height;
|
top: @navbar-height;
|
||||||
right: 0;
|
right: 0;
|
||||||
width: @control-sidebar-width;
|
width: @control-sidebar-width;
|
||||||
z-index: 1010;
|
z-index: 1010;
|
||||||
background: @sidebar-dark-bg;
|
|
||||||
color: @sidebar-dark-color;
|
color: @sidebar-dark-color;
|
||||||
//Make it hide in small screens
|
//Fix position after header collapse
|
||||||
@media (max-width: @screen-sm) {
|
@media (max-width: @screen-sm) {
|
||||||
top: @navbar-height + 50;
|
top: @navbar-height + 50;
|
||||||
//.translate(@control-sidebar-width, 0);
|
|
||||||
}
|
}
|
||||||
//Tab panes
|
//Tab panes
|
||||||
> .tab-content {
|
> .tab-content {
|
||||||
padding: 10px 15px;
|
padding: 10px 15px;
|
||||||
}
|
}
|
||||||
//Open state
|
//Open state with slide over content effect
|
||||||
&.control-sidebar-open {
|
&.control-sidebar-open {
|
||||||
|
&,
|
||||||
|
+ .control-sidebar-bg {
|
||||||
.translate(0, 0);
|
.translate(0, 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//Open without silde over content
|
//Open without silde over content
|
||||||
.control-sidebar-open {
|
.control-sidebar-open {
|
||||||
|
.control-sidebar-bg,
|
||||||
.control-sidebar {
|
.control-sidebar {
|
||||||
.translate(0,0);
|
.translate(0,0);
|
||||||
}
|
}
|
||||||
|
@ -37,6 +55,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Control sidebar tabs
|
//Control sidebar tabs
|
||||||
.control-sidebar-tabs {
|
.control-sidebar-tabs {
|
||||||
border-bottom: darken(@sidebar-dark-bg, 3%);
|
border-bottom: darken(@sidebar-dark-bg, 3%);
|
||||||
|
|
|
@ -82,7 +82,7 @@ body {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
color: #444;
|
color: #444;
|
||||||
border-top: 1px solid #eee;
|
border-top: 1px solid @gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fixed layout */
|
/* Fixed layout */
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
> .image > img {
|
> .image > img {
|
||||||
width: 45px;
|
width: 45px;
|
||||||
height: 45px;
|
height: 45px;
|
||||||
|
max-width: 100%!important;
|
||||||
}
|
}
|
||||||
> .info {
|
> .info {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
|
|
@ -51,5 +51,5 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
//Create the sidebar skin
|
//Create the sidebar skin
|
||||||
.skin-dark-sidebar(@purple);
|
.skin-light-sidebar(@purple);
|
||||||
}
|
}
|
|
@ -51,5 +51,5 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
//Create the sidebar skin
|
//Create the sidebar skin
|
||||||
.skin-dark-sidebar(@red);
|
.skin-light-sidebar(@red);
|
||||||
}
|
}
|
|
@ -51,5 +51,5 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
//Create the sidebar skin
|
//Create the sidebar skin
|
||||||
.skin-dark-sidebar(@yellow);
|
.skin-light-sidebar(@yellow);
|
||||||
}
|
}
|
Loading…
Reference in New Issue