Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
aakashgill opened this issue Jan 19, 2024 · 2 comments

Comments

@aakashgill
Copy link
Contributor

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

@snyamathi
Copy link
Contributor

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.

@aakashgill
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants