words/styles.css
2023-04-20 16:28:40 +01:00

172 lines
2.8 KiB
CSS

@import url("https://styles.alv.cx/colors/gruvbox.css");
@import url("https://styles.alv.cx/base.css");
:root {
--light: var(--colorscheme-light);
}
:root {
--default-bg: #fefefe;
--dark-bg: #b8b8b8;
--selected-bg: #383838;
--default-fg: #454545;
--red: #ab4642;
--orange: #dc9656;
--yellow: #f7ca88;
--green: #a1b56c;
--teal: #86c1b9;
--blue: #7cafc2;
--purple: #ba8baf;
--brown: #a16946;
--kb-key-width: min(9vw, 3em);
--kb-filler-width: min(4.5vw, 3em);
}
body {
font-family: monospace;
margin-top: 0;
}
#game_container {
display: flex;
align-items: center;
justify-content: center;
}
#letter_grid {
width: fit-content;
margin: 0 auto;
}
#footer { margin-top: 4em; }
.grid_row {
display: flex;
flex-direction: row;
}
.grid_item {
width: 8vw;
max-width: 3em;
height: 8vw;
max-height: 3em;
display: flex;
justify-content: center;
align-items: center;
border: 0.2em solid var(--default-fg);
margin: min(1em, 3vw);
text-transform: uppercase;
font-weight: 800;
transition: 0.5s;
}
.grid_item * {
text-align: center;
margin: 0;
}
.grid_correct { background-color: var(--green)}
.grid_present { background-color: var(--yellow)}
.grid_wrong { background-color: var(--dark-bg)}
.correct {
animation: correct 0.5s;
}
.incorrect {
animation: incorrect 0.5s;
}
.clicked {
animation: clicked 0.5s;
}
@keyframes correct {
0% {
background: var(--default-bg);
}
50% {
background: var(--green);
}
100% {
background: var(--default-bg);
}
}
@keyframes incorrect {
0% {
background: var(--default-bg);
}
50% {
background: var(--red);
}
100% {
background: var(--default-bg);
}
}
@keyframes clicked {
0% {
background: var(--default-bg);
}
50% {
background: var(--dark-bg);
}
100% {
background: var(--default-bg);
}
}
#end_screen {
position: fixed;
height: 100vh;
width: 100vw;
top: 0;
left: 0;
padding: 1em;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-color: rgba(255, 255, 255, 0.8)
}
#end_screen * {
width: fit-content;
}
#end_screen_image {
max-width: 80vw;
}
#keyboard {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.kb_row {
display: flex;
}
.kb_row * {
width: var(--kb-key-width);
height: var(--kb-key-width);
margin: min(0.5vw, 0.15em);
text-align: center;
}
.kb_filler {
width: var(--kb-filler-width);
}
.kb_letter {
line-height: var(--kb-key-width);
}
.kb_letter_incorrect_discovered { background: var(--dark-bg) }
.kb_letter_correct_discovered { background: var(--green) !important }
.kb_letter_present_discovered { background: var(--yellow) }