You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The generated child selectors for space and divide should exclude absolute positioned elements. The current selector includes elements that have been pulled out of the document flow.
For example, space-y-4 also applies the margin to an absolute positioned child element, and divide-y applies a border to it. See the codepen below.
/* this should also exclude > .absolute */
.space-x-5>:not(template) ~:not(template) {
--space-x-reverse:0;
margin-right:calc(1.25rem*var(--space-x-reverse));
margin-left:calc(1.25rem*calc(1-var(--space-x-reverse)));
}
Hey! Unfortunately this isn't really feasible — it's not possible for us to know if a child is absolutely positioned because any custom class could be adding that style.
These classes aren't meant to be anything fancy or sophisticated, they are just a shortcut for adding margin/borders to all but the first element in a group. Make sure the group only contains elements you actually want to target 👍🏻 If that's not possible, then just apply the margin/border manually to the children that should receive it like you would have done before these features were added.
Here's a fork of your Codepen that demonstrates how I would handle it:
Describe the problem:
The generated child selectors for
space
anddivide
should exclude absolute positioned elements. The current selector includes elements that have been pulled out of the document flow.For example,
space-y-4
also applies the margin to an absolute positioned child element, anddivide-y
applies a border to it. See the codepen below.Link to a minimal reproduction:
https://codepen.io/smeijer/pen/vYGoVWe?editors=1010
The text was updated successfully, but these errors were encountered: