Skip to content

Conversation

@robatwilliams
Copy link

@robatwilliams robatwilliams commented Oct 24, 2025

After #230 and attempt to get it all working, we decided to try an alternative approach which keeps things simpler, and more "on-piste" in terms of build tooling.

Fixes #219


- main.js
- polyfill.js
- styles.css
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seemed likely this needed to be removed, but I haven't seen it used - Dan, I guess you will when you try embedding it in the website.

With the style isolation, we are changing our ask of consumers from "include this in your global styles somewhere" to "put this file at /styles.css for us". Which is very rigid.

Perhaps we should allow the styles url to be given as a component attribute - including any path and cache-busting suffixes.

Having the whole bundled styles within the js bundle (so we can import it as a string rather than from a URL path) would eliminate the issue altogether, but then we're back into custom build system/tooling territory.

Why is it necessary to have separate sl-style and package-style? If we could have package-style be always used, we could specify it in styleUrl and simplify things a lot, and then do something else (e.g. style tag) for adaptations the demo page requires.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Latest version does not isolate Estimator styling

3 participants