add another couple posts and start working on code styling
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
---
|
||||
import '@fontsource-variable/baskervville-sc';
|
||||
import '@styles/code.css';
|
||||
|
||||
import type { CollectionEntry } from 'astro:content';
|
||||
|
||||
|
||||
43
src/styles/code.css
Normal file
43
src/styles/code.css
Normal file
@@ -0,0 +1,43 @@
|
||||
/* fira-code-latin-wght-normal */
|
||||
@font-face {
|
||||
font-family: 'Fira Code Variable';
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
font-weight: 300 700;
|
||||
src: url(https://cdn.jsdelivr.net/fontsource/fonts/fira-code:vf@latest/latin-wght-normal.woff2) format('woff2-variations');
|
||||
unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: 'Fira Code Variable';
|
||||
}
|
||||
|
||||
pre.astro-code {
|
||||
padding: 1em;
|
||||
margin: 1em 0;
|
||||
border-radius: 0.3em;
|
||||
|
||||
font-size: var(--content-size-sm);
|
||||
}
|
||||
|
||||
:root[data-theme="dark"] .astro-code,
|
||||
:root[data-theme="dark"] .astro-code span {
|
||||
color: var(--shiki-dark) !important;
|
||||
background-color: var(--shiki-dark-bg) !important;
|
||||
/* Optional, if you also want font styles */
|
||||
font-style: var(--shiki-dark-font-style) !important;
|
||||
font-weight: var(--shiki-dark-font-weight) !important;
|
||||
text-decoration: var(--shiki-dark-text-decoration) !important;
|
||||
}
|
||||
|
||||
@media(prefers-color-scheme: dark) {
|
||||
:root:not([data-theme="light"]) .astro-code,
|
||||
:root:not([data-theme="light"]) .astro-code span {
|
||||
color: var(--shiki-dark) !important;
|
||||
background-color: var(--shiki-dark-bg) !important;
|
||||
/* Optional, if you also want font styles */
|
||||
font-style: var(--shiki-dark-font-style) !important;
|
||||
font-weight: var(--shiki-dark-font-weight) !important;
|
||||
text-decoration: var(--shiki-dark-text-decoration) !important;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user