Internal: Fix stylelint errors [TMZ-1046]#668
Conversation
|
|
||
| pre { | ||
| font-family: monospace, monospace; /* 1 */ | ||
| font-family: monospace; /* 1 */ |
There was a problem hiding this comment.
We are declaring twice the same font monospace.
There was a problem hiding this comment.
There is nothing to study, the font-family property accepts a list of font names separated by commas.
In this case it was a list of two names. Both list items use the same font. The lint found this issue. We fixed it.
| code, | ||
| kbd, | ||
| pre, | ||
| samp { | ||
| font-size: variables.$font-size-base; | ||
| } | ||
|
|
There was a problem hiding this comment.
Duplicate. The next 7 lines declare the same rules again.
| $success-color: $green !default; | ||
|
|
||
| //Fonts | ||
| /* stylelint-disable value-keyword-case */ |
There was a problem hiding this comment.
What's the reason of this change?
There was a problem hiding this comment.
I prefer not to replace Arial with arial, Roboto with roboto etc.
Keeping font names as they are, we avoid breaking changes.
| &::before, | ||
| &::after { | ||
| content: ''; | ||
| background-color: currentColor; |
There was a problem hiding this comment.
Interesting.
I will study this.
There was a problem hiding this comment.
Actually, the correct keyword is currentColor, not currentcolor (mdn). But I wanted to finish the PR, so I updated based on the lint suggestion.
I could change the rule, but I didn't do that.
| "plugins": ["stylelint-scss"], | ||
| "rules": { | ||
| "at-rule-no-unknown": null, | ||
| "no-descending-specificity": null, |
There was a problem hiding this comment.
This no-descending-specificity rule flags when a more specific CSS selector appears before a less specific one.
If we implement this, we will have to reorder many of our CSS rules. I prefer not to do this, to reduce risk and to avoid accidental breaking changes.
✨ PR Description
1. Problem & Context
Automated stylelint fixes for SCSS codebase compliance. Changes primarily normalize pseudo-element syntax (
:before→::before), color values to shorthand, font-weight keywords to numeric values, and add missing stylelint directives.2. What Changed (Where)
dev/scss/customizer.scssdev/scss/editor-styles.scssdev/scss/reset/(_forms.scss, _reset.scss, _table.scss)dev/scss/reset/_variables.scssdev/scss/theme/(_comments.scss, _footer.scss, _general.scss, _header.scss, _layout.scss, _navigation.scss).stylelintrc3. How It Works
Stylelint rules applied mechanically across all SCSS files: pseudo-elements converted to
::syntax per CSS spec, color values simplified (#ffffff→#fff,white→#fff), keyword font-weights changed to numeric (400/700), and redundant monospace declarations removed. Config updated to support SCSS parsing and suppress false positives on specificity.4. Risks
Minimal—purely stylistic/linting compliance changes with no functional impact. Color/font-weight conversions are semantically equivalent. Potential edge case: older browsers don't recognize
::pseudo-elements, but codebase already assumes modern browser support. Verify no build pipeline relies on the removed duplicate selector structure.Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how