Yes, excellent work. I'm interested, were there any cases that were left more awkward from removing pre-processing, cases where maybe CSS would benefit from some new feature?
On Tue, 29 Mar 2022 at 18:35, Brian Grinstead <bgrinst...@mozilla.com> wrote: > Nice work! Glad to see we were able to move to built-in CSS features to > accomplish the same things - a bunch of benefits to using the platform > directly in terms of shared tooling, documentation/onboarding, etc. > > Brian > > On Mar 29, 2022, at 10:24 AM, Sam Foster <sfos...@mozilla.com> wrote: > > tldr; please don't add new preprocessor instructions to CSS files in > moz-central > > We've had an initiative on the books for a while to remove our use of the > preprocessor on CSS files. This has been an obstacle to enabling linting > and other tooling and analysis of our stylesheets. As of last week, we have > reworked all the conditional preprocessor logic, preprocessor variables and > %includes to use valid CSS idioms. > > You can track the bugs involved here: Bug 1659444 - [meta] Remove the use > of the preprocessor from CSS files to enable linting and other tooling > <https://bugzilla.mozilla.org/show_bug.cgi?id=1659444> > > The next steps are to wire up a linter. That is tracked as Bug 1762027 - > [meta] CSS linting tracking bug > <https://bugzilla.mozilla.org/show_bug.cgi?id=1762027>. In the meantime, > please avoid adding new preprocessor use to our CSS. You can look at the > resolved bugs for the patterns we used, but in summary: > > # Platform-specific rules: > Use @media (-moz-platform: {windows|macos|linux|android} ) media queries. > The per-platform directories under browser/themes and toolkit/themes still > exists, but in most cases maintenance is easier with the shared rules and > exceptions in-context in the same file. > > # %include > We're using @import rather than glueing together everything into one big > stylesheet. (We have been keeping any eye on tests to see if there was any > performance impact from this change and didn't see anything significant.) > > # Variables > We had used preprocessor variables to help build complex selectors as well > as property values. Nowadays we can use :is() clauses to help make a lot of > complex selectors more legible, and CSS has its own variables mechanism. > > If you have questions, or want to be involved in the linting effort (which > isn't scheduled to start in earnest until a bit later this year) ping me on > via email bugzilla, or in matrix in #fx-desktop-dev > > /Sam > > > -- You received this message because you are subscribed to the Google Groups "dev-platform@mozilla.org" group. To unsubscribe from this group and stop receiving emails from it, send an email to dev-platform+unsubscr...@mozilla.org. To view this discussion on the web visit https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/CAPMxTNo4bq4QxuZFo73PG0wWQE%3Djj4RPfZkYMSo9XtPOAZyZPQ%40mail.gmail.com.