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
You can pass any number you want to these by default, and use arbitrary values for more complex expressions like `nth-[2n+1_of_li]`.
951
+
931
952
### \`in-*\` variant
932
953
954
+
You know our `group-*` variants like `group-focus`? The new `in-*` variant is just like that except you don't need to add `group` to the parent element:
I'm sure I'm eventually going to regret not making it a separate `popover-open` variant but I thought _really_ hard about it and couldn't think of any situations where an element would use both `[open]` and `:popover-open` and have different styles for each condition. Someone is going to update the spec and screw me on this one down the road though for sure.
982
+
935
983
### Descendant variant
936
984
937
-
- Simplified theme configuration
938
-
- Bare values in variants (`data-potato` instead of `data-[potato]`)
- Heuristic-driven sorting so custom utilities sort more intuitively with built-in utilities
944
-
- Individual transforms
985
+
You know the `*` variant we shipped a while ago for targeting direct children?
986
+
987
+
```html
988
+
<ulclass="*:p-4">
989
+
<li>One</li>
990
+
<li>Two</li>
991
+
<li>Three</li>
992
+
</ul>
993
+
```
994
+
995
+
In v4.0 we've added a new `**` variant for targeting all descendants — most useful in my opinion if you combine it with another variant for narrowing the thing you're selecting:
996
+
997
+
```html
998
+
<divclass="**:img:rounded-full">
999
+
<div>
1000
+
<imgsrc="…" />
1001
+
</div>
1002
+
<p>…</p>
1003
+
</div>
1004
+
```
945
1005
1006
+
Fun fact — the syntax is inspired by globs, for better or for worse.
0 commit comments