153 lines
2.9 KiB
CSS
153 lines
2.9 KiB
CSS
:root {
|
|
--top-bar-height: 6vh;
|
|
--fade-height: 12vh;
|
|
}
|
|
|
|
@media (orientation: landscape) {
|
|
#minefield {
|
|
width: 35% !important;
|
|
}
|
|
|
|
#minefield > div {
|
|
font-size: 3vh !important;
|
|
}
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
image-rendering: crisp-edges;
|
|
image-rendering: pixelated;
|
|
|
|
|
|
|
|
background: linear-gradient(
|
|
rgba(0, 0, 0, 0.7),
|
|
rgba(0, 0, 0, 0.7)
|
|
), url("res/gravedigger/background.png");
|
|
background-size: cover;
|
|
|
|
font-family: serif;
|
|
}
|
|
|
|
#main-menu {
|
|
display: flex;
|
|
flex-flow: column;
|
|
align-items: center;
|
|
color: white;
|
|
}
|
|
|
|
span#game-title {
|
|
font-size: 3em;
|
|
margin: 16px;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
span#subtitle {
|
|
margin: 16px;
|
|
}
|
|
|
|
#button-list {
|
|
display: flex;
|
|
flex-flow: column;
|
|
}
|
|
|
|
#button-list button {
|
|
padding: 1em;
|
|
margin: 8px;
|
|
}
|
|
|
|
#game-view {
|
|
display: flex;
|
|
justify-content: center;
|
|
}
|
|
|
|
#top-bar {
|
|
position: fixed;
|
|
width: 100vw;
|
|
height: var(--top-bar-height);
|
|
background-image: linear-gradient(black, black, transparent);
|
|
display: flex;
|
|
}
|
|
|
|
#top-bar > span {
|
|
padding: 1em;
|
|
color: white;
|
|
align-content: center;
|
|
}
|
|
|
|
#top-bar .data { flex: 1; }
|
|
|
|
#finished-popup {
|
|
position: fixed;
|
|
width: 100vw;
|
|
margin-top: var(--top-bar-height);
|
|
background-image: linear-gradient(transparent, black, black);
|
|
display: flex;
|
|
flex-flow: column;
|
|
align-items: center;
|
|
color: white;
|
|
}
|
|
|
|
#finished-popup span {
|
|
font-size: 1.5em;
|
|
text-align: center;
|
|
margin: 12px;
|
|
}
|
|
|
|
#finished-popup button {
|
|
padding: 1em;
|
|
flex: 1;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
#minefield {
|
|
width: 100%;
|
|
display: grid;
|
|
user-select: none;
|
|
grid-template-columns: repeat(8, 12.5%);
|
|
padding: 2em;
|
|
/* Padding for the top info bar. */
|
|
padding-top: calc(var(--top-bar-height) + 2em);
|
|
/* Padding for the bottom fade. */
|
|
padding-bottom: calc(var(--fade-height) + 2em);
|
|
}
|
|
|
|
/* Cells. */
|
|
#minefield > div {
|
|
aspect-ratio: 1/1;
|
|
font-weight: bold;
|
|
text-shadow: 0 -2px white;
|
|
-webkit-text-stroke: 1px white;
|
|
text-align: center;
|
|
font-size: 5vw;
|
|
margin: 3px;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
#bottom-fade {
|
|
position: fixed;
|
|
bottom: 0;
|
|
width: 100vw;
|
|
height: var(--fade-height);
|
|
background-image: linear-gradient(transparent, black);
|
|
pointer-events: none;
|
|
}
|
|
|
|
.unknown, .known { background-size: cover; }
|
|
.unknown { background-image: url("./res/gravedigger/unknown-1.png"); }
|
|
.known { background-image: url("./res/gravedigger/known.png"); }
|
|
.flagged { background-image: url("./res/gravedigger/flagged.png"); }
|
|
.exploded { background-image: url("./res/gravedigger/explosion.png"); }
|
|
.known.mine { background-image: url("./res/gravedigger/bomb.png"); }
|
|
|
|
.n1 { color: blue; }
|
|
.n2 { color: green; }
|
|
.n3 { color: red; }
|
|
.n4 { color: purple; }
|
|
.n5 { color: orange; }
|
|
.n6 { color: cyan; }
|
|
.n7 { color: pink; }
|
|
.n8 { color: teal; }
|