- From: Romain Menke via GitHub <sysbot+gh@w3.org>
- Date: Thu, 17 Mar 2022 16:26:21 +0000
- To: public-css-archive@w3.org
romainmenke has just created a new issue for https://github.com/w3c/csswg-drafts: == Define guidelines for preprocessors == Guidelines already exist for polyfills : https://www.w3.org/2001/tag/doc/polyfills/ A similar set of rules and suggestions could be created for CSS preprocessors. The goal of this document would be to prevent conflicts between future CSS features and non-standard things in developer tools. _if this already exists please let me know, I couldn't find it_ --------- 1) In preprocessors it is preferable to not invent new syntax as they are not used in a vacuum. Developers also use linters, static analysis and need IDE features (syntax highlighting, auto complete, ...). Using existing syntax/grammar with custom keywords makes it much easier to roll out a new feature in one tool, without requiring the whole ecosystem to adapt. 2) preprocessors can move at a much faster pace than the CSS spec and browsers. 3) The most obvious name for a feature is often the best name. (and multiple distinct features can all have the same best name) 4) there is no working group for tooling (that I know of) These factors make it absolutely certain that conflicts will keep on happening without proper guidelines. ---------- Conflicts are not only a burden on the creators and users of preprocessors when tools and source code need to be updated. Users might have years of experience and knowledge associated with how a certain keyword works. This is an issue today with PostCSS plugins transforming nested CSS. Users expect `&` to behave in a certain way and see the specced feature as bugged. Whereas avoiding conflicts will allow developers to freely mix tooling features and native features. -------- Note : It is not my intention to have a document that defines how preprocessors must work or what they can or can not implement. Only to have a safe framework to let preprocessors grow together with native CSS features. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7150 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 17 March 2022 16:26:25 UTC