cssOMS/nav.scss
2017-11-18 17:14:30 +01:00

206 lines
3.5 KiB
SCSS

@import "_mixins", "_vars";
#nav-side {
user-select: none;
width: 175px;
position: fixed;
top: 79px;
right: 0;
bottom: 0;
left: 0;
z-index: 0;
overflow-y: auto;
font-size: 0.8em;
background: #2F2F2F;
input {
display: none;
&:checked + ul {
.max {
display: inherit;
}
.min {
display: none;
}
> li:nth-child(n+2) {
display: inherit;
}
}
}
input + ul {
.max {
display: none;
}
.min {
display: inherit;
}
> li:nth-child(n+2) {
display: none;
}
}
> li {
li {
border-top: 1px solid #3f3f3f;
border-bottom: 1px solid #252525;
color: #fff;
&:not(:first-child) {
background: #353535;
}
&:first-child {
border-bottom: 1px solid #1a1a1a;
}
&:first-child {
padding: 7px 0 7px 7px;
}
a {
display: block;
padding: 7px 0 7px 7px;
&:hover {
background: #3F3F3F;
}
}
}
}
li:last-child li:last-child {
border-bottom: none;
}
.max, .min {
float: right;
}
i {
margin-right: 5px;
}
&::-webkit-scrollbar-track
{
box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
background-color: #F5F5F5;
}
&::-webkit-scrollbar
{
width: 12px;
background-color: #F5F5F5;
}
&::-webkit-scrollbar-thumb
{
box-shadow: inset 0 0 6px rgba(0,0,0,.3);
background-color: #555;
}
}
.nav-trigger {
position: absolute;
clip: rect(0, 0, 0, 0);
}
label[for="nav-trigger"] {
font-size: 2.0em;
height: 30px;
width: 30px;
cursor: pointer;
}
.nav-trigger:checked ~ main {
width: calc(100% - 175px);
left: 175px;
}
.nav-top {
user-select: none;
margin-top: 5px;
display: block;
background: #ffffff;
border: 1px solid $content-border-color;
@include box-shadow-top(#ffffff);
> li {
@include box-shadow-top(#ffffff);
text-shadow: 1px 1px 1px #ffffff;
&:first-child {
@include box-shadow-out(#ffffff);
}
}
}
.nav-top li {
background: #fff;
display: inline-block;
margin-right: -4px;
position: relative;
cursor: pointer;
}
.nav-top > li > a {
display: inline-block;
padding: 10px 10px;
}
.nav-top li:hover {
background: #555;
color: #fff;
text-shadow: 0 -1px 0 #000;
}
.nav-top li > ul {
padding: 0;
position: absolute;
top: 36px;
left: 0;
width: 150px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
display: none;
opacity: 0;
visibility: hidden;
}
.nav-top li > ul li {
background: #555;
display: block;
color: #fff;
text-shadow: 0 -1px 0 #000;
}
.nav-top li > ul li:hover { background: #666; }
.nav-top li:hover > ul {
display: block;
opacity: 1;
visibility: visible;
}
@media screen and (max-width: 600px) {
.nav-trigger:checked ~ main {
width: 100%;
left: 0;
}
.nav-trigger:not(:checked) ~ main {
width: 0;
padding-right: 0;
}
#nav-side {
width: 100%;
}
}