Skip to content
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

Show how to merge classes passed as props when children have existing classes #7268

Open
aretrace opened this issue Mar 9, 2024 · 1 comment
Labels
add new content Document something that is not in docs. May require testing, confirmation, or affect other pages.

Comments

@aretrace
Copy link

aretrace commented Mar 9, 2024

📚 Subject area/topic

Component classes

📋 Suggested page

https://docs.astro.build/en/guides/styling/#passing-a-class-to-a-child-component

📋 General description or bullet points (if proposing new content)

Currently, the docs do not show what to do when you pass a class to a child component while the component already has its classes. How would you merge the class passed as a prop with the existing classes in a child component?

🖥️ Reproduction of code samples in StackBlitz

No response

@aretrace aretrace added the add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. label Mar 9, 2024
@mingjunlu
Copy link
Contributor

mingjunlu commented Mar 14, 2024

Hi @aretrace,

On the same page, there's a section called Combining classes with class:list describing how to do so 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add new content Document something that is not in docs. May require testing, confirmation, or affect other pages.
Projects
None yet
Development

No branches or pull requests

2 participants