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

Use [hidden] instead of template in space/divide utilities #2642

Merged
merged 2 commits into from
Oct 21, 2020

Conversation

adamwathan
Copy link
Member

This PR updates the selectors for the space and divide utilities to be less-Alpine specific and more universally useful by rewriting them like this:

- .space-x-4 > :not(template) ~ :not(template)
+ .space-x-4 > :not([hidden]) ~ :not([hidden])

Now any hidden element will not be considered when deciding which elements to apply the margin/border to. This is still not "perfect" in the sense that it can't account for arbitrary usage of display: none and stuff via CSS, but it is much more universally useful than just looking at template tags.

This is a breaking change for Alpine users but they can get around it by adding hidden to their template tags:

- <template>
+ <template hidden>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant