postcss-pseudo-classes
postcss-pseudo-classes copied to clipboard
Support appending pseudoclasses through a wrapper
When designing reusable components, I prefer not to expose classNames as a prop, as it breaks encapsulation and encourages the modification of a finalized design.
It would be great if the following approach worked:
<!-- "hover" may also be called "hover-all" -->
<div class="hover">
<custom-button>I’m hovered</custom-button>
</div>
but in that case you can enable the prop and the component will add the hover class right? This plugin is for generating classes for pseudo selectors so that the styles are applied without the need of triggering that state eg.
<button class="some-selector :hover">howdy</button>
will apply the hover styles without you having to hover the button with a mouse