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 {
|
||||
--black: 0, 0, 0;
|
||||
|
|
@ -72,28 +72,40 @@
|
|||
--tag-hover-background-color: rgb(var(--super-dk-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 {
|
||||
a { text-decoration: none; }
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 0.12em;
|
||||
text-decoration-style: solid;
|
||||
}
|
||||
|
||||
a.hover-only {
|
||||
color: var(--color);
|
||||
transition: color 0.2s;
|
||||
}
|
||||
|
||||
a.hover-only:hover {
|
||||
text-decoration: underline;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
border-inline-start: 4px solid var(--separator-color);
|
||||
padding-inline-start: 2rem;
|
||||
margin-inline-start: 2rem;
|
||||
--line-width: 4px;
|
||||
|
||||
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 {
|
||||
|
|
@ -102,6 +114,7 @@
|
|||
display: inline-block;
|
||||
padding-inline: 0.6rem;
|
||||
}
|
||||
|
||||
code.nobg {
|
||||
background: none;
|
||||
border-radius: 0;
|
||||
|
|
@ -110,7 +123,9 @@
|
|||
padding: 0;
|
||||
}
|
||||
|
||||
details { width: 100%; }
|
||||
details {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
details:has(#TableOfContents) {
|
||||
box-sizing: border-box;
|
||||
|
|
@ -125,11 +140,14 @@
|
|||
padding-top: calc(var(--body-item-spacing) / 10);
|
||||
}
|
||||
|
||||
html { background-color: var(--html-background-color); }
|
||||
html {
|
||||
background-color: var(--html-background-color);
|
||||
}
|
||||
|
||||
img {
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
img.circular {
|
||||
|
|
@ -140,9 +158,7 @@
|
|||
|
||||
main {
|
||||
box-sizing: border-box;
|
||||
max-width: calc(var(--content-width) + 2 * var(--body-item-spacing));
|
||||
margin: var(--body-item-spacing) auto;
|
||||
padding-inline: var(--body-item-spacing);
|
||||
margin-block-start: var(--body-item-spacing);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
|
@ -165,12 +181,19 @@
|
|||
dl,
|
||||
ul>li,
|
||||
ol>li,
|
||||
dl > dt,
|
||||
dl>dt {
|
||||
margin-inline-start: calc(var(--body-item-spacing) + 2px);
|
||||
}
|
||||
|
||||
ul>li>ul,
|
||||
ul>li>ol,
|
||||
ol>li>ul,
|
||||
ol>li>ol {
|
||||
margin-inline-start: calc(var(--body-item-spacing) + 2px);
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
|
||||
:is(ul, ol) > li {
|
||||
margin-block-start: 1rem;
|
||||
}
|
||||
|
||||
header>span.series {
|
||||
|
|
@ -185,54 +208,6 @@
|
|||
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 {
|
||||
border: 1px solid var(--separator-color);
|
||||
border-collapse: collapse;
|
||||
|
|
@ -240,8 +215,13 @@
|
|||
width: 50%;
|
||||
}
|
||||
|
||||
td, th {
|
||||
td,
|
||||
th {
|
||||
border: 1px solid var(--separator-color);
|
||||
padding-inline: 1rem;
|
||||
}
|
||||
|
||||
p, ul {
|
||||
grid-column: content-start / content-end;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
@layer root {
|
||||
figcaption {
|
||||
margin-block-start: 0.2em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
|
@ -9,17 +8,25 @@
|
|||
}
|
||||
|
||||
figure {
|
||||
grid-column: content-start / content-end;
|
||||
margin: 0;
|
||||
margin-inline: 0;
|
||||
min-width: fit-content;
|
||||
overflow: hidden;
|
||||
max-width: var(--content-width);
|
||||
}
|
||||
|
||||
@media (max-width: 415px) {
|
||||
figure {
|
||||
grid-column: wide-content-start / wide-content-end;
|
||||
}
|
||||
}
|
||||
|
||||
figure > .container {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: var(--body-item-spacing);
|
||||
justify-content: center;
|
||||
min-width: fit-content;
|
||||
}
|
||||
|
||||
figure.bordered {
|
||||
|
|
@ -38,6 +45,12 @@
|
|||
max-width: var(--content-width);
|
||||
}
|
||||
|
||||
@media (max-width: 414px) {
|
||||
figure img {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
figure svg {
|
||||
width: 100%;
|
||||
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);
|
||||
--a-color: rgb(var(--mid-blue));
|
||||
--a-underline-color: rgb(var(--sub-lt-gray));
|
||||
--a-ruby-color: var(--color);
|
||||
--heading-color: rgb(var(--black));
|
||||
--site-nav-link-color: var(--a-color);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
@layer utility {
|
||||
.centered { text-align: center; }
|
||||
.float-right { float: right; }
|
||||
.float-right {
|
||||
float: right;
|
||||
justify-self: end;
|
||||
}
|
||||
|
||||
.nobreak { white-space: nowrap; }
|
||||
.noselect {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue