misuzu/assets/less/manage/classes/header.less
2018-03-27 05:15:03 +02:00

126 lines
2.6 KiB
Text

.header {
background-color: #111;
background-image: linear-gradient(0deg, #222, #333);
font-size: 1.5em;
&__wrapper {
display: flex;
max-width: 1200px;
margin: 0 auto;
}
&__logo,
&__link {
padding: 8px 10px;
color: #fff;
text-decoration: none;
display: block;
}
&__navigation {
display: flex;
}
&__navigation {
flex-grow: 1;
flex-shrink: 1;
}
&__logo {
flex-grow: 0;
flex-shrink: 0;
}
&__link {
cursor: pointer;
transition: background-color .2s;
&:hover {
background-color: #333;
}
&--active,
&:active {
background-color: #222;
}
}
&__user {
flex-grow: 0;
flex-shrink: 1;
&__toggle {
background-size: contain;
background-repeat: no-repeat;
background-position: right;
padding-right: 45px;
min-width: 100px;
transition: background-color .2s, min-width .2s;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
&__state {
display: none;
&:checked ~ .header__user__toggle {
background-color: #333;
min-width: 150px;
}
&:checked ~ .header__user__menu {
max-height: 250px;
}
}
&__menu {
overflow: hidden;
text-align: right;
max-height: 0px;
width: 100%;
position: absolute;
background-color: #333;
z-index: 1000;
transition: max-height .2s;
box-shadow: 0 5px 5px 0 fade(#444, 80%);
}
&__link {
padding: 8px 10px;
display: block;
color: inherit;
text-decoration: none;
transition: background-color .2s;
&:hover {
background-color: #444;
}
&:active {
background-color: #2a2a2a;
}
}
&__section {
margin: 1px 2px;
&:first-child {
margin-top: 2px;
}
&:last-child {
margin-bottom: 2px;
}
&:not(:last-child) {
padding-bottom: 1px;
margin-bottom: 1px;
border-bottom: 1px solid #444;
}
}
}
}