Modernising CSS infrastructure in DevTools design doc

12 views
Skip to first unread message

Kriti Sapra

unread,
Jun 3, 2021, 9:32:14 AM6/3/21
to devtoo...@chromium.org
Hi everyone, Please take a look at a proposal that outlines how we can modernise the CSS infrastructure in DevTools:

John...@microsoft.com

unread,
Nov 16, 2021, 12:18:08 PM11/16/21
to devtools-dev, kriti...@google.com, jacktf...@chromium.org
As a follow-up to this work, I have implemented a new ESLint rule to warn against non-import loading of CSS styles (calls to registerRequiredCSS) in-favor of using the new `import styles from '[file name].css.js;` (and *.css.legacy.js) syntax.

If you hit this warning the fix is to follow the example guidance and load the CSS styles with an import statement.
e.g. `import styles from 'mymodule.css.js';` and then later on `.registerCSSFiles([styles])`.

You may need to use the `*.css.legacy.js` suffix based on https://crrev.com/c/3275787
For more information see https://crrev.com/c/3277287 

Thanks to Kriti@ for starting this work and Jack@ for the reviews!

Reply all
Reply to author
Forward
0 new messages