Re:Htmx Tailwind Alternative: Inline Scoped CSS
by jessehattabaugh on Friday September 08, 2023 @02:16PM
(#37437280)
this is just shadowDOM with extra steps
[ Parent
| on HN ]
Re:Htmx Tailwind Alternative: Inline Scoped CSS
by infogulch on Friday September 08, 2023 @03:12PM
(#37438052)
This is extra steps compared to Shadow DOM [1]?! This is 15 lines of js and works with style tags anywhere in the page, and is particularly useful in SSR scenarios (which htmx encourages). Until we get declarative shadow dom [2] I don't think calling it 'fewer steps' is remotely reasonable.
[1]: https://developer.mozilla.org/en-US/docs/Web/API/Web_compone...
[2]: https://developer.chrome.com/articles/declarative-shadow-dom... | https://caniuse.com/declarative-shadow-dom