DCSOlympus/client/public/stylesheets/contextmenus.css
Pax1601 a5ee5b0ad5 Multiple fixes
Refactored classes
Fixed visibility of dead units
Changed visibility handling
Refactored unitDatabase class
2023-03-24 16:18:25 +01:00

225 lines
4.7 KiB
CSS

#map-contextmenu {
display: flex;
flex-direction: column;
height: fit-content;
position: absolute;
row-gap: 5px;
width: 230px;
z-index: 1000;
}
#aircraft-spawn-menu {
height: fit-content;
}
#ground-unit-spawn-menu {
height: fit-content;
}
#active-coalition-label {
position: absolute;
top: -28px;
border-radius: 999px;
width: fit-content;
height: fit-content;
padding: 3px 10px;
padding-bottom: 3px;
font-weight: 600;
color: var(--nav-text);
font-size: 12px;
}
#context-menu-switch {
margin-right: 10px;
}
#map-contextmenu>div:nth-child(2){
align-items: center;
display: flex;
flex-direction: row;
justify-content: space-between;
padding-right: 0px;
}
#map-contextmenu>ul{
max-height: 200px;
overflow-x: hidden;
overflow-y: auto;
}
#map-contextmenu .ol-panel {
width: 100%;
border-radius: var(--border-radius-sm);
}
#map-contextmenu ul {
margin: 0px;
}
#map-contextmenu>div:nth-child(n+3){
align-items: center;
display: flex;
flex-direction: column;
justify-content: space-between;
row-gap: 5px;
}
#map-contextmenu .ol-select-container{
width: 100%;
flex:0 0 auto;
align-self: stretch;
}
#aircraft-spawn-menu .ol-select.is-open .ol-select-options {
max-height: 300px;
}
#aircraft-spawn-menu>button,
#ground-unit-spawn-menu>button {
width: 100%;
text-align: center;
}
#aircraft-spawn-button {
background-image: var( --spawn-aircraft-url );
background-size: 48px;
}
#ground-unit-spawn-button {
background-image: var( --spawn-groundunit-url );
background-size: 48px;
}
#smoke-spawn-button {
background-image: var( --spawn-smoke-url );
background-size: 48px;
}
.unit-spawn-button {
border-radius: 0px;
border: none;
height: 48px;
margin-bottom: -10px;
margin-top: -10px;
width: 48px;
}
.unit-spawn-button:last-of-type {
border-top-right-radius: var(--border-radius-sm);
border-bottom-right-radius: var(--border-radius-sm);
}
[data-active-coalition="blue"].toggle-fill,
[data-active-coalition="blue"].unit-spawn-button:hover,
[data-active-coalition="blue"].unit-spawn-button.is-open,
[data-active-coalition="blue"]#active-coalition-label,
[data-active-coalition="blue"].deploy-unit-button,
[data-active-coalition="blue"]#spawn-airbase-aircraft-button
{
background-color: var(--primary-blue)
}
[data-active-coalition="red"].toggle-fill,
[data-active-coalition="red"].unit-spawn-button:hover,
[data-active-coalition="red"].unit-spawn-button.is-open,
[data-active-coalition="red"]#active-coalition-label,
[data-active-coalition="red"].deploy-unit-button,
[data-active-coalition="red"]#spawn-airbase-aircraft-button
{
background-color: var(--primary-red)
}
[data-active-coalition="blue"].deploy-unit-button:disabled {
background-color: transparent;
border: 1px solid var(--primary-blue);
cursor: default;
}
[data-active-coalition="red"].deploy-unit-button:disabled {
background-color: transparent;
border: 1px solid var(--primary-red);
cursor: default;
}
[data-active-coalition="blue"]#active-coalition-label::after {
content: "Create blue unit";
}
[data-active-coalition="red"]#active-coalition-label::after {
content: "Create red unit";
}
#loadout-preview {
display: flex;
flex-direction: row;
align-content: space-between;
align-items: center;
width: 100%;
column-gap: 20px;
}
#loadout-list {
display: flex;
flex-direction: column;
align-content: center;
height: 100%;
}
#unit-image {
width: 100px;
filter: invert(100%);
margin-top: 10px;
margin-bottom: 10px;
}
#smoke-spawn-menu {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}
#smoke-spawn-menu>button {
width: 100%;
text-align: left;
display: flex;
flex-wrap: wrap;
align-items: center;
column-gap: 10px;
}
#smoke-spawn-menu>button::before {
display: block;
width: 10px;
height: 10px;
border-radius: 999px;
content: "";
}
[data-smoke-color="red"]::before{ background-color: red; }
[data-smoke-color="white"]::before{ background-color: white; }
[data-smoke-color="blue"]::before{ background-color: blue; }
[data-smoke-color="green"]::before{ background-color: green; }
[data-smoke-color="orange"]::before{ background-color: orange; }
/* Unit context menu */
#unit-contextmenu {
display: flex;
flex-direction: column;
height: fit-content;
position: absolute;
row-gap: 5px;
width: 150px;
z-index: 1000;
}
/* Airbase context menu */
#airbase-contextmenu {
display: flex;
flex-direction: column;
height: fit-content;
position: absolute;
row-gap: 5px;
width: 180px;
z-index: 1000;
}