postcss-pseudo-classes icon indicating copy to clipboard operation
postcss-pseudo-classes copied to clipboard

Support appending pseudoclasses through a wrapper

Open kripod opened this issue 5 years ago • 1 comments

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>

kripod avatar Sep 08 '20 10:09 kripod

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

giuseppeg avatar Sep 08 '20 11:09 giuseppeg