You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For systems that enable users to toggle themes (dark/light) - seems like it is not possible to use the "class" mode for darkMode.
This makes sense to some extent due to Shadow DOM, I wonder though if we can maybe have some discussion around it and perhaps workaround it.
Maybe for a start an update to the documentation is needed + excluding this mode from the allowed modes for web-components.
For "media" based configuration - this works perfectly fine, as the configuration is not derived from a specific selector.
One possible workaround is disabling the Shadow DOM for the element, however this is probably not the best approach, in addition to losing key features such as slots.
Severity
blocking all usage of Twind
System Info
Latest
Additional Information
No response
The text was updated successfully, but these errors were encountered:
One way I thought of resolving this was to use Lit context provider, and consume it in every component.
This works, however this obviously adds overhead and boilerplate to each component.
Reproduction
https://lit.dev/playground/#gist=4966b12310c22a412c1cfc2381a6248a
Describe the bug
For systems that enable users to toggle themes (dark/light) - seems like it is not possible to use the "class" mode for darkMode.
This makes sense to some extent due to Shadow DOM, I wonder though if we can maybe have some discussion around it and perhaps workaround it.
Maybe for a start an update to the documentation is needed + excluding this mode from the allowed modes for web-components.
For "media" based configuration - this works perfectly fine, as the configuration is not derived from a specific selector.
One possible workaround is disabling the Shadow DOM for the element, however this is probably not the best approach, in addition to losing key features such as slots.
Severity
blocking all usage of Twind
System Info
Additional Information
No response
The text was updated successfully, but these errors were encountered: