Initial commit from Astro

This commit is contained in:
houston[bot]
2026-01-29 10:17:40 +01:00
committed by vorpax
commit c29b05bff3
123 changed files with 12279 additions and 0 deletions

70
src/styles/global.css Normal file
View File

@@ -0,0 +1,70 @@
@import "tailwindcss";
@import "./typography.css";
@custom-variant dark (&:where([data-theme=dark], [data-theme=dark] *));
:root,
html[data-theme="light"] {
--background: #fdfdfd;
--foreground: #282728;
--accent: #006cac;
--muted: #e6e6e6;
--border: #ece9e9;
}
html[data-theme="dark"] {
--background: #212737;
--foreground: #eaedf3;
--accent: #ff6b01;
--muted: #343f60;
--border: #ab4b08;
}
@theme inline {
--font-app: var(--font-google-sans-code);
--color-background: var(--background);
--color-foreground: var(--foreground);
--color-accent: var(--accent);
--color-muted: var(--muted);
--color-border: var(--border);
}
@layer base {
* {
@apply border-border outline-accent/75;
scrollbar-width: auto;
scrollbar-color: var(--color-muted) transparent;
}
html {
@apply overflow-y-scroll scroll-smooth;
}
body {
@apply flex min-h-svh flex-col bg-background font-app text-foreground selection:bg-accent/75 selection:text-background;
}
a,
button {
@apply outline-offset-1 outline-accent focus-visible:no-underline focus-visible:outline-2 focus-visible:outline-dashed;
}
button:not(:disabled),
[role="button"]:not(:disabled) {
cursor: pointer;
}
}
@utility max-w-app {
@apply max-w-3xl;
}
@utility app-layout {
@apply mx-auto w-full max-w-app px-4;
}
.active-nav {
@apply underline decoration-wavy decoration-2 underline-offset-8;
}
/* Source: https://piccalil.li/blog/a-more-modern-css-reset/ */
/* Anything that has been anchored to should have extra scroll margin */
:target {
scroll-margin-block: 1rem;
}

119
src/styles/typography.css Normal file
View File

@@ -0,0 +1,119 @@
@plugin "@tailwindcss/typography";
@layer base {
/* ===== Override default Tailwind Typography styles ===== */
.app-prose {
@apply prose;
h1,
h2,
h3,
h4,
th {
@apply mb-3 text-foreground;
}
h3 {
@apply italic;
}
p,
strong,
ol,
ul,
figcaption,
table,
code {
@apply text-foreground;
}
a {
@apply wrap-break-word text-foreground decoration-dashed underline-offset-4 hover:text-accent focus-visible:no-underline;
}
ul {
@apply overflow-x-clip;
}
li {
@apply marker:text-accent;
}
hr {
@apply border-border;
}
img {
@apply mx-auto border border-border;
}
figcaption {
@apply opacity-75;
}
table {
th,
td {
@apply border border-border p-2;
}
th {
@apply py-1.5;
}
code {
@apply break-all sm:break-normal;
}
}
code {
@apply rounded bg-muted/75 p-1 wrap-break-word text-foreground before:content-none after:content-none;
}
.astro-code code {
@apply flex-[1_0_100%] bg-inherit p-0;
}
blockquote {
@apply border-s-accent/80 wrap-break-word opacity-80;
}
details {
@apply inline-block cursor-pointer text-foreground select-none [&_p]:hidden [&_ul]:my-0!;
}
summary {
@apply focus-visible:no-underline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-accent focus-visible:outline-dashed;
}
pre {
@apply focus-visible:border-transparent focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-dashed;
}
}
/* ===== Code Blocks & Syntax Highlighting ===== */
.astro-code {
@apply flex border bg-(--shiki-light-bg) text-(--shiki-light) outline-border [&_span]:text-(--shiki-light);
}
html[data-theme="dark"] .astro-code {
@apply bg-(--shiki-dark-bg) text-(--shiki-dark) [&_span]:text-(--shiki-dark);
}
/* Styles for Shiki transformers */
/* https://shiki.style/packages/transformers */
.astro-code {
.line.diff.add {
@apply relative inline-block w-full bg-green-400/20 before:absolute before:-left-3 before:text-green-500 before:content-['+'];
}
.line.diff.remove {
@apply relative inline-block w-full bg-red-500/20 before:absolute before:-left-3 before:text-red-500 before:content-['-'];
}
.line.highlighted {
@apply inline-block w-full bg-slate-400/20;
}
.highlighted-word {
@apply rounded-sm border border-border px-0.5 py-px;
}
}
}