From 08ba9024f532554fe2135d2596f1169828b01e5f Mon Sep 17 00:00:00 2001
From: lonkaars <l.leblansch@gmail.com>
Date: Mon, 19 Apr 2021 09:51:38 +0200
Subject: login/register pages done + fullwidth css class edited

---
 pages/register.tsx | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

(limited to 'pages/register.tsx')

diff --git a/pages/register.tsx b/pages/register.tsx
index f78d092..90dab3e 100644
--- a/pages/register.tsx
+++ b/pages/register.tsx
@@ -89,34 +89,34 @@ export default function RegisterPage() {
 		<div>
 			<NavBar />
 			<CenteredPage width={500} style={{ height: '100vh' }}>
-				<div
-					style={{
-						position: 'relative',
-						top: '50%',
-						transform: 'translateY(-50%)',
-						margin: '0 auto',
-						textAlign: 'center',
-					}}
-				>
-					<Vierkant>
+				<div className='posrel center centeredForm'>
+					<Vierkant className='pad-l'>
 						<form onSubmit={(e) => submitRegister(e, toast)}>
 							<Input
 								autofocus
 								autocomplete='username'
 								id='username'
 								label='gebruikersnaam'
-								style={{ marginBottom: 12 }}
-							>
-							</Input>
-							<Input autocomplete='email' id='email' label='email' style={{ marginBottom: 12 }}></Input>
-							<Input autocomplete='new-password' id='password' label='wachtwoord' type='password'></Input>
+								className='pad-m fullwidth bg-900 round-t'
+							/>
+							<Input
+								autocomplete='email'
+								id='email'
+								label='email'
+								className='pad-m fullwidth bg-900 round-t'
+							/>
+							<Input
+								autocomplete='new-password'
+								id='password'
+								label='wachtwoord'
+								type='password'
+								className='pad-m fullwidth bg-900 round-t'
+							/>
 							<Button
 								text='Registreren'
-								style={{ marginTop: 24 }}
 								onclick={() => submitRegister(null, toast)}
-							>
-							</Button>
-							<input type='submit' style={{ display: 'none' }} />
+							/>
+							<input type='submit' className='dispnone' />
 						</form>
 					</Vierkant>
 				</div>
-- 
cgit v1.2.3


From c140e56db162755d7f85e89306236a0a09bf4e35 Mon Sep 17 00:00:00 2001
From: lonkaars <l.leblansch@gmail.com>
Date: Tue, 20 Apr 2021 16:14:04 +0200
Subject: site not longer broken (i think) still some inline css remains....

---
 components/dialogBox.tsx |  2 +-
 components/gameBar.tsx   | 41 +++++++--------------------------------
 components/ui.tsx        |  2 +-
 components/voerBord.tsx  | 50 +++++-------------------------------------------
 pages/game.tsx           |  2 +-
 pages/index.tsx          | 12 ++++++------
 pages/login.tsx          |  2 +-
 pages/register.tsx       |  2 +-
 pages/search.tsx         |  2 +-
 pages/settings.tsx       |  8 ++++----
 pages/user.tsx           |  8 ++++----
 styles/disk.css          |  4 ++--
 styles/game.css          | 36 ++++++++++++++++++++++++++++++++++
 styles/utility.css       |  3 +++
 14 files changed, 73 insertions(+), 101 deletions(-)

(limited to 'pages/register.tsx')

diff --git a/components/dialogBox.tsx b/components/dialogBox.tsx
index 4ead7c5..a5b02fa 100644
--- a/components/dialogBox.tsx
+++ b/components/dialogBox.tsx
@@ -12,7 +12,7 @@ export function DialogBox(props: {
 	className?: string;
 }) {
 	return <Vierkant
-		className={'dialogbox drop-2 pad-l posfix abscenter ' + (props.hidden ? 'dispnone' : '') + ' '
+		className={'dialogbox bg-800 drop-2 pad-l posfix abscenter ' + (props.hidden ? 'dispnone' : '') + ' '
 			+ props.className}
 	>
 		<h2 className='title'>{props.title}</h2>
diff --git a/components/gameBar.tsx b/components/gameBar.tsx
index 0d7d4d9..a3479d5 100644
--- a/components/gameBar.tsx
+++ b/components/gameBar.tsx
@@ -11,14 +11,7 @@ function GameBarModule(props: {
 	onclick?: () => void;
 }) {
 	return <Vierkant
-		style={{
-			backgroundColor: 'var(--background-alt)',
-			padding: 12,
-			borderRadius: 6,
-			margin: 0,
-			verticalAlign: 'top',
-			cursor: props.onclick ? 'pointer' : 'default',
-		}}
+		className={'gameBarButton bg-700 pad-m round-t valigntop ' + (props.onclick ? 'cpointer' : '')}
 		onclick={props.onclick}
 	>
 		{props.children}
@@ -37,33 +30,13 @@ export function GameBar(props: {
 	active: boolean;
 	resignFunction: () => void;
 }) {
-	return <Vierkant
-		className='gameBar'
-		style={{
-			padding: 8,
-			width: 'calc(100% - 12px)',
-		}}
-	>
-		<div style={{ gridAutoColumns: 'auto' }}>
+	return <Vierkant className='gameBar bg-800 w100m2m pad-s'>
+		<div>
 			<div style={{ ...GameBarAlignStyle, float: 'left' }}>
-				<div
-					style={{
-						width: 32,
-						height: 32,
-						margin: 8,
-						backgroundColor: props.turn ? 'var(--disk-b)' : 'var(--disk-a)',
-						borderRadius: 16,
-						display: 'inline-block',
-					}}
-				/>
-				<h2
-					style={{
-						fontSize: 20,
-						margin: 12,
-						verticalAlign: 'top',
-						display: 'inline-block',
-					}}
-				>
+				{props.active && <div
+					className={'move dispinbl ' + (props.turn ? 'move-a' : 'move-b')}
+				/>}
+				<h2 className='pad-m valigntop dispinbl'>
 					{!props.active
 						? 'Wachten op tegenstander...'
 						: props.turn == props.player1
diff --git a/components/ui.tsx b/components/ui.tsx
index 80bfba1..11914c8 100644
--- a/components/ui.tsx
+++ b/components/ui.tsx
@@ -16,7 +16,7 @@ export function Vierkant(props: {
 }) {
 	return <a
 		href={props.href}
-		className={['bg-800', 'round-l', 'vierkant', props.className].join(' ')}
+		className={['round-l', 'vierkant', props.className].join(' ')}
 		id={props.id}
 		onClick={props.onclick}
 	>
diff --git a/components/voerBord.tsx b/components/voerBord.tsx
index 93e350c..ffb291b 100644
--- a/components/voerBord.tsx
+++ b/components/voerBord.tsx
@@ -1,62 +1,22 @@
-function Disc() {
-	return <div
-		className='disk'
-		style={{
-			position: 'absolute',
-			top: 0,
-			left: 0,
-			right: 0,
-			bottom: 0,
-			borderRadius: 999999,
-			margin: 3,
-		}}
-	/>;
-}
-
 export function VoerBord(props: {
 	width: number;
 	height: number;
 	onMove: (move: number) => void;
 	active: boolean;
 }) {
-	return <table
-		className='voerBord'
-		style={{
-			borderSpacing: 8,
-			width: '100%',
-		}}
-	>
+	return <table className={'voerBord fullwidth ' + (props.active ? 'active' : '')}>
 		<tbody>
 			{[...Array(props.height).keys()].map((row) => (
 				<tr key={`r-${row}`}>
 					{[...Array(props.width).keys()].map((column) => (
 						<td
-							style={{
-								position: 'relative',
-								width: '100%',
-								padding: 0,
-							}}
+							className='posrel outer cell fullwidth'
 							key={`c-${row}x${column}`}
 						>
+							<div className='dispbl square' />
+							<div className='disk posabs a0' />
 							<div
-								style={{
-									display: 'block',
-									marginTop: '100%',
-								}}
-							/>
-							<Disc />
-							<div
-								style={{
-									position: 'absolute',
-									top: 0,
-									left: 0,
-									right: 0,
-									bottom: 0,
-									borderRadius: 6,
-									border: '2px solid var(--background-alt)',
-									opacity: .5,
-									cursor: props.active ? 'pointer' : 'default',
-								}}
+								className='posabs a0 round-t inner cell'
 								id={`pos-${(props.height - row - 1) * props.width + column}`}
 								onClick={event => {
 									props.onMove(Number((event.target as HTMLElement).id.split('-')[1]));
diff --git a/pages/game.tsx b/pages/game.tsx
index d6d7fb0..9e702ed 100644
--- a/pages/game.tsx
+++ b/pages/game.tsx
@@ -1,7 +1,7 @@
 import Icon from '@mdi/react';
 import axios from 'axios';
 import copy from 'copy-to-clipboard';
-import { CSSProperties, useContext, useEffect, useState } from 'react';
+import { useContext, useEffect, useState } from 'react';
 import * as cookies from 'react-cookies';
 import { Socket } from 'socket.io-client';
 import { SocketContext } from '../components/socketContext';
diff --git a/pages/index.tsx b/pages/index.tsx
index 873cf8b..c4b4baf 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -93,31 +93,31 @@ export default function HomePage() {
 		<CenteredPage width={802}>
 			<PageTitle>4 op een rij</PageTitle>
 			<div className='topbar'>
-				<Vierkant className='gamemode' href='/game'>
+				<Vierkant className='gamemode bg-800' href='/game'>
 					<VideogameAssetIcon className='icon' />
 					<span className='text'>Nieuw spel</span>
 				</Vierkant>
 				{false
-					&& <Vierkant className='gamemode' href='/'>
+					&& <Vierkant className='gamemode bg-800' href='/'>
 						<ExtensionIcon className='icon' />
 						<span className='text'>Puzzels</span>
 					</Vierkant>}
 				{false
-					&& <Vierkant className='gamemode' href='/'>
+					&& <Vierkant className='gamemode bg-800' href='/'>
 						<Icon path={mdiRobotExcited} className='icon' />
 						<span className='text'>Tegen computer</span>
 					</Vierkant>}
-				<Vierkant className='loginOrRegisterBox pad-l valigntop'>
+				<Vierkant className='loginOrRegisterBox pad-l valigntop bg-800'>
 					{loggedIn
 						? <AccountBox info={userInfo} sumGameInfo={gameInfo?.totals} />
 						: <LoginOrRegisterBox />}
 				</Vierkant>
 			</div>
 			{loggedIn
-				&& <Vierkant className='fullwidth pad-l'>
+				&& <Vierkant className='w100m2m pad-l bg-800'>
 					<RecentGames games={gameInfo?.games} />
 				</Vierkant>}
-			<Vierkant className='w100m2m pad-l'>
+			<Vierkant className='w100m2m pad-l bg-800'>
 				<h2>Nieuws ofzo</h2>
 				<p style={{ margin: '6px 0' }}>Chess.com heeft heel veel troep waar niemand naar kijkt</p>
 			</Vierkant>
diff --git a/pages/login.tsx b/pages/login.tsx
index 9e26b50..73fbb52 100644
--- a/pages/login.tsx
+++ b/pages/login.tsx
@@ -50,7 +50,7 @@ export default function LoginPage() {
 			<NavBar />
 			<CenteredPage width={500} style={{ height: '100vh' }}>
 				<div className='posrel center centeredForm'>
-					<Vierkant className='pad-l'>
+					<Vierkant className='pad-l bg-800'>
 						<form onSubmit={(e) => submitLogin(e, toast)}>
 							<Input
 								autofocus
diff --git a/pages/register.tsx b/pages/register.tsx
index 90dab3e..63f51f7 100644
--- a/pages/register.tsx
+++ b/pages/register.tsx
@@ -90,7 +90,7 @@ export default function RegisterPage() {
 			<NavBar />
 			<CenteredPage width={500} style={{ height: '100vh' }}>
 				<div className='posrel center centeredForm'>
-					<Vierkant className='pad-l'>
+					<Vierkant className='pad-l bg-800'>
 						<form onSubmit={(e) => submitRegister(e, toast)}>
 							<Input
 								autofocus
diff --git a/pages/search.tsx b/pages/search.tsx
index e0f3123..7aba29c 100644
--- a/pages/search.tsx
+++ b/pages/search.tsx
@@ -47,7 +47,7 @@ function SearchResult(props: { user: userInfo; }) {
 function BigSearchBar(props: {
 	searchFunction: (event?: FormEvent<HTMLFormElement>) => void;
 }) {
-	return <Vierkant className='pad-m w100m2m bigSearchBar posrel'>
+	return <Vierkant className='pad-m bg-800 w100m2m bigSearchBar posrel'>
 		<form onSubmit={props.searchFunction}>
 			<Input
 				id='bigSearchBar'
diff --git a/pages/settings.tsx b/pages/settings.tsx
index 672edac..0ca2c30 100644
--- a/pages/settings.tsx
+++ b/pages/settings.tsx
@@ -48,7 +48,7 @@ export default function SettingsPage() {
 			<NavBar />
 			<CenteredPage width={802}>
 				<PageTitle>Instellingen</PageTitle>
-				<Vierkant className='section account w100m2m pad-l'>
+				<Vierkant className='section account w100m2m pad-l bg-800'>
 					<h2>Account</h2>
 					<div className='subsection'>
 						<AccountAvatar size={100} />
@@ -92,7 +92,7 @@ export default function SettingsPage() {
 						</div>
 					</div>
 				</Vierkant>
-				<Vierkant className='section colors w100m2m pad-l'>
+				<Vierkant className='section colors w100m2m pad-l bg-800'>
 					<h2>Kleuren</h2>
 					<div className='subsection'>
 						<ColorPicker />
@@ -117,13 +117,13 @@ export default function SettingsPage() {
 						<h3>Donkere modus</h3>
 					</div>
 				</Vierkant>
-				<Vierkant className='section gamerules w100m2m pad-l'>
+				<Vierkant className='section gamerules w100m2m pad-l bg-800'>
 					<h2>Standaard spelregels</h2>
 					<div className='subsection'>
 						<CurrentGameSettings />
 					</div>
 				</Vierkant>
-				<Vierkant className='section logout w100m2m pad-l'>
+				<Vierkant className='section logout w100m2m pad-l bg-800'>
 					<h2>Uitloggen</h2>
 					<div className='center'>
 						<IconLabelButton
diff --git a/pages/user.tsx b/pages/user.tsx
index e1c3674..9741275 100644
--- a/pages/user.tsx
+++ b/pages/user.tsx
@@ -125,7 +125,7 @@ export default function AccountPage() {
 		<NavBar />
 		<CenteredPage width={802}>
 			<PageTitle>Profiel</PageTitle>
-			<Vierkant className='accountHeader w100m2m pad-l'>
+			<Vierkant className='accountHeader w100m2m pad-l bg-800'>
 				<div className='inner posrel'>
 					<AccountAvatar size={128} id={user?.id || ''} />
 					<div className='userInfo dispinbl valigntop'>
@@ -280,7 +280,7 @@ export default function AccountPage() {
 					</div>
 				</div>
 			</Vierkant>
-			<Vierkant className='infosection pad-l w100m2m'>
+			<Vierkant className='infosection pad-l w100m2m bg-800'>
 				<div className='inner sidebyside'>
 					<InfoModule
 						icon={<Icon size={1} path={mdiCheckboxBlankCircle} className='outcome win' />}
@@ -312,7 +312,7 @@ export default function AccountPage() {
 					<InfoModule icon={<Icon size={1} path={mdiEarth} />} label='Nederland' />
 				</div>
 			</Vierkant>
-			<Vierkant className='infosection pad-l w100m2m sidebyside'>
+			<Vierkant className='infosection pad-l w100m2m sidebyside bg-800'>
 				<div className='inner sidebyside'>
 					<InfoModule
 						icon={<ArrowUpwardOutlinedIcon className='outcome win' />}
@@ -340,7 +340,7 @@ export default function AccountPage() {
 					/>
 				</div>
 			</Vierkant>
-			<Vierkant className='pad-l'>
+			<Vierkant className='pad-l bg-800'>
 				<RecentGames games={gameInfo?.games} />
 			</Vierkant>
 		</CenteredPage>
diff --git a/styles/disk.css b/styles/disk.css
index d858335..2646fed 100644
--- a/styles/disk.css
+++ b/styles/disk.css
@@ -1,3 +1,3 @@
 .voerBord .disk.state-0 { background-color: var(--page-background); }
-.voerBord .disk.state-1 { background-color: var(--disk-a); }
-.voerBord .disk.state-2 { background-color: var(--disk-b); }
+.voerBord .disk.state-1 { background-color: var(--confirm); }
+.voerBord .disk.state-2 { background-color: var(--error); }
diff --git a/styles/game.css b/styles/game.css
index ae8c3ff..de00b1c 100644
--- a/styles/game.css
+++ b/styles/game.css
@@ -32,3 +32,39 @@
 	margin-top: var(--spacing-large);
 }
 
+.voerBord {
+	border-spacing: var(--spacing-small);
+}
+
+.voerBord .cell.inner {
+	border: 2px solid var(--gray-800);
+}
+
+.voerBord .square {
+	margin-top: 100%;
+}
+
+.voerBord.active .cell.inner {
+	cursor: pointer;
+}
+
+.voerBord .disk {
+	border-radius: 999999999px;
+	margin: 3px;
+}
+
+.gameBar .gameBarButton {
+	margin: 0;
+}
+
+.gameBar .move {
+	width: 32px;
+	height: 32px;
+	border-radius: 16px;
+
+	margin: 8px;
+}
+
+.gameBar .move.move-a { background-color: var(--error); }
+.gameBar .move.move-b { background-color: var(--confirm); }
+
diff --git a/styles/utility.css b/styles/utility.css
index d3c5897..0ff6b10 100644
--- a/styles/utility.css
+++ b/styles/utility.css
@@ -43,6 +43,9 @@
 .valigntop { vertical-align: top; }
 .valignsup { vertical-align: super; }
 
+.cpointer { cursor: pointer; }
+.cdefault { cursor: default; }
+
 .center { text-align: center; }
 
 .floatr { float: right; }
-- 
cgit v1.2.3


From ae4375d8b492c244328a88190e8ed10c8dbd2fda Mon Sep 17 00:00:00 2001
From: lonkaars <l.leblansch@gmail.com>
Date: Tue, 20 Apr 2021 16:21:51 +0200
Subject: all pages without inline styles

---
 pages/game.tsx     | 8 +-------
 pages/login.tsx    | 2 +-
 pages/register.tsx | 2 +-
 styles/game.css    | 5 +++++
 4 files changed, 8 insertions(+), 9 deletions(-)

(limited to 'pages/register.tsx')

diff --git a/pages/game.tsx b/pages/game.tsx
index 9e702ed..de2c089 100644
--- a/pages/game.tsx
+++ b/pages/game.tsx
@@ -65,13 +65,7 @@ function VoerGame(props: {
 		});
 	}, []);
 
-	return <div
-		className='posrel abscenterv'
-		style={{
-			maxWidth: '100vh',
-			margin: '0 auto',
-		}}
-	>
+	return <div className='voerGame posrel abscenterv'>
 		<VoerBord
 			width={width}
 			height={height}
diff --git a/pages/login.tsx b/pages/login.tsx
index 73fbb52..4cadd82 100644
--- a/pages/login.tsx
+++ b/pages/login.tsx
@@ -48,7 +48,7 @@ export default function LoginPage() {
 	return (
 		<div>
 			<NavBar />
-			<CenteredPage width={500} style={{ height: '100vh' }}>
+			<CenteredPage width={500} className="h100vh">
 				<div className='posrel center centeredForm'>
 					<Vierkant className='pad-l bg-800'>
 						<form onSubmit={(e) => submitLogin(e, toast)}>
diff --git a/pages/register.tsx b/pages/register.tsx
index 63f51f7..2709a10 100644
--- a/pages/register.tsx
+++ b/pages/register.tsx
@@ -88,7 +88,7 @@ export default function RegisterPage() {
 	return (
 		<div>
 			<NavBar />
-			<CenteredPage width={500} style={{ height: '100vh' }}>
+			<CenteredPage width={500} className="h100vh">
 				<div className='posrel center centeredForm'>
 					<Vierkant className='pad-l bg-800'>
 						<form onSubmit={(e) => submitRegister(e, toast)}>
diff --git a/styles/game.css b/styles/game.css
index de00b1c..f454691 100644
--- a/styles/game.css
+++ b/styles/game.css
@@ -68,3 +68,8 @@
 .gameBar .move.move-a { background-color: var(--error); }
 .gameBar .move.move-b { background-color: var(--confirm); }
 
+.voerGame {
+	max-width: 100vh;
+	margin: 0 auto;
+}
+
-- 
cgit v1.2.3


From 84bfb5e738a100a6572344bf8babaa1a776d8947 Mon Sep 17 00:00:00 2001
From: lonkaars <l.leblansch@gmail.com>
Date: Tue, 20 Apr 2021 16:32:08 +0200
Subject: dark mode working now :tada:

---
 pages/login.tsx         |  2 +-
 pages/register.tsx      |  2 +-
 pages/search.tsx        |  2 +-
 styles/dark.css         | 22 ++++++++++++++++------
 styles/game.css         | 45 +++++++++++++++------------------------------
 styles/gameSettings.css |  3 +++
 styles/global.css       | 36 ------------------------------------
 styles/ui.css           | 13 +++++--------
 8 files changed, 42 insertions(+), 83 deletions(-)

(limited to 'pages/register.tsx')

diff --git a/pages/login.tsx b/pages/login.tsx
index 4cadd82..da13f45 100644
--- a/pages/login.tsx
+++ b/pages/login.tsx
@@ -48,7 +48,7 @@ export default function LoginPage() {
 	return (
 		<div>
 			<NavBar />
-			<CenteredPage width={500} className="h100vh">
+			<CenteredPage width={500} className='h100vh'>
 				<div className='posrel center centeredForm'>
 					<Vierkant className='pad-l bg-800'>
 						<form onSubmit={(e) => submitLogin(e, toast)}>
diff --git a/pages/register.tsx b/pages/register.tsx
index 2709a10..bc2fc0f 100644
--- a/pages/register.tsx
+++ b/pages/register.tsx
@@ -88,7 +88,7 @@ export default function RegisterPage() {
 	return (
 		<div>
 			<NavBar />
-			<CenteredPage width={500} className="h100vh">
+			<CenteredPage width={500} className='h100vh'>
 				<div className='posrel center centeredForm'>
 					<Vierkant className='pad-l bg-800'>
 						<form onSubmit={(e) => submitRegister(e, toast)}>
diff --git a/pages/search.tsx b/pages/search.tsx
index 7aba29c..99f99b0 100644
--- a/pages/search.tsx
+++ b/pages/search.tsx
@@ -31,7 +31,7 @@ function SearchResults(props: { userList: Array<userInfo>; }) {
 
 function SearchResult(props: { user: userInfo; }) {
 	return <Vierkant
-		className='result pad-m fullwidth'
+		className='result bg-800 pad-m fullwidth'
 		href={'/user?id=' + props.user.id}
 	>
 		<div className='inner posrel'>
diff --git a/styles/dark.css b/styles/dark.css
index 681116f..b44171b 100644
--- a/styles/dark.css
+++ b/styles/dark.css
@@ -1,9 +1,19 @@
 html.dark {
-    --text: #FCFFFD;
-    --text-alt: var(--text);
+	--background: var(--gray-900);
+	--foreground: #FFFFF3;
 
-    --page-background: #11171a;
-    --background: #222d33;
-    --background-alt: #344047;
-}
+	--accent: #AD34F3;
+
+	--error: #FF4365;
+	--disk-b-alt: #F49BA1;
 
+	--confirm: #00D9C0;
+	--disk-a-alt: #86F3F3;
+
+	--gray-100: #CED2DC;
+	--gray-200: #A9AFC0;
+	--gray-300: #757D92;
+	--gray-700: #293140;
+	--gray-800: #1F242D;
+	--gray-900: #141619;
+}
diff --git a/styles/game.css b/styles/game.css
index f454691..2c1eb94 100644
--- a/styles/game.css
+++ b/styles/game.css
@@ -7,55 +7,35 @@
 	padding: var(--spacing-medium) var(--spacing-large);
 }
 
-.newGameDialog .inviteButton {
-	height: 160px;
-}
+.newGameDialog .inviteButton { height: 160px; }
 
-.newGameDialog .inviteButton.random {
-	background-color: var(--confirm);
-}
+.newGameDialog .inviteButton.random { background-color: var(--confirm); }
 
-.newGameDialog .inviteButton.link {
-	background-color: var(--error);
-}
+.newGameDialog .inviteButton.link { background-color: var(--error); }
 
 .newGameDialog .inviteButton .icon {
 	top: var(--spacing-medium);
 	font-size: 100px;
 }
 
-.newGameDialog .inviteButton .label {
-	bottom: var(--spacing-medium);
-}
+.newGameDialog .inviteButton .label { bottom: var(--spacing-medium); }
 
-.newGameDialog > div {
-	margin-top: var(--spacing-large);
-}
+.newGameDialog > div { margin-top: var(--spacing-large); }
 
-.voerBord {
-	border-spacing: var(--spacing-small);
-}
+.voerBord { border-spacing: var(--spacing-small); }
 
-.voerBord .cell.inner {
-	border: 2px solid var(--gray-800);
-}
+.voerBord .cell.inner { border: 2px solid var(--gray-800); }
 
-.voerBord .square {
-	margin-top: 100%;
-}
+.voerBord .square { margin-top: 100%; }
 
-.voerBord.active .cell.inner {
-	cursor: pointer;
-}
+.voerBord.active .cell.inner { cursor: pointer; }
 
 .voerBord .disk {
 	border-radius: 999999999px;
 	margin: 3px;
 }
 
-.gameBar .gameBarButton {
-	margin: 0;
-}
+.gameBar .gameBarButton { margin: 0; }
 
 .gameBar .move {
 	width: 32px;
@@ -73,3 +53,8 @@
 	margin: 0 auto;
 }
 
+html.dark .newGameDialog .inviteButton { background-color: var(--gray-800); }
+html.dark .newGameDialog .inviteButton.random .icon { color: var(--confirm); }
+html.dark .newGameDialog .inviteButton.link .icon { color: var(--error); }
+html.dark .newGameDialog .searchBar .input { background-color: var(--gray-800); }
+
diff --git a/styles/gameSettings.css b/styles/gameSettings.css
index 533cea0..d9ba262 100644
--- a/styles/gameSettings.css
+++ b/styles/gameSettings.css
@@ -40,6 +40,9 @@
 	margin: 0;
 	margin-bottom: var(--spacing-medium);
 }
+html.dark .editGameSettings .editableRules .editableRulesSection {
+	background-color: var(--gray-800);
+}
 
 .editGameSettings .button {
 	line-height: normal;
diff --git a/styles/global.css b/styles/global.css
index f70b6bd..541dd76 100644
--- a/styles/global.css
+++ b/styles/global.css
@@ -33,42 +33,6 @@
 	--spacing-large:  24px;
 }
 
-@media (prefers-color-scheme: dark) {
-	:root {
-		--background: var(--gray-900);
-		--foreground: #FFFFF3;
-
-		--accent: #AD34F3;
-
-		--error: #FF4365;
-		--disk-b-alt: #F49BA1;
-
-		--confirm: #00D9C0;
-		--disk-a-alt: #86F3F3;
-
-		--gray-100: #CED2DC;
-		--gray-200: #A9AFC0;
-		--gray-300: #757D92;
-		--gray-700: #293140;
-		--gray-800: #1F242D;
-		--gray-900: #141619;
-	}
-}
-
-/* html { */
-/* 	--text: #FCFFFD; */
-/* 	--page-background: var(--text); */
-
-/* 	--background: #5D737E; */
-/* 	--text-alt: var(--background); */
-/* 	--background-alt: #81949E; */
-
-/* 	--disk-a: #E16D82; */
-/* 	--disk-a-text: #FDC0C4; */
-/* 	--disk-b: #71D9CC; */
-/* 	--disk-b-text: #C0FDEB; */
-/* } */
-
 /* default margin */
 html, body {
 	margin: 0;
diff --git a/styles/ui.css b/styles/ui.css
index cd9f461..6dbc388 100644
--- a/styles/ui.css
+++ b/styles/ui.css
@@ -5,6 +5,7 @@
 	box-sizing: border-box;
 }
 
+html.dark .button { color: var(--foreground); }
 .button {
 	background-color: var(--accent);
 	color: var(--gray-900);
@@ -64,20 +65,16 @@
 	transform: translate(-50%, 0%) rotate(0deg);
 }
 
-.dialogbox {
-	width: 392px;
-}
-
-.dialogbox > .title {
-	margin-bottom: var(--spacing-large);
-}
-
+.dialogbox { width: 392px; }
+.dialogbox > .title { margin-bottom: var(--spacing-large); }
 .dialogbox .icon.close {
 	top: 25px;
 	right: 25px;
 	cursor: pointer;
 }
 
+html.dark .dialogbox { background-color: var(--gray-700); }
+
 .searchBar {
 	overflow: hidden;
 }
-- 
cgit v1.2.3

