Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/_Layout.cshtml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<head prefix="og: http://ogp.me/ns#">
<title>@Page.Title</title>

<meta charset="utf-8" />
<meta name="description" content="@Page.Description" />
<meta name="viewport" content="initial-scale=1.0" />
<meta name="color-scheme" content="light dark" />

<link href="/css/site.css" rel="stylesheet" />

Expand Down
40 changes: 26 additions & 14 deletions src/css/site.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
@-ms-viewport {
@-ms-viewport {
width: device-width;
}

:root {
--bg-0: light-dark(white, #121212);
--bg-1: light-dark(#f1f1f1, #0e0e0e);
--bg-2: light-dark(#c0c0c0, #000);
--fg-0: light-dark(#333, #e0e0e0);
--fg-link: light-dark(dodgerblue, #67b4ff);
--bg-header: light-dark(#555, #222);
--fg-header: light-dark(white, var(--fg-0));
--bg-selection: light-dark(#000, initial);
--fg-selection: light-dark(white, initial);
}

body {
font:
18px/1.5 'Segoe UI',
Expand All @@ -11,8 +23,8 @@ body {
Arial,
sans-serif;
margin: 0;
background: white;
color: #333;
background: var(--bg-0);
color: var(--fg-0);
-ms-touch-action: manipulation;
touch-action: manipulation;
}
Expand All @@ -36,7 +48,7 @@ img {
}

a {
color: dodgerblue;
color: var(--fg-link);
}

a:hover {
Expand All @@ -49,13 +61,13 @@ ol {
}

::selection {
background: #000;
color: white;
background: var(--bg-selection);
color: var(--fg-selection);
}

::-moz-selection {
background: #000;
color: white;
background: var(--bg-selection);
color: var(--fg-selection);
}

.container {
Expand All @@ -65,14 +77,14 @@ ol {
}

header {
background: #555;
color: #fff;
background: var(--bg-header);
color: var(--fg-header);
height: 60px;
line-height: 60px;
}

header h1 a {
color: #fff;
color: var(--fg-header);
text-decoration: none;
margin: 0;
}
Expand All @@ -94,9 +106,9 @@ header h1 a {
#main article pre {
overflow: auto;
max-width: 100%;
background: #f1f1f1;
background: var(--bg-1);
padding: 0.6em;
border: 1px solid silver;
border: 1px solid var(--bg-2);
border-radius: 5px;
line-height: normal;
}
Expand Down Expand Up @@ -156,7 +168,7 @@ footer {
}

footer p {
border-top: 1px solid #f1f1f1;
border-top: 1px solid var(--bg-1);
margin-top: 50px;
padding-top: 10px;
}
Expand Down