Closed 1aron closed 1 year ago
import MasterCSS from '@master/css' import config from './master.css'
⚠️ eslint https://eslint.org/docs/latest/rules/no-new
new MasterCSS(config)
⚠️ 'css' is declared but its value is never read. ts(6133)
const css = new MasterCSS(config)
⚠️ Developers are forced to export css.
css
export const css = new MasterCSS(config)
⚠️ Non-runtime rendering must be set to observe: false.
observe: false
const css = new MasterCSS({ observe: false, ...config })
import { initRuntime } from '@master/css' import config from './master.css' initRuntime(config)
🟢 Store/export the css instance in a variable on demand.
export const css = initRuntime(config)
Deprecate config.observe option and observe on demand.
config.observe
initRuntime(config, this.shadowRoot) // equal to const css = new MasterCSS(config).observe(this.shadowRoot)
🎉 Released in https://github.com/master-co/css/releases/tag/v2.0.0-beta.160
Description
Current
⚠️ eslint https://eslint.org/docs/latest/rules/no-new
⚠️ 'css' is declared but its value is never read. ts(6133)
⚠️ Developers are forced to export
css
.⚠️ Non-runtime rendering must be set to
observe: false
.💖 Expect
🟢 Store/export the css instance in a variable on demand.
Deprecate
config.observe
option and observe on demand.