1
0
mirror of https://github.com/tabler/tabler.git synced 2026-08-01 16:04:37 +04:00

sidenav init

This commit is contained in:
chomik
2019-04-17 09:53:21 +02:00
parent efb3e214ad
commit fe1f189b89
3 changed files with 13 additions and 130 deletions
+5 -116
View File
@@ -1,120 +1,9 @@
$sidenav-width: 16rem;
$sidenav-folder-width: 4rem;
@mixin sidenav-folded {
flex: 0 0 $sidenav-folder-width;
width: $sidenav-folder-width;
.sidenav-title {
display: none;
}
.sidenav-link {
position: relative;
padding: .75rem 1rem;
font-size: 12px;
text-align: center;
.badge {
position: absolute;
top: .5rem;
right: .75rem;
}
}
.sidenav-submenu {
display: none;
}
.sidenav-link-description {
display: none;
}
.sidenav-icon {
display: block;
width: 1.25rem;
height: 1.25rem;
margin: 0 auto;
stroke-width: 1;
}
}
.sidenav {
flex: 0 0 $sidenav-width;
width: $sidenav-width;
background: #fff;
border-right: 1px solid $border-color;
//background: mix(#fff, $dark, 8%);
//color: #fff;
@include media-breakpoint-down(md) {
display: none;
}
@include media-breakpoint-between(md, lg) {
@include sidenav-folded;
}
body.sidebar-folded & {
@include sidenav-folded;
}
background: $dark;
width: 16rem;
outline: 1px solid red;
}
.sidenav-title {
display: block;
padding: 25px 30px 20px;
font-size: 1.125rem;
font-weight: 500;
line-height: 1;
color: #3e3f42;
}
.sidenav-subtitle {
padding: .5rem 1.5rem;
margin: 1rem 0 0;
font-size: 13px;
font-weight: 600;
color: $text-muted;
text-transform: uppercase;
}
.sidenav-menu,
.sidenav-submenu {
padding: 0;
margin: 0;
list-style: none;
}
.sidenav-submenu {
display: none;
padding-left: 1.5rem;
}
.sidenav-link {
display: flex;
align-items: center;
padding: .75rem 1.5rem;
color: $text-muted;
transition: .3s color, .3s background-color;
&:hover,
&.active {
color: inherit;
text-decoration: none;
background: rgba($primary, .05);
}
&.active {
color: $primary;
border-color: $primary;
box-shadow: inset 5px 0 0 -2px $primary;
}
}
.sidenav-icon {
width: 1.125rem;
height: 1.125rem;
stroke-width: 1;
margin-right: .5rem;
.sidenav-narrow {
width: 4rem
}