Closed Bug 1761391 Opened 3 years ago Closed 2 years ago

Remove support for preprocessing CSS in mozilla-central

Categories

(Firefox Build System :: General, task, P3)

task

Tracking

(Not tracked)

RESOLVED WONTFIX

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.

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.

comm-central has preprocessed css too. I don't think we can turn this off generally.

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.

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...

Priority: -- → P3

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.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.