From dc42569bddfae2c48ea60c0dd5cc70643a129a68 Mon Sep 17 00:00:00 2001 From: Chris Swithinbank Date: Tue, 11 Jul 2023 12:26:08 +0200 Subject: Add a `not-content` CSS class for opting out of default styles (#313) Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> --- .changeset/clean-lamps-juggle.md | 5 ++ docs/src/components/about-astro.astro | 3 +- docs/src/components/file-tree.astro | 17 ++--- docs/src/content/docs/guides/components.mdx | 14 +++++ .../starlight/components/MarkdownContent.astro | 72 +++++++++++++--------- packages/starlight/user-components/Tabs.astro | 5 +- 6 files changed, 74 insertions(+), 42 deletions(-) create mode 100644 .changeset/clean-lamps-juggle.md diff --git a/.changeset/clean-lamps-juggle.md b/.changeset/clean-lamps-juggle.md new file mode 100644 index 00000000..cbbc92ad --- /dev/null +++ b/.changeset/clean-lamps-juggle.md @@ -0,0 +1,5 @@ +--- +'@astrojs/starlight': minor +--- + +Add a `not-content` CSS class that allows users to opt out of Starlight’s default content styling diff --git a/docs/src/components/about-astro.astro b/docs/src/components/about-astro.astro index fb1815a1..4d661444 100644 --- a/docs/src/components/about-astro.astro +++ b/docs/src/components/about-astro.astro @@ -6,7 +6,7 @@ interface Props { const { title } = Astro.props; --- -
+
{title} Astro @@ -36,7 +36,6 @@ const { title } = Astro.props; gap: 0.5rem; } article > :global(*) { - margin-top: 0 !important; max-width: 50ch; } small { diff --git a/docs/src/components/file-tree.astro b/docs/src/components/file-tree.astro index b2158bdd..238fa7cb 100644 --- a/docs/src/components/file-tree.astro +++ b/docs/src/components/file-tree.astro @@ -17,7 +17,11 @@ const processedContent = await fileTreeProcessor.process({ }); --- - +