Page MenuHomePhabricator

TemplateStyles should tell users not to use vendor prefixes when it sees one
Open, Stalled, Needs TriagePublicFeature

Description

When a vendor-prefixed property is given (like khtml, moz ms, webkit, etc.), css-sanitizer rejects it, which is correct in principle but is pretty confusing for people who just copied styles from other people. Someone should probably do a bit of post-processing on unrecognized-property so that it:

  • Points out the name of the bad property
  • If it starts with a hyphen (-), say something brief about using an unprefixed version.

This is tangentially related to this:

Event Timeline

That might be better as a CodeEditor lint rule.

Izno changed the subtype of this task from "Task" to "Feature Request".Jan 14 2023, 2:06 AM
Bhsd subscribed.

There are ongoing efforts to replace CodeEditor with CodeMirror in the integration with TemplateStyles, and this task should be easy to implement using a custom Stylelint rule.

Change #1190686 had a related patch set uploaded (by Bhsd; author: Bhsd):

[mediawiki/extensions/CodeMirror@master] CodeMirrorCss: custom Stylelint rules for TemplateStyles

https://gerrit.wikimedia.org/r/1190686

Change #1190686 merged by jenkins-bot:

[mediawiki/extensions/CodeMirror@master] CodeMirrorCss: custom Stylelint rules for TemplateStyles

https://gerrit.wikimedia.org/r/1190686