tailwindcss之arbitrary-variants(任意变体)使用:
class="[&_.m-modal\_\_panel]:!overflow-visible"
分析:
&_ 中的下划线并不是必须的,只有在修改子元素的时候才需要加,如果本来修改的就是父元素,那么直接 & 就可以了.
原理是:
https://tailwindcss.com/docs/hover-focus-and-other-states#using-arbitrary-variants
指尖上的记忆tailwindcss之arbitrary-variants(任意变体)使用:
class="[&_.m-modal\_\_panel]:!overflow-visible"
分析:
&_ 中的下划线并不是必须的,只有在修改子元素的时候才需要加,如果本来修改的就是父元素,那么直接 & 就可以了.
原理是:
https://tailwindcss.com/docs/hover-focus-and-other-states#using-arbitrary-variants