render their shadow DOM yet? 🤔 Would be one way of applying skeleton styles
Huh?
basically: sl-select:no(shadowDOM) { /* skeleton CSS */ }
I don't think that's possible, but you could add a class to the custom element and remove it while attaching shadow dom
the problem then is I need to teach every shoelace.style component to do that
I hope you've learnt your lesson for why WebComponents are evil
I think it's a lost cause when you expect to do anything with WebComponents without JS, even support their absence. One final hack I can think of is the first line of your script (or maybe last line depending on your needs) adds a class to body like .js-loaded, and CSS can target :not(.js-loaded) sl-selected {}
how are they evil? 😂
I thought it was cute to do just :not, but body:not() will perform better
You didn't get the memo
Apparently you can detect whether the custom element was defined, with sl-select:not(:defined) {} Would that work?
https://x.com/Rich_Harris/status/1198332398561353728 https://dev.to/richharris/why-i-don-t-use-web-components-2cia https://dev.to/ryansolid/web-components-are-not-the-future-48bh https://daverupert.com/2023/07/why-not-webcomponents/
it's still a good solution for when you need to do UI web apps with anything other than JS
Обсуждают сегодня