Skip to content

Commit

Permalink
New color theme
Browse files Browse the repository at this point in the history
Fix bug when closing fullscreen early
Fix wiggle of layout when examples change length
  • Loading branch information
holistic-developer committed May 7, 2024
1 parent 572bc62 commit a219d1d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/Game.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const Game: React.FC = () => {
return (
<main ref={main}>
{gameMode ? (
<Examples rounds={rounds} gameMode={gameMode} maxValue={maxValue} done={() => document.exitFullscreen().then(() => setGameMode(GameMode.DONE))} />
<Examples rounds={rounds} gameMode={gameMode} maxValue={maxValue} done={() => document.exitFullscreen().finally(() => setGameMode(GameMode.DONE))} />
) : (
<>
<p>
Expand Down
27 changes: 15 additions & 12 deletions src/index.css
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
:root {
color-scheme: dark, light;
--primary: #eee8d5;
--background: #586e75;
--input: #839496;
--disabled: #657b83;
--correct: #859900;
--wrong: #dc322f;
--accent: #268bd2;
--primary: #d8dee9;
--background: #2e3440;
--input: #4c566a;
--disabled: #3b4252;
--correct: #a3be8c;
--wrong: #bf616a;
--accent: #5e81ac;
}


@media (prefers-color-scheme: light) {
:root {
--primary: #073642;
--input: #93a1a1;
--disabled: #657b83;
--background: #eee8d5;
--primary: #2e3440;
--input: #d8dee9;
--disabled: #e5e9f0;
--background: #eceff4;
}
}

Expand All @@ -28,7 +28,6 @@
-moz-osx-font-smoothing: grayscale;
-webkit-text-size-adjust: 100%;
color: var(--primary);
text-shadow: 0 0 0.2vh var(--primary);
text-align: center;
}

Expand Down Expand Up @@ -57,6 +56,10 @@ main {
background-color: var(--background);
}

h1 {
width: 30vw;
}

@media screen and (min-aspect-ratio: 1.4/1) {
main {
flex-direction: row;
Expand Down

0 comments on commit a219d1d

Please sign in to comment.