feat: add design system tokens to Tailwind

This commit is contained in:
achmad
2026-05-28 22:24:49 +07:00
parent a24936d9d7
commit 6b4c8397d8
2 changed files with 85 additions and 26 deletions
+45 -18
View File
@@ -2,26 +2,53 @@
@tailwind components;
@tailwind utilities;
:root {
--background: #ffffff;
--foreground: #171717;
}
@media (prefers-color-scheme: dark) {
:root {
--background: #0a0a0a;
--foreground: #ededed;
@layer base {
body {
@apply bg-bg text-text-primary antialiased;
}
}
body {
color: var(--foreground);
background: var(--background);
font-family: Arial, Helvetica, sans-serif;
}
@layer utilities {
.text-balance {
text-wrap: balance;
@layer components {
.article-body {
@apply text-base leading-relaxed text-text-secondary;
}
.article-body p {
@apply mb-5;
}
.article-body h2 {
@apply text-2xl font-bold text-text-primary mt-9 mb-4;
}
.article-body h3 {
@apply text-xl font-semibold text-text-primary mt-7 mb-3;
}
.article-body strong {
@apply text-text-primary font-semibold;
}
.article-body a {
@apply text-accent underline hover:text-accent-hover;
}
.article-body ul {
@apply list-disc pl-6 mb-5 space-y-1;
}
.article-body ol {
@apply list-decimal pl-6 mb-5 space-y-1;
}
.article-body blockquote {
@apply border-l-4 border-accent bg-bg-card rounded-r-md pl-5 pr-4 py-3 my-6;
}
.article-body blockquote p {
@apply mb-0 italic;
}
.article-body img {
@apply rounded-md w-full my-6;
}
.article-body code:not(pre code) {
@apply bg-bg-card text-accent font-mono text-sm px-1.5 py-0.5 rounded;
}
.article-body pre {
@apply bg-bg-card rounded-md p-4 overflow-x-auto my-6 text-sm font-mono;
}
.article-body hr {
@apply border-border my-8;
}
}