Vendor article styles into site packages
Some checks are pending
Build / build (push) Waiting to run
Some checks are pending
Build / build (push) Waiting to run
This commit is contained in:
parent
8d391a2e5e
commit
7ea3a668b1
14 changed files with 2429 additions and 7 deletions
346
sites/reflections/src/styles/article.css
Normal file
346
sites/reflections/src/styles/article.css
Normal file
|
|
@ -0,0 +1,346 @@
|
|||
.blog-post-shell {
|
||||
width: min(100% - 2rem, 94rem);
|
||||
margin-inline: auto;
|
||||
padding: 3rem 1.75rem 4.5rem;
|
||||
}
|
||||
|
||||
.blog-article {
|
||||
width: 100%;
|
||||
margin-inline: auto;
|
||||
max-width: 82rem;
|
||||
}
|
||||
|
||||
.blog-post-header {
|
||||
margin-bottom: 2rem;
|
||||
border-bottom: 1px solid hsl(var(--border));
|
||||
padding-bottom: 1.35rem;
|
||||
}
|
||||
|
||||
.blog-post-meta {
|
||||
color: hsl(var(--muted-foreground));
|
||||
font-family: var(--font-mono);
|
||||
font-size: 0.75rem;
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.blog-post-header .blog-post-title {
|
||||
margin-top: 0.65rem;
|
||||
color: hsl(var(--foreground));
|
||||
font-size: clamp(1.9rem, 3.2vw, 2.45rem);
|
||||
font-weight: 650;
|
||||
line-height: 1.08;
|
||||
}
|
||||
|
||||
.blog-post-description {
|
||||
margin-top: 0.8rem;
|
||||
max-width: 42rem;
|
||||
color: hsl(var(--muted-foreground));
|
||||
font-size: 1rem;
|
||||
line-height: 1.65;
|
||||
}
|
||||
|
||||
.blog-post-hero-image {
|
||||
margin: 2rem auto;
|
||||
overflow: hidden;
|
||||
border: 1px solid hsl(var(--border));
|
||||
border-radius: 0.75rem;
|
||||
}
|
||||
|
||||
.blog-post-hero-image img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.article-content {
|
||||
color: hsl(var(--foreground));
|
||||
font-family: var(--font-heliotrope);
|
||||
font-size: 1.0625rem;
|
||||
line-height: 1.78;
|
||||
}
|
||||
|
||||
.article-content > * + * {
|
||||
margin-top: 1.2rem;
|
||||
}
|
||||
|
||||
.article-content :where(h1, h2, h3, h4, h5, h6) {
|
||||
color: hsl(var(--foreground));
|
||||
font-family: var(--font-fraunces);
|
||||
font-style: normal;
|
||||
font-weight: 650;
|
||||
letter-spacing: 0;
|
||||
line-height: 1.18;
|
||||
}
|
||||
|
||||
.article-content :where(h1) {
|
||||
margin-top: 2.4rem;
|
||||
font-size: clamp(1.65rem, 2.5vw, 2.1rem);
|
||||
}
|
||||
|
||||
.article-content :where(h2) {
|
||||
margin-top: 2.15rem;
|
||||
font-size: clamp(1.38rem, 2.1vw, 1.72rem);
|
||||
}
|
||||
|
||||
.article-content :where(h3) {
|
||||
margin-top: 1.85rem;
|
||||
font-size: clamp(1.15rem, 1.75vw, 1.35rem);
|
||||
}
|
||||
|
||||
.article-content :where(h4, h5, h6) {
|
||||
margin-top: 1.5rem;
|
||||
font-size: 1.05rem;
|
||||
}
|
||||
|
||||
.article-content :where(p, ul, ol, blockquote, pre, table, figure, iframe) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.article-content :where(hr) {
|
||||
margin-block: 2rem;
|
||||
border: 0;
|
||||
border-top: 1px solid hsl(var(--border));
|
||||
}
|
||||
|
||||
.article-content :where(ul, ol) {
|
||||
padding-left: 1.35rem;
|
||||
}
|
||||
|
||||
.article-content :where(li + li) {
|
||||
margin-top: 0.35rem;
|
||||
}
|
||||
|
||||
.article-content :where(a) {
|
||||
color: hsl(var(--primary));
|
||||
text-decoration-line: underline;
|
||||
text-decoration-thickness: 0.08em;
|
||||
text-underline-offset: 0.18em;
|
||||
}
|
||||
|
||||
.article-content :where(code) {
|
||||
border: 1px solid hsl(var(--border));
|
||||
border-radius: 0.25rem;
|
||||
background: hsl(var(--muted));
|
||||
padding: 0.08rem 0.28rem;
|
||||
font-family: var(--font-mono);
|
||||
font-size: 0.88em;
|
||||
}
|
||||
|
||||
.article-content :where(pre) {
|
||||
overflow-x: auto;
|
||||
border: 1px solid hsl(var(--border));
|
||||
border-radius: 0.65rem;
|
||||
background: hsl(var(--muted));
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.article-content :where(pre code) {
|
||||
border: 0;
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.article-content :where(blockquote) {
|
||||
margin-inline: 0;
|
||||
border-left: 3px solid hsl(var(--border));
|
||||
padding: 0.15rem 0 0.15rem 1rem;
|
||||
color: color-mix(in srgb, hsl(var(--foreground)) 82%, transparent);
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.article-content :where(blockquote p) {
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.article-content :where(blockquote h1) {
|
||||
font-size: 1.45rem;
|
||||
}
|
||||
|
||||
.article-content :where(blockquote h2) {
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
|
||||
.article-content :where(blockquote h3) {
|
||||
font-size: 1.12rem;
|
||||
}
|
||||
|
||||
.article-content :where(.callout) {
|
||||
margin-block: 1.6rem;
|
||||
border: 1px solid hsl(var(--border));
|
||||
border-left: 3px solid hsl(var(--primary));
|
||||
border-radius: 0.55rem;
|
||||
background: color-mix(in srgb, hsl(var(--accent)) 34%, transparent);
|
||||
padding: 1.05rem 1.25rem;
|
||||
color: hsl(var(--foreground));
|
||||
font-size: 0.98em;
|
||||
line-height: 1.68;
|
||||
}
|
||||
|
||||
.article-content :where(.callout > *:first-child) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.article-content :where(.callout > *:last-child) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.article-content :where(.callout > * + *) {
|
||||
margin-top: 0.8rem;
|
||||
}
|
||||
|
||||
.article-content :where(.callout h1) {
|
||||
font-size: 1.35rem;
|
||||
}
|
||||
|
||||
.article-content :where(.callout h2) {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
.article-content :where(.callout h3) {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.article-content :where(.callout h1, .callout h2, .callout h3, .callout h4) {
|
||||
margin-bottom: 0.35rem;
|
||||
}
|
||||
|
||||
.article-content :where(.callout hr) {
|
||||
margin-block: 1rem;
|
||||
border-top-color: color-mix(in srgb, hsl(var(--border)) 70%, transparent);
|
||||
}
|
||||
|
||||
.article-content :where(.callout img) {
|
||||
max-width: min(100%, 34rem);
|
||||
}
|
||||
|
||||
.article-content :where(aside:not(.callout)) {
|
||||
margin-block: 1.5rem;
|
||||
border: 1px solid hsl(var(--border));
|
||||
border-left: 3px solid hsl(var(--primary));
|
||||
border-radius: 0.55rem;
|
||||
background: color-mix(in srgb, hsl(var(--accent)) 28%, transparent);
|
||||
padding: 1rem 1.15rem;
|
||||
font-size: 0.98em;
|
||||
line-height: 1.68;
|
||||
}
|
||||
|
||||
.article-content :where(img) {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
margin-inline: auto;
|
||||
border-radius: 0.35rem;
|
||||
}
|
||||
|
||||
.article-content :where(figure) {
|
||||
margin-inline: 0;
|
||||
}
|
||||
|
||||
.article-content :where(figcaption) {
|
||||
color: hsl(var(--muted-foreground));
|
||||
font-size: 0.92rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.article-content :where(iframe) {
|
||||
display: block;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
aspect-ratio: 16 / 9;
|
||||
height: auto;
|
||||
margin-inline: auto;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.article-content :where(table) {
|
||||
display: block;
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.article-content :where(th, td) {
|
||||
border: 1px solid hsl(var(--border));
|
||||
padding: 0.45rem 0.6rem;
|
||||
}
|
||||
|
||||
.article-content :where(.twitter-tweet) {
|
||||
max-width: 100% !important;
|
||||
margin: 1.5rem auto !important;
|
||||
}
|
||||
|
||||
.article-content :where(.katex) {
|
||||
font-size: 1.02em;
|
||||
}
|
||||
|
||||
.article-content :where(.katex-display) {
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
padding: 0.25rem 0;
|
||||
}
|
||||
|
||||
.article-content :where(sup) {
|
||||
line-height: 0;
|
||||
}
|
||||
|
||||
.article-content :where(a[data-footnote-ref]) {
|
||||
border-radius: 999px;
|
||||
padding-inline: 0.16rem;
|
||||
font-family: var(--font-mono);
|
||||
font-size: 0.72em;
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.article-content :where([data-footnotes]) {
|
||||
margin-top: 3rem;
|
||||
border-top: 1px solid hsl(var(--border));
|
||||
padding-top: 1.15rem;
|
||||
color: hsl(var(--muted-foreground));
|
||||
font-size: 0.92rem;
|
||||
line-height: 1.62;
|
||||
}
|
||||
|
||||
.article-content :where([data-footnotes] h2) {
|
||||
margin: 0 0 0.8rem;
|
||||
color: hsl(var(--muted-foreground));
|
||||
font-family: var(--font-mono);
|
||||
font-size: 0.72rem;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.article-content :where([data-footnotes] ol) {
|
||||
padding-left: 1.25rem;
|
||||
}
|
||||
|
||||
.article-content :where([data-footnotes] li + li) {
|
||||
margin-top: 0.55rem;
|
||||
}
|
||||
|
||||
.article-content :where([data-footnotes] p) {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.article-content :where(a[data-footnote-backref]) {
|
||||
margin-left: 0.25rem;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.blog-post-shell {
|
||||
padding-top: 4rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.blog-post-shell {
|
||||
padding-inline: 1.15rem;
|
||||
}
|
||||
|
||||
.article-content {
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
@import "tailwindcss";
|
||||
@import "katex/dist/katex.min.css";
|
||||
@import "../../../../src/styles/article.css";
|
||||
@import "./article.css";
|
||||
|
||||
@plugin 'tailwindcss-animate';
|
||||
@plugin '@tailwindcss/typography';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue