From 33197b013f3c643d6c6dada41470459d2f90b4c0 Mon Sep 17 00:00:00 2001 From: LynithDev <61880709+LynithDev@users.noreply.github.com> Date: Sun, 15 Oct 2023 22:02:04 +0200 Subject: Add nesting --- apps/website/astro.config.ts | 14 +++++++++++++- apps/website/src/components/base/Header.astro | 11 +++++++++-- apps/website/src/pages/index.astro | 6 ++++-- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/apps/website/astro.config.ts b/apps/website/astro.config.ts index 98351a4..76dbdbe 100644 --- a/apps/website/astro.config.ts +++ b/apps/website/astro.config.ts @@ -1,7 +1,19 @@ import tailwind from '@astrojs/tailwind'; import { defineConfig } from 'astro/config'; +// @ts-ignore - Tailwind doesn't have types for this yet +import postcssNesting from "tailwindcss/nesting"; + // https://astro.build/config export default defineConfig({ - integrations: [tailwind()] + integrations: [tailwind()], + vite: { + css: { + postcss: { + plugins: [ + postcssNesting, + ] + } + } + } }); diff --git a/apps/website/src/components/base/Header.astro b/apps/website/src/components/base/Header.astro index ad8267b..1201798 100644 --- a/apps/website/src/components/base/Header.astro +++ b/apps/website/src/components/base/Header.astro @@ -7,7 +7,7 @@ const sizes = { "md": "h3", "sm": "h4", "xs": "h5", - "xxs": "h6" + "xxs": "h6" }; type Headers = "h1" | "h2" | "h3" | "h4" | "h5" | "h6"; @@ -54,4 +54,11 @@ const Element = sizes[size] as any; // Unfortunately gotta do this font-size: theme("fontSize.body-sm"); font-weight: 500; } - \ No newline at end of file + + h1, h2, h3, h4, h5, h6 { + & :global(b) { + @apply text-blue-500; + font-weight: inherit; + } + } + diff --git a/apps/website/src/pages/index.astro b/apps/website/src/pages/index.astro index a484172..837f866 100644 --- a/apps/website/src/pages/index.astro +++ b/apps/website/src/pages/index.astro @@ -5,6 +5,8 @@ import Logo from "@components/logos/Logo.astro"; --- -
test
-
Test
+
+ +
Meet OneConfig, the library for everyone.
+
-- cgit