atomizer icon indicating copy to clipboard operation
atomizer copied to clipboard

Shift lower specificity classes first, then higher specificity classes (when using namespace)

Open aakashgill opened this issue 1 year ago • 2 comments

Hi

I'm using this stylelint plugin https://stylelint.io/user-guide/rules/no-descending-specificity/, which disallow selectors of lower specificity from coming after overriding selectors of higher specificity. I'm getting this error in my CSS file, which is generated via Atomizer.

image

Feature Request in Atomizer tool Is it possible to shift lower specificity classes first, and then comes higher specificity classes (if using namespace) ? Expected Output: image

I'm using Atomizer version 3.28.0

aakashgill avatar Jan 19 '24 12:01 aakashgill

It may be possible to do so, but would you be able to add a .stylelintignore to ignore the generated Atomic CSS files?

https://stylelint.io/user-guide/ignore-code/#files-entirely

If we don't need to add this feature, I'd prefer not to.

snyamathi avatar Jan 23 '24 04:01 snyamathi

I can ignore the generated Atomic CSS file, but don't want to really because Atomizer generates values for incorrect units as well. For example: If I accidentally write Fz(12p) or M(1) and forgot the unit, the atomizer still generates CSS .Fz\(12p\) { font-size: 12p; } .M\(1p\) { margin: 1p; } with invalid values.

So Stylelint is helping me to catch these errors.

aakashgill avatar Jan 23 '24 16:01 aakashgill