New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Badge styles break when refreshing with sidebar entry active #1764
Comments
Thanks for your report. I think in this case there are multiple issues. First, in your steps, you mention styles being broken in step 5 after a refresh. I think the style are actually broken after the step 3: The badge style is not updated and it should be to match Starlight default behavior when navigating to a page with a badge and get an outlined style: This first issue seems to be related to view transitions and the usage of I opened an issue for this first issue in the However, I think there is a second issue with the outlined badge style with Tailwind as we can see in the 2 previous screenshots. The badge outline with Tailwind is way thicker than the default Starlight one. The issue in this case seems to be that we internally use the Without this extra style, the style looks closer to the default Starlight one: |
Hi @kevin8181, I'm sorry that |
To clarify, I think this issue also spotted a Starlight issue too so definitely not just a potential |
Haha, I didn't take it that way either! I'm happy when we can help fix bugs. And it's even more motivating when you know that people are using the things you make, so I don't want to keep you waiting too long ;-) |
Here is my preliminary analysis: I assumed that Starlight made the styling of active sidebar entries solely dependent on The Starlight support of The solution for the bag would be to do a) and b). But if Starlight changes the content class due to the overlap with Tailwind, it would be good to know what the future Starlight solution looks like. |
Of course, I would also be happy if Starlight would not set the <style is:global>
[aria-current="page"] .sl-badge {
--sl-color-bg-badge: transparent;
--sl-color-border-badge: currentColor;
color: inherit;
}
</style> But I understand if there are concerns, as |
@hippotastic can't someone ;-) add Expressive Code to GitHub, PLEASE! |
If you want to go that route, I offer to do a PR for it. Edited: After having a second look I would say it would fit very well to the other |
This could indeed be a solution to use a selector like |
Saw that, thank you! Love #1530, @kevinzunigacuellar already did all the work. That PR would reestablish my earlier assumption that sidebar current entry styling only depends on |
What version of
starlight
are you using?0.21.5
What version of
astro
are you using?4.3.5
What package manager are you using?
npm
What operating system are you using?
Linux
What browser are you using?
Firefox and chromium
Describe the Bug
live demo https://starlight-lovat.vercel.app/
Link to Minimal Reproducible Example
https://github.com/tgoHQ/knowledgebase
Participation
The text was updated successfully, but these errors were encountered: