All the root styles so far
This commit is contained in:
parent
d18edef261
commit
1fac613c37
7 changed files with 251 additions and 210 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
@layer reset, typography, root, layout, template, page, utility;
|
@layer reset, typography, root, layout, section, page, utility;
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--black: 0, 0, 0;
|
--black: 0, 0, 0;
|
||||||
|
|
@ -72,28 +72,40 @@
|
||||||
--tag-hover-background-color: rgb(var(--super-dk-gray));
|
--tag-hover-background-color: rgb(var(--super-dk-gray));
|
||||||
--tag-hover-foreground-color: rgb(var(--mid-gray));
|
--tag-hover-foreground-color: rgb(var(--mid-gray));
|
||||||
|
|
||||||
|
--twitter-icon: url(/icons/twitter-dark.svg);
|
||||||
|
--github-icon: url(/icons/github-dark.svg);
|
||||||
|
--instagram-icon: url(/icons/instagram-dark.svg);
|
||||||
|
--feed-icon: url(/icons/rss-dark.svg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@layer root {
|
@layer root {
|
||||||
a { text-decoration: none; }
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
a:hover {
|
a:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
text-underline-offset: 0.12em;
|
text-decoration-style: solid;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.hover-only {
|
a.hover-only {
|
||||||
color: var(--color);
|
color: var(--color);
|
||||||
transition: color 0.2s;
|
transition: color 0.2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.hover-only:hover {
|
a.hover-only:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
transition: color 0.2s;
|
transition: color 0.2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
blockquote {
|
blockquote {
|
||||||
border-inline-start: 4px solid var(--separator-color);
|
--line-width: 4px;
|
||||||
padding-inline-start: 2rem;
|
|
||||||
margin-inline-start: 2rem;
|
border-inline-start: var(--line-width) solid var(--separator-color);
|
||||||
|
padding-inline-start: calc(3rem - var(--line-width));
|
||||||
|
margin-block: 0;
|
||||||
|
margin-inline: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
code {
|
code {
|
||||||
|
|
@ -102,6 +114,7 @@
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding-inline: 0.6rem;
|
padding-inline: 0.6rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
code.nobg {
|
code.nobg {
|
||||||
background: none;
|
background: none;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
|
|
@ -110,7 +123,9 @@
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
details { width: 100%; }
|
details {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
details:has(#TableOfContents) {
|
details:has(#TableOfContents) {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
@ -125,11 +140,14 @@
|
||||||
padding-top: calc(var(--body-item-spacing) / 10);
|
padding-top: calc(var(--body-item-spacing) / 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
html { background-color: var(--html-background-color); }
|
html {
|
||||||
|
background-color: var(--html-background-color);
|
||||||
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
height: auto;
|
height: auto;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
img.circular {
|
img.circular {
|
||||||
|
|
@ -140,18 +158,16 @@
|
||||||
|
|
||||||
main {
|
main {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
max-width: calc(var(--content-width) + 2 * var(--body-item-spacing));
|
margin-block-start: var(--body-item-spacing);
|
||||||
margin: var(--body-item-spacing) auto;
|
|
||||||
padding-inline: var(--body-item-spacing);
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav.bulleted > li:first-child::before {
|
nav.bulleted>li:first-child::before {
|
||||||
content: "";
|
content: "";
|
||||||
margin-inline: 0;
|
margin-inline: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav.bulleted > li::before {
|
nav.bulleted>li::before {
|
||||||
color: var(--heading-color);
|
color: var(--heading-color);
|
||||||
content: "•";
|
content: "•";
|
||||||
font-size: 60%;
|
font-size: 60%;
|
||||||
|
|
@ -163,76 +179,35 @@
|
||||||
ul,
|
ul,
|
||||||
ol,
|
ol,
|
||||||
dl,
|
dl,
|
||||||
ul > li,
|
ul>li,
|
||||||
ol > li,
|
ol>li,
|
||||||
dl > dt,
|
dl>dt {
|
||||||
ul > li > ul,
|
|
||||||
ul > li > ol,
|
|
||||||
ol > li > ul,
|
|
||||||
ol > li > ol {
|
|
||||||
margin-inline-start: calc(var(--body-item-spacing) + 2px);
|
margin-inline-start: calc(var(--body-item-spacing) + 2px);
|
||||||
}
|
}
|
||||||
|
|
||||||
header > span.series {
|
ul>li>ul,
|
||||||
|
ul>li>ol,
|
||||||
|
ol>li>ul,
|
||||||
|
ol>li>ol {
|
||||||
|
margin-inline-start: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
:is(ul, ol) > li {
|
||||||
|
margin-block-start: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
header>span.series {
|
||||||
font-size: 1.75rem;
|
font-size: 1.75rem;
|
||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
margin-inline-start: 0.5em;
|
margin-inline-start: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
header > span.series::before {
|
header>span.series::before {
|
||||||
color: var(--header-series-arrow-foreground-color);
|
color: var(--header-series-arrow-foreground-color);
|
||||||
content: "↳";
|
content: "↳";
|
||||||
margin-inline-end: 0.25em;
|
margin-inline-end: 0.25em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-list {
|
|
||||||
list-style: none;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
@supports (display: subgrid) {
|
|
||||||
.post-list {
|
|
||||||
align-items: baseline;
|
|
||||||
display: grid;
|
|
||||||
gap: 1em;
|
|
||||||
grid-template-columns:
|
|
||||||
minmax(150px, max-content) minmax(20px, max-content) 3px auto;
|
|
||||||
grid-template-areas: "month day line title";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.post-list li {
|
|
||||||
align-items: baseline;
|
|
||||||
border-radius: 6px;
|
|
||||||
display: grid;
|
|
||||||
gap: 1em;
|
|
||||||
padding: 0.1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.post-title {
|
|
||||||
align-items: baseline;
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: 0 4rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.post-title h1 {
|
|
||||||
flex-grow: 1;
|
|
||||||
font-size: 1.8em;
|
|
||||||
margin-block: 0;
|
|
||||||
padding-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.post-title > .post-date {
|
|
||||||
color: var(--light-dim);
|
|
||||||
display: inline-block;
|
|
||||||
font-size: 1.75rem;
|
|
||||||
inline-size: min-content;
|
|
||||||
letter-spacing: 1px;
|
|
||||||
margin-block-start: 0.5rem;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
table {
|
||||||
border: 1px solid var(--separator-color);
|
border: 1px solid var(--separator-color);
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
|
|
@ -240,8 +215,13 @@
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
td, th {
|
td,
|
||||||
|
th {
|
||||||
border: 1px solid var(--separator-color);
|
border: 1px solid var(--separator-color);
|
||||||
padding-inline: 1rem;
|
padding-inline: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p, ul {
|
||||||
|
grid-column: content-start / content-end;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
@layer root {
|
@layer root {
|
||||||
figcaption {
|
figcaption {
|
||||||
margin-block-start: 0.2em;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -9,17 +8,25 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
figure {
|
figure {
|
||||||
|
grid-column: content-start / content-end;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
margin-inline: 0;
|
margin-inline: 0;
|
||||||
|
min-width: fit-content;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
max-width: var(--content-width);
|
}
|
||||||
|
|
||||||
|
@media (max-width: 415px) {
|
||||||
|
figure {
|
||||||
|
grid-column: wide-content-start / wide-content-end;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
figure > .container {
|
figure > .container {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
|
||||||
gap: var(--body-item-spacing);
|
gap: var(--body-item-spacing);
|
||||||
|
justify-content: center;
|
||||||
|
min-width: fit-content;
|
||||||
}
|
}
|
||||||
|
|
||||||
figure.bordered {
|
figure.bordered {
|
||||||
|
|
@ -38,6 +45,12 @@
|
||||||
max-width: var(--content-width);
|
max-width: var(--content-width);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 414px) {
|
||||||
|
figure img {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
figure svg {
|
figure svg {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
|
|
|
||||||
47
assets/styles/root/050_generic_page.css
Normal file
47
assets/styles/root/050_generic_page.css
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
@layer root {
|
||||||
|
.page {
|
||||||
|
gap: var(--body-item-spacing) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page > header {
|
||||||
|
align-items: first baseline;
|
||||||
|
column-gap: 4rem;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 539px) {
|
||||||
|
.page > header {
|
||||||
|
grid-template-columns: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.page > header > time {
|
||||||
|
}
|
||||||
|
|
||||||
|
.page > header,
|
||||||
|
.page > footer {
|
||||||
|
grid-column: content-start / content-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page > header > :is(h1, h2, h3, h4, h5, h6) {
|
||||||
|
grid-column: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page > header > time {
|
||||||
|
grid-column: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page > article > * {
|
||||||
|
grid-column: gutter-start / gutter-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page > article > :not(blockquote, figure.code) {
|
||||||
|
margin-inline: var(--gutter-width);
|
||||||
|
}
|
||||||
|
|
||||||
|
.page > article > :not(:last-child) {
|
||||||
|
margin-block-end: var(--body-item-spacing);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
@layer root {
|
|
||||||
main > :first-child,
|
|
||||||
main > article > :first-child { margin-block-start: 0; }
|
|
||||||
main > :not(:last-child),
|
|
||||||
main > article > :not(:last-child) { margin-block-end: var(--body-item-spacing); }
|
|
||||||
main > :last-child,
|
|
||||||
main > article > :last-child { margin-block-end: 0; }
|
|
||||||
}
|
|
||||||
5
assets/styles/root/050_table_of_contents.css
Normal file
5
assets/styles/root/050_table_of_contents.css
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
aside#table-of-contents {
|
||||||
|
grid-column: wide-content-right / margin-right;
|
||||||
|
grid-row: 1 / -1;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -33,6 +33,7 @@
|
||||||
|
|
||||||
--color: rgba(var(--black), 0.8);
|
--color: rgba(var(--black), 0.8);
|
||||||
--a-color: rgb(var(--mid-blue));
|
--a-color: rgb(var(--mid-blue));
|
||||||
|
--a-underline-color: rgb(var(--sub-lt-gray));
|
||||||
--a-ruby-color: var(--color);
|
--a-ruby-color: var(--color);
|
||||||
--heading-color: rgb(var(--black));
|
--heading-color: rgb(var(--black));
|
||||||
--site-nav-link-color: var(--a-color);
|
--site-nav-link-color: var(--a-color);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
@layer utility {
|
@layer utility {
|
||||||
.centered { text-align: center; }
|
.centered { text-align: center; }
|
||||||
.float-right { float: right; }
|
.float-right {
|
||||||
|
float: right;
|
||||||
|
justify-self: end;
|
||||||
|
}
|
||||||
|
|
||||||
.nobreak { white-space: nowrap; }
|
.nobreak { white-space: nowrap; }
|
||||||
.noselect {
|
.noselect {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue