DEV Community

Discussion on: Using tailwind at run-time with web components

Collapse
 
43081j profile image
James Garbutt

The run-time solution (twind) in this case would populate a single shared stylesheet, unless you choose to create one per module, then each component would have duplicate rules potentially but their own sheets.

The build-time solution (my other post) would populate a sheet per module, stripping styles based on what was used in that individual module.

i agree it'd be nice to have a middle ground whether you do it at run-time or build-time: a few shared stylesheets multiple components can depend on. but tailwind itself doesn't organise rules as well as your example afaik, so it'd be difficult i think