Fix lighthouse touch targets (gap addition), convert whitespace
This commit is contained in:
parent
1cad1da169
commit
53fe05d12f
@ -1,108 +1,108 @@
|
|||||||
/* Defaults */
|
/* Defaults */
|
||||||
:root {
|
:root {
|
||||||
--font-family: -apple-system, system-ui, sans-serif;
|
--font-family: -apple-system, system-ui, sans-serif;
|
||||||
--font-family-monospace: Consolas, Menlo, Monaco, Andale Mono WT, Andale Mono, Lucida Console, Lucida Sans Typewriter, DejaVu Sans Mono, Bitstream Vera Sans Mono, Liberation Mono, Nimbus Mono L, Courier New, Courier, monospace;
|
--font-family-monospace: Consolas, Menlo, Monaco, Andale Mono WT, Andale Mono, Lucida Console, Lucida Sans Typewriter, DejaVu Sans Mono, Bitstream Vera Sans Mono, Liberation Mono, Nimbus Mono L, Courier New, Courier, monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Theme colors */
|
/* Theme colors */
|
||||||
:root {
|
:root {
|
||||||
--color-gray-20: #e0e0e0;
|
--color-gray-20: #e0e0e0;
|
||||||
--color-gray-50: #C0C0C0;
|
--color-gray-50: #C0C0C0;
|
||||||
--color-gray-90: #333;
|
--color-gray-90: #333;
|
||||||
|
|
||||||
--background-color: #fff;
|
--background-color: #fff;
|
||||||
|
|
||||||
--text-color: var(--color-gray-90);
|
--text-color: var(--color-gray-90);
|
||||||
--text-color-link: #082840;
|
--text-color-link: #082840;
|
||||||
--text-color-link-active: #5f2b48;
|
--text-color-link-active: #5f2b48;
|
||||||
--text-color-link-visited: #17050F;
|
--text-color-link-visited: #17050F;
|
||||||
|
|
||||||
--syntax-tab-size: 2;
|
--syntax-tab-size: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
:root {
|
:root {
|
||||||
--color-gray-20: #e0e0e0;
|
--color-gray-20: #e0e0e0;
|
||||||
--color-gray-50: #C0C0C0;
|
--color-gray-50: #C0C0C0;
|
||||||
--color-gray-90: #dad8d8;
|
--color-gray-90: #dad8d8;
|
||||||
|
|
||||||
/* --text-color is assigned to --color-gray-_ above */
|
/* --text-color is assigned to --color-gray-_ above */
|
||||||
--text-color-link: #1493fb;
|
--text-color-link: #1493fb;
|
||||||
--text-color-link-active: #6969f7;
|
--text-color-link-active: #6969f7;
|
||||||
--text-color-link-visited: #a6a6f8;
|
--text-color-link-visited: #a6a6f8;
|
||||||
|
|
||||||
--background-color: #15202b;
|
--background-color: #15202b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Global stylesheet */
|
/* Global stylesheet */
|
||||||
* {
|
* {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
html,
|
html,
|
||||||
body {
|
body {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
font-family: var(--font-family);
|
font-family: var(--font-family);
|
||||||
color: var(--text-color);
|
color: var(--text-color);
|
||||||
background-color: var(--background-color);
|
background-color: var(--background-color);
|
||||||
}
|
}
|
||||||
html {
|
html {
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
}
|
}
|
||||||
body {
|
body {
|
||||||
max-width: 40em;
|
max-width: 40em;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* https://www.a11yproject.com/posts/how-to-hide-content/ */
|
/* https://www.a11yproject.com/posts/how-to-hide-content/ */
|
||||||
.visually-hidden {
|
.visually-hidden {
|
||||||
clip: rect(0 0 0 0);
|
clip: rect(0 0 0 0);
|
||||||
clip-path: inset(50%);
|
clip-path: inset(50%);
|
||||||
height: 1px;
|
height: 1px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
width: 1px;
|
width: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
p:last-child {
|
p:last-child {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
p {
|
p {
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
li {
|
li {
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
a[href] {
|
a[href] {
|
||||||
color: var(--text-color-link);
|
color: var(--text-color-link);
|
||||||
}
|
}
|
||||||
a[href]:visited {
|
a[href]:visited {
|
||||||
color: var(--text-color-link-visited);
|
color: var(--text-color-link-visited);
|
||||||
}
|
}
|
||||||
a[href]:hover,
|
a[href]:hover,
|
||||||
a[href]:active {
|
a[href]:active {
|
||||||
color: var(--text-color-link-active);
|
color: var(--text-color-link-active);
|
||||||
}
|
}
|
||||||
|
|
||||||
main {
|
main {
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
}
|
}
|
||||||
main :first-child {
|
main :first-child {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
border-bottom: 1px dashed var(--color-gray-20);
|
border-bottom: 1px dashed var(--color-gray-20);
|
||||||
}
|
}
|
||||||
header:after {
|
header:after {
|
||||||
content: "";
|
content: "";
|
||||||
display: table;
|
display: table;
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
|
|
||||||
.links-nextprev {
|
.links-nextprev {
|
||||||
@ -112,152 +112,153 @@ header:after {
|
|||||||
}
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
margin: 1em 0;
|
margin: 1em 0;
|
||||||
}
|
}
|
||||||
table td,
|
table td,
|
||||||
table th {
|
table th {
|
||||||
padding-right: 1em;
|
padding-right: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre,
|
pre,
|
||||||
code {
|
code {
|
||||||
font-family: var(--font-family-monospace);
|
font-family: var(--font-family-monospace);
|
||||||
}
|
}
|
||||||
pre:not([class*="language-"]) {
|
pre:not([class*="language-"]) {
|
||||||
margin: .5em 0;
|
margin: .5em 0;
|
||||||
line-height: 1.375; /* 22px /16 */
|
line-height: 1.375; /* 22px /16 */
|
||||||
-moz-tab-size: var(--syntax-tab-size);
|
-moz-tab-size: var(--syntax-tab-size);
|
||||||
-o-tab-size: var(--syntax-tab-size);
|
-o-tab-size: var(--syntax-tab-size);
|
||||||
tab-size: var(--syntax-tab-size);
|
tab-size: var(--syntax-tab-size);
|
||||||
-webkit-hyphens: none;
|
-webkit-hyphens: none;
|
||||||
-ms-hyphens: none;
|
-ms-hyphens: none;
|
||||||
hyphens: none;
|
hyphens: none;
|
||||||
direction: ltr;
|
direction: ltr;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
white-space: pre;
|
white-space: pre;
|
||||||
word-spacing: normal;
|
word-spacing: normal;
|
||||||
word-break: normal;
|
word-break: normal;
|
||||||
}
|
}
|
||||||
code {
|
code {
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Header */
|
/* Header */
|
||||||
header {
|
header {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
gap: 1em .5em;
|
||||||
align-items: center;
|
flex-wrap: wrap;
|
||||||
padding: 1em;
|
align-items: center;
|
||||||
|
padding: 1em;
|
||||||
}
|
}
|
||||||
.home-link {
|
.home-link {
|
||||||
font-size: 1em; /* 16px /16 */
|
font-size: 1em; /* 16px /16 */
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
margin-right: 2em;
|
margin-right: 2em;
|
||||||
}
|
}
|
||||||
.home-link:link:not(:hover) {
|
.home-link:link:not(:hover) {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Nav */
|
/* Nav */
|
||||||
.nav {
|
.nav {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
.nav-item {
|
.nav-item {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: 1em;
|
margin-right: 1em;
|
||||||
}
|
}
|
||||||
.nav-item a[href]:not(:hover) {
|
.nav-item a[href]:not(:hover) {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
.nav a[href][aria-current="page"] {
|
.nav a[href][aria-current="page"] {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Posts list */
|
/* Posts list */
|
||||||
.postlist {
|
.postlist {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
padding-left: 1.5rem;
|
padding-left: 1.5rem;
|
||||||
}
|
}
|
||||||
.postlist-item {
|
.postlist-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
counter-increment: start-from -1;
|
counter-increment: start-from -1;
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
}
|
}
|
||||||
.postlist-item:before {
|
.postlist-item:before {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
content: "" counter(start-from, decimal-leading-zero) ". ";
|
content: "" counter(start-from, decimal-leading-zero) ". ";
|
||||||
line-height: 100%;
|
line-height: 100%;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
margin-left: -1.5rem;
|
margin-left: -1.5rem;
|
||||||
}
|
}
|
||||||
.postlist-date,
|
.postlist-date,
|
||||||
.postlist-item:before {
|
.postlist-item:before {
|
||||||
font-size: 0.8125em; /* 13px /16 */
|
font-size: 0.8125em; /* 13px /16 */
|
||||||
color: var(--color-gray-90);
|
color: var(--color-gray-90);
|
||||||
}
|
}
|
||||||
.postlist-date {
|
.postlist-date {
|
||||||
word-spacing: -0.5px;
|
word-spacing: -0.5px;
|
||||||
}
|
}
|
||||||
.postlist-link {
|
.postlist-link {
|
||||||
font-size: 1.1875em; /* 19px /16 */
|
font-size: 1.1875em; /* 19px /16 */
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
flex-basis: calc(100% - 1.5rem);
|
flex-basis: calc(100% - 1.5rem);
|
||||||
padding-left: .25em;
|
padding-left: .25em;
|
||||||
padding-right: .5em;
|
padding-right: .5em;
|
||||||
text-underline-position: from-font;
|
text-underline-position: from-font;
|
||||||
text-underline-offset: 0;
|
text-underline-offset: 0;
|
||||||
text-decoration-thickness: 1px;
|
text-decoration-thickness: 1px;
|
||||||
}
|
}
|
||||||
.postlist-item-active .postlist-link {
|
.postlist-item-active .postlist-link {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tags */
|
/* Tags */
|
||||||
.post-tag {
|
.post-tag {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
.postlist-item > .post-tag {
|
.postlist-item > .post-tag {
|
||||||
align-self: center;
|
align-self: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tags list */
|
/* Tags list */
|
||||||
.post-metadata {
|
.post-metadata {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: .5em;
|
gap: .5em;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
.post-metadata time {
|
.post-metadata time {
|
||||||
margin-right: 1em;
|
margin-right: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Direct Links / Markdown Headers */
|
/* Direct Links / Markdown Headers */
|
||||||
.direct-link {
|
.direct-link {
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
margin-left: .1em;
|
margin-left: .1em;
|
||||||
}
|
}
|
||||||
a[href].direct-link,
|
a[href].direct-link,
|
||||||
a[href].direct-link:visited {
|
a[href].direct-link:visited {
|
||||||
color: transparent;
|
color: transparent;
|
||||||
}
|
}
|
||||||
a[href].direct-link:focus,
|
a[href].direct-link:focus,
|
||||||
a[href].direct-link:focus:visited,
|
a[href].direct-link:focus:visited,
|
||||||
:hover > a[href].direct-link,
|
:hover > a[href].direct-link,
|
||||||
:hover > a[href].direct-link:visited {
|
:hover > a[href].direct-link:visited {
|
||||||
color: #aaa;
|
color: #aaa;
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/* Message Box */
|
/* Message Box */
|
||||||
.message-box {
|
.message-box {
|
||||||
--color-message-box: #ffc;
|
--color-message-box: #ffc;
|
||||||
|
|
||||||
display: block;
|
display: block;
|
||||||
background-color: var(--color-message-box);
|
background-color: var(--color-message-box);
|
||||||
color: var(--color-gray-90);
|
color: var(--color-gray-90);
|
||||||
padding: 1em 0.625em; /* 16px 10px /16 */
|
padding: 1em 0.625em; /* 16px 10px /16 */
|
||||||
}
|
}
|
||||||
.message-box ol {
|
.message-box ol {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
.message-box {
|
.message-box {
|
||||||
--color-message-box: #082840;
|
--color-message-box: #082840;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user