Remove support for preprocessing CSS in mozilla-central
Categories
(Firefox Build System :: General, task, P3)
Tracking
(Not tracked)
People
(Reporter: sfoster, Unassigned)
References
Details
Having preprocessor directives in our .css files has made it difficult to enable linting and the kind of tooling we could use to improve the consistency and quality of our CSS. In bug 1659444's dependencies we've removed all the uses of the preprocessor from CSS across mozilla-central. I would be nice to prevent new uses from being added.
Reporter | ||
Comment 1•3 years ago
|
||
KaiOS / b2g has a single .css file which relies on being preprocessed currently.
It has a rule inside a %ifdef MOZ_WIDGET_GONK
. We shouldn't pull the trigger on any patch to disable preprocessing CSS until that gets resolved one way or another.
Comment 2•3 years ago
|
||
comm-central has preprocessed css too. I don't think we can turn this off generally.
Comment 3•3 years ago
|
||
Notwithstanding the fact that it's a generic feature, whereby jar.mn files can contain an asterisk for a file to be preprocessed. Or, since jar.mn is not the only way to get css files in the build, whereby a moz.build contains preprocessing directives.
Reporter | ||
Comment 4•3 years ago
•
|
||
Sure, I don't want to enforce our preferences on other projects relying on our build tools. But I would like to make committing a change to add preprocessing or preprocessor directives to CSS files in moz-central at least difficult to do.
We could make that the responsibility of the (yet to be added) CSS linter - if it blows up because it can't parse the file it would fail the check. My thought in filing this bug in this product/component was it would quicker to enforce at the build level. We don't need both however...
Updated•3 years ago
|
Reporter | ||
Comment 5•2 years ago
|
||
I think the consensus was to wont-fix this, and let the linter blow up if it finds CSS it can't parse because of preprocessor directives. We can manage a list of exceptions for the linter if it becomes really bothersome.
Description
•