cssOMS/nav.scss

224 lines
4.1 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: #3b3b3b;
span {
width: 20px;
display: inline-block;
}
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;
}
}
label {
display: block;
padding: 7px 0 7px 7px;
cursor: pointer;
}
> li {
//border-bottom: 1px solid #252525;
color: #fff;
a {
display: block;
padding: 7px 0 7px 7px;
&:hover {
color: #252525;
background: $default-highlighter;
}
}
li {
border-top: 1px solid #505050;
color: #fff;
&:not(:first-child) {
background: #444;
}
border-bottom: 1px solid #252525;
&:hover, &.active {
color: #252525;
background: $default-highlighter;
border-top: 1px solid rgb(255, 192, 110);
}
}
}
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);
&:checked ~ main {
width: calc(100% - 175px);
left: 175px;
}
}
label[for="nav-trigger"] {
font-size: 2.0em;
height: 30px;
width: 30px;
cursor: pointer;
}
.nav-top {
user-select: none;
margin-top: 5px;
display: block;
background: #fff;
border: 1px solid $content-border-color;
> li {
@include box-shadow-top(#fff);
&:first-child {
@include box-shadow-out(#fff);
}
> a {
display: inline-block;
padding: 10px 10px;
}
}
li {
background: #fff;
display: inline-block;
position: relative;
cursor: pointer;
&:hover, &.active {
@include box-shadow-top(#FFC06E);
&:first-child {
@include box-shadow-out(#FFC06E);
}
background: $default-highlighter;
color: #252525;
> ul {
display: block;
opacity: 1;
visibility: visible;
}
}
> ul {
padding: 0;
z-index: 5;
position: absolute;
top: 36px;
left: 0;
width: 150px;
display: none;
opacity: 0;
visibility: hidden;
border-left: 1px solid $content-border-color;
border-bottom: 1px solid $content-border-color;
border-right: 1px solid $content-border-color;
li {
display: block;
color: #000;
padding: 7px;
&:hover {
color: #252525;
background: $default-highlighter;
}
}
}
}
}
@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%;
}
}