Apply CSS only to the specified page #1103
onurusluca
started this conversation in
Feature Requests
Replies: 2 comments 5 replies
-
I think there were discussions at some point regarding adding a data attribute, e.g. |
Beta Was this translation helpful? Give feedback.
2 replies
-
As a workaround, I believe you should be able to provide styles in the ---
title: Page with custom styles
head:
- tag: style
content: ":root { --sl-content-width: 100%; }"
--- |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What version of
starlight
are you using?0.11.2
What is your idea?
I wanted have a larger column for one of my pages so added this(as stated [here](https://starlight.astro.build/guides/css-and-tailwind
But the styles are applied everywhere even though I only want to have it in pages I want it. This of course applies to other styling as well.
Is there way to do this? If not, it'd be great to have it!
Maybe we can have an id or class for the page that we can select and apply CSS? Or maybe we can add styling to the header of the page?
Why is this feature necessary?
Because we sometimes need a custom styling for some pages only, not all.
Do you have examples of this feature in other projects?
No response
Participation
Beta Was this translation helpful? Give feedback.
All reactions