bos-web-engine icon indicating copy to clipboard operation
bos-web-engine copied to clipboard

🔷 [Epic] Support `@import` for CSS

Open mpeterdev opened this issue 1 year ago • 1 comments

Description

Many UI packages and libraries require importing an external stylesheet. We should support this as much as possible while maintaining component area of influence boundaries.

mpeterdev avatar Mar 21 '24 15:03 mpeterdev

Brainstorming

Could this be implemented as a LightningCSS Custom Transform similar to how we handle TS imports via our Babel plugin?

We could fetch the external stylesheet and inject all the rules under the top level .wrapper class of the component. One issue that comes to mind is handling the waterfall effect of importing a stylesheet which imports another and so on

mpeterdev avatar Mar 21 '24 15:03 mpeterdev