BlueMap/BlueMapCore/src/main/webroot/style/ui/menu.scss

179 lines
3.4 KiB
SCSS

$menu-width: 375px;
.bluemap-container .ui .menu {
height: 100%;
width: $menu-width;
max-width: 100%;
background-color: $normal_bg;
color: $normal_fg;
overflow: hidden;
transition: width 0.2s;
&.closed {
width: 0;
}
@media (max-width: $menu-width) {
transition: opacity 0.2s;
&.closed {
opacity: 0;
width: $menu-width;
pointer-events: none;
}
}
> h1 {
position: absolute;
right: 0;
top: 0;
width: $menu-width;
height: 2.5rem;
line-height: 2.5rem;
margin: 0;
padding: 0.25rem;
text-align: center;
font-family: inherit;
font-size: 1.2rem;
font-weight: bold;
box-shadow: 0 0 5px #00000088;
z-index: 10;
@media (max-width: $menu-width) {
width: 100%;
}
}
> .close-button {
z-index: 20;
right: calc(375px - 2.5rem);
top: 0.5rem;
@media (max-width: $menu-width) {
left: 0.5rem;
top: 0.5rem;
}
}
> .content {
position: absolute;
right: 0;
top: 3rem;
display: flex;
flex-direction: column;
width: calc(375px - 1rem);
height: calc(100% - 4rem);
padding: 0.5rem;
overflow-y: auto;
@media (max-width: $menu-width) {
width: calc(100% - 1rem);
}
> * {
flex-grow: 0;
flex-shrink: 0;
}
> .separator {
position: relative;
left: -0.5rem;
width: calc(100% + 1rem);
border-top: solid 1px $line_color;
margin: 0.5rem 0;
&.greedy {
flex-grow: 1;
border-bottom: solid 1px $line_color;
}
}
> .label {
min-height: 0;
font-size: 0.8rem;
padding: 1rem 0.5rem 0.1rem 1rem;
line-height: 0.8rem;
}
> .dropdown > .select {
border: solid 1px $line_color;
border-top: none;
width: calc(100% - 2px);
}
// a little hacky to force not displaying any icon
> .toggle-button.icon {
> .label {
display: inline;
}
> img {
display: none;
}
> .switch {
display: block;
}
&.selected:not(:hover) {
background-color: $normal_bg;
color: $normal_fg;
}
&:hover {
background-color: $hover_bg;
color: $hover_fg;
}
}
> .footer-separator{
flex-grow: 1;
}
> .footer {
margin: 0.5rem -0.5rem -0.5rem -0.5rem;
padding: 0 0.5rem 0.5rem 0.5rem;
border-top: solid 1px $line_color;
line-height: 1rem;
font-size: 0.8rem;
white-space: normal;
h1 {
margin: 1rem 0 0.5rem 0;
font-size: 1rem;
text-align: center;
}
h2 {
margin: 1rem 0 0 0;
font-size: inherit;
}
p {
margin: 0 0 0.5rem 0;
&:last-child {
margin-bottom: 0;
}
}
}
}
}