Format and lint CSS files using Stylelint#2304
Merged
siddharthvp merged 2 commits intomasterfrom Feb 8, 2026
Merged
Conversation
f032997 to
d06993e
Compare
Member
|
Nice! Consider adding a CI job for this too |
Member
Author
|
It's part of the linter job (since it gets run by |
Member
|
Oh duh. |
Use stylelint with stylelint-config-wikimedia, specifically the support-modern preset which targets grade A browsers. This is in preparation for #2300 which will introduce some involved CSS. Rule customisations used: * @stylistic/*-space-inside: "never", per repo code style of not putting spaces in parens * selector-attribute-quotes: "never". * selector-max-id: 1. MediaWiki uses 0 which disallows ids in selectors completely! That would lead to a lot of errors for us. * declaration-no-important: null. Disabled temporarily. Ideally, we should remove this. All CSS changes are no-op (mostly done via auto-fixes,) mainly: * Changed hex codes to use lowercase letters instead of uppercase * Consistently used tabs * Consistently put opening brace on same line as the selector * Combined the two blocks for .morebits-ui-tooltip in morebits.css * prefers-color-scheme: dark isn't supported in Safari 11 which still happens to be Grade A, so used a per-line stylelint-disable. In practise, Safari 11 isn't much used, and per CSS spec unsupported rules and media queries are just ignored - they don't cause the stylesheet to fail. * stylelint-config-wikimedia disallows px unit in font-size and line-height for accessibility reasons, which is probably something we should also fix. Temporarily disabled inline as fixes won't be no-op. * stylelint-config-wikimedia disallows `border: none`. Replaced it with `border: 0` which has the same effect.
Variables defined by morebits or Twinkle itself will always be available – the fallbacks are redundant. Fallbacks in var() only need to be used while using Codex design tokens, since they aren't defined in all skins.
7f98e7a to
d0adc9a
Compare
This was referenced Jan 31, 2026
d0adc9a to
2c31a36
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use stylelint with stylelint-config-wikimedia, specifically the support-modern preset which targets grade A browsers. This is in preparation for #2300 which will introduce some involved CSS.
Rule customisations used:
All CSS changes are no-op, mainly:
border: none. It is replaced withborder: 0which has the same effect.