acss-io / atomizer

A library to create small, reusable CSS that scales as your website grows.
https://acss-io.github.io/atomizer/
Other
1.54k stars 97 forks source link

Combine Helper atomic classes elements with others, where same set of properties & values are being used #522

Open aakashgill opened 2 years ago

aakashgill commented 2 years ago

Hi

I'm using this stylelint plugin https://github.com/ssivanatarajan/stylelint-group-selectors in one of my project, which suggests, what elements to group together which has same set of properties and values.

But I'm getting this error on my CSS file, which is generated via Atomizer, as you can see in the screenshot below.

image

Feature Request in Atomizer tool

Is it possible to also combine the Helper Classes properties, like BdStart, with others?

Expected output to be

image

Thanks

redonkulus commented 2 years ago

I would suggest that you have stylelint ignore the generated Atomizer CSS file. It may change without you knowing and makes no sense to break your build.

Edit: I misread the original question when I responded. It should do that automatically. I’d have to dig into the code to see why.

jitendravyas commented 2 years ago

I think what OP is asking should be atomizer's default output. I was surprised to know it's already not happening.

redonkulus commented 1 year ago

Sorry, forgot about this one. I get the issue now, I would have to look at the code to see if helpers can be deduped with the default rule set.