11import { escape } from 'html-escaper' ;
2- import { baseCSS } from './css.js' ;
32
43interface ErrorTemplateOptions {
54 /** a short description of the error */
@@ -28,14 +27,40 @@ export default function template({
2827 <meta charset="UTF-8">
2928 <title>${ tabTitle } </title>
3029 <style>
31- ${ baseCSS }
3230 :root {
31+ --gray-10: hsl(258, 7%, 10%);
32+ --gray-20: hsl(258, 7%, 20%);
33+ --gray-30: hsl(258, 7%, 30%);
34+ --gray-40: hsl(258, 7%, 40%);
35+ --gray-50: hsl(258, 7%, 50%);
36+ --gray-60: hsl(258, 7%, 60%);
37+ --gray-70: hsl(258, 7%, 70%);
38+ --gray-80: hsl(258, 7%, 80%);
39+ --gray-90: hsl(258, 7%, 90%);
3340 --black: #13151A;
3441 --accent-light: #E0CCFA;
3542 }
3643
37- body {
44+ * {
45+ box-sizing: border-box;
46+ }
47+
48+ html {
3849 background: var(--black);
50+ color-scheme: dark;
51+ accent-color: var(--accent-light);
52+ }
53+
54+ body {
55+ background-color: var(--gray-10);
56+ color: var(--gray-80);
57+ font-family: ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Source Code Pro", "Fira Mono", "Droid Sans Mono", "Courier New", monospace;
58+ line-height: 1.5;
59+ margin: 0;
60+ }
61+
62+ a {
63+ color: var(--accent-light);
3964 }
4065
4166 .center {
@@ -52,6 +77,8 @@ export default function template({
5277 color: white;
5378 font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
5479 font-weight: 700;
80+ margin-top: 1rem;
81+ margin-bottom: 0;
5582 }
5683
5784 .statusCode {
@@ -63,11 +90,14 @@ export default function template({
6390 width: 124px;
6491 }
6592
66- pre {
93+ pre, code {
6794 padding: 2px 8px;
6895 background: rgba(0,0,0, 0.25);
6996 border: 1px solid rgba(255,255,255, 0.25);
7097 border-radius: 4px;
98+ font-size: 1.2em;
99+ margin-top: 0;
100+ max-width: 60em;
71101 }
72102 </style>
73103 </head>
0 commit comments