Skip to content

Commit

Permalink
fix: simplify CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
greatislander committed Mar 12, 2024
1 parent 75c6efd commit a5a52c7
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 214 deletions.
4 changes: 2 additions & 2 deletions src/_layouts/base.njk
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}Accessibility Audit for {{ title }}{% endblock %}</title>
<link rel="stylesheet" href="assets/styles/a11y-dark.min.css" media="screen">
<link rel="stylesheet" href="assets/styles/report.css" media="print,screen">
<link rel="stylesheet" href="assets/styles/a11y-dark.min.css">
<link rel="stylesheet" href="assets/styles/report.css">
<link rel="stylesheet" href="assets/styles/print.css" media="print">
<link rel="stylesheet" href="assets/styles/screen.css" media="screen">
{% block meta %}{% endblock %}
Expand Down
168 changes: 6 additions & 162 deletions src/assets/styles/print.css
Original file line number Diff line number Diff line change
@@ -1,48 +1,9 @@
/* stylelint-disable at-rule-property-required-list */

@font-face {
font-family: 'Noto Sans Mono';
font-style: normal;
font-weight: normal;
src:
url('../fonts/noto-sans-mono-v30-latin-regular.woff2') format('woff2'),
url('../fonts/noto-sans-mono-v30-latin-regular.ttf') format('truetype');
}

@font-face {
font-family: 'Noto Serif';
font-style: normal;
font-weight: normal;
src:
url('../fonts/noto-serif-v23-latin-regular.woff2') format('woff2'),
url('../fonts/noto-serif-v23-latin-regular.ttf') format('truetype');
}

@font-face {
font-family: 'Noto Serif';
font-style: italic;
font-weight: normal;
src:
url('../fonts/noto-serif-v23-latin-italic.woff2') format('woff2'),
url('../fonts/noto-serif-v23-latin-italic.ttf') format('truetype');
}

@font-face {
font-family: 'Noto Serif';
font-style: normal;
font-weight: bold;
src:
url('../fonts/noto-serif-v23-latin-700.woff2') format('woff2'),
url('../fonts/noto-serif-v23-latin-700.ttf') format('truetype');
}

@font-face {
font-family: 'Noto Serif';
font-style: italic;
font-weight: bold;
src:
url('../fonts/noto-serif-v23-latin-700italic.woff2') format('woff2'),
url('../fonts/noto-serif-v23-latin-700italic.ttf') format('truetype');
@page {
size: 8.5in 11in;
margin: 1in;
@bottom-center {
content: 'Page ' counter(page) ' of ' counter(pages);
}
}

body {
Expand Down Expand Up @@ -77,120 +38,3 @@ a.wcag-link:visited {
font-size: inherit;
border-radius: 0;
}

@page {
size: 8.5in 11in;
margin: 1in;
@bottom-center {
content: 'Page ' counter(page) ' of ' counter(pages);
}
}

/**
* a11y-dark theme for JavaScript, CSS, and HTML
* Based on the okaidia theme: https://github.com/PrismJS/prism/blob/gh-pages/themes/prism-okaidia.css
* @author ericwbailey
*/

code[class*='language-'],
pre[class*='language-'] {
color: #f8f8f2;
background: none;
font-family: 'Noto Sans Mono', monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
tab-size: 4;
hyphens: none;
}

pre[class*='language-'] {
padding: 1em;
margin: 0.5em 0;
overflow: auto;
border-radius: 0.3em;
}

:not(pre) > code[class*='language-'],
pre[class*='language-'] {
background: #2b2b2b;
}

:not(pre) > code[class*='language-'] {
padding: 0.1em;
border-radius: 0.3em;
white-space: normal;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: #d4d0ab;
}

.token.punctuation {
color: #fefefe;
}

.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
color: #ffa07a;
}

.token.boolean,
.token.number {
color: #00e0e0;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #abe338;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable {
color: #00e0e0;
}

.token.atrule,
.token.attr-value,
.token.function {
color: #ffd700;
}

.token.keyword {
color: #00e0e0;
}

.token.regex,
.token.important {
color: #ffd700;
}

.token.important,
.token.bold {
font-weight: bold;
}

.token.italic {
font-style: italic;
}

.token.entity {
cursor: help;
}
50 changes: 50 additions & 0 deletions src/assets/styles/report.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,56 @@
box-sizing: border-box;
}

@font-face {
font-display: swap;
font-family: 'Noto Sans Mono';
font-style: normal;
font-weight: normal;
src:
url('../fonts/noto-sans-mono-v30-latin-regular.woff2') format('woff2'),
url('../fonts/noto-sans-mono-v30-latin-regular.ttf') format('truetype');
}

@font-face {
font-display: swap;
font-family: 'Noto Serif';
font-style: normal;
font-weight: normal;
src:
url('../fonts/noto-serif-v23-latin-regular.woff2') format('woff2'),
url('../fonts/noto-serif-v23-latin-regular.ttf') format('truetype');
}

@font-face {
font-display: swap;
font-family: 'Noto Serif';
font-style: italic;
font-weight: normal;
src:
url('../fonts/noto-serif-v23-latin-italic.woff2') format('woff2'),
url('../fonts/noto-serif-v23-latin-italic.ttf') format('truetype');
}

@font-face {
font-display: swap;
font-family: 'Noto Serif';
font-style: normal;
font-weight: bold;
src:
url('../fonts/noto-serif-v23-latin-700.woff2') format('woff2'),
url('../fonts/noto-serif-v23-latin-700.ttf') format('truetype');
}

@font-face {
font-display: swap;
font-family: 'Noto Serif';
font-style: italic;
font-weight: bold;
src:
url('../fonts/noto-serif-v23-latin-700italic.woff2') format('woff2'),
url('../fonts/noto-serif-v23-latin-700italic.ttf') format('truetype');
}

body {
max-width: 50em;
margin: 2em auto;
Expand Down
50 changes: 0 additions & 50 deletions src/assets/styles/screen.css
Original file line number Diff line number Diff line change
@@ -1,53 +1,3 @@
@font-face {
font-display: swap;
font-family: 'Noto Sans Mono';
font-style: normal;
font-weight: normal;
src:
url('../fonts/noto-sans-mono-v30-latin-regular.woff2') format('woff2'),
url('../fonts/noto-sans-mono-v30-latin-regular.ttf') format('truetype');
}

@font-face {
font-display: swap;
font-family: 'Noto Serif';
font-style: normal;
font-weight: normal;
src:
url('../fonts/noto-serif-v23-latin-regular.woff2') format('woff2'),
url('../fonts/noto-serif-v23-latin-regular.ttf') format('truetype');
}

@font-face {
font-display: swap;
font-family: 'Noto Serif';
font-style: italic;
font-weight: normal;
src:
url('../fonts/noto-serif-v23-latin-italic.woff2') format('woff2'),
url('../fonts/noto-serif-v23-latin-italic.ttf') format('truetype');
}

@font-face {
font-display: swap;
font-family: 'Noto Serif';
font-style: normal;
font-weight: bold;
src:
url('../fonts/noto-serif-v23-latin-700.woff2') format('woff2'),
url('../fonts/noto-serif-v23-latin-700.ttf') format('truetype');
}

@font-face {
font-display: swap;
font-family: 'Noto Serif';
font-style: italic;
font-weight: bold;
src:
url('../fonts/noto-serif-v23-latin-700italic.woff2') format('woff2'),
url('../fonts/noto-serif-v23-latin-700italic.ttf') format('truetype');
}

@media (width < 48em) {
.issue header {
align-items: flex-start;
Expand Down

0 comments on commit a5a52c7

Please sign in to comment.