Skip to content

Conversation

@mikewuu
Copy link
Contributor

@mikewuu mikewuu commented May 28, 2023

An alternative approach to the one taken in #182, which offers automatic style loading without versioning, or style injections:

  • Includes styles by default.
  • Always import index.css in <SeamProvider/>.
  • Allows the user to opt-out by specifying disableStyles.

CleanShot 2023-05-28 at 17 02 43

@razor-x
Copy link
Member

razor-x commented May 28, 2023

I'd like to avoid this approach as it requires a bundler that understands how to bundle css. As-is, the lib compiles with TSC to a standard es module which is very compatible, and with the recent injection update, it no longer requires users to configure a bundler that supports css. I am looking at turning these into web components and I think this change will further complicate that.

@mikewuu
Copy link
Contributor Author

mikewuu commented May 28, 2023

Fair enough. Still wrapping my head around the fact that this is a lib, and we don't have a bundler.

@mikewuu mikewuu closed this May 28, 2023
@razor-x
Copy link
Member

razor-x commented May 28, 2023

No worries. Even if we used a bundler that could import css, then you have to ask: what would it replace the import with at bundle time? It would have to either be inline styles or a link to a cdn hosted stylesheet 😁

@mikewuu
Copy link
Contributor Author

mikewuu commented May 28, 2023

Don't bundlers just combine all css imports into a single index.css file?

To your point, guess we can't assume that.

@razor-x
Copy link
Member

razor-x commented May 28, 2023

Don't bundlers just combine all css imports into a single index.css file?

That is exactly what Sass cli is doing right now.

@razor-x razor-x deleted the disable-styles branch June 1, 2023 20:31
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.

2 participants