make use of new lightdark css feature
This commit is contained in:
parent
56eb0a2e41
commit
4806fdd248
5 changed files with 179 additions and 37 deletions
|
@ -19,6 +19,7 @@ export async function GET(context: { site: string }) {
|
|||
title: SITE.TITLE,
|
||||
description: SITE.DESCRIPTION,
|
||||
site: context.site,
|
||||
stylesheet: "/rss/styles.xsl",
|
||||
items: items.map((item) => ({
|
||||
title: item.data.title,
|
||||
description: item.data.description,
|
||||
|
|
|
@ -80,20 +80,14 @@
|
|||
}
|
||||
|
||||
:root {
|
||||
--primary: var(--color-neutral-50);
|
||||
--secondary: var(--color-neutral-950);
|
||||
--tertiary: var(--color-neutral-500);
|
||||
--accent: var(--color-neutral-700);
|
||||
color-scheme: light dark;
|
||||
--primary: light-dark(var(--color-neutral-50), var(--color-black));
|
||||
--secondary: light-dark(var(--color-neutral-950), var(--color-neutral-50));
|
||||
--tertiary: light-dark(var(--color-neutral-500), var(--color-neutral-500));
|
||||
--accent: light-dark(var(--color-neutral-700), var(--color-neutral-300));
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--primary: var(--color-black);
|
||||
--secondary: var(--color-neutral-50);
|
||||
--tertiary: var(--color-neutral-500);
|
||||
--accent: var(--color-neutral-300);
|
||||
}
|
||||
|
||||
.astro-code,
|
||||
.astro-code span {
|
||||
color: var(--shiki-dark) !important;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue