Fix inconsistent order of problems output between online demo and CLI #413
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.
None. I've been catching up on issues and PRs across the Stylelint org (amazing work btw!), and I wanted to dip my authoring toe back in with some CSS coding.
This PR changes the output order to match the string formatter for consistency between the CLI and the online demo (location, severity, description, and name), as it's likely users of the online demo are reproducing an issue they first saw on the CLI.
Old:
New:
CLI (for reference):
To help make the fix, I also refactored the CSS and HTML code to use the type of modern features we'd like Stylelint to help authors to adopt:
oklch()
colour format(I would've liked to have used
clamp()
for fluid spacing and type sizes, but the Monoco editor isn't fluid so it doesn't make sense to.)I've kept using the existing modern features like:
:has()
pseudo-classHopefully, this refactor will make the CSS code more straightforward to navigate and work with as it more closely groups related styles.