Похожие чаты

Is CSS actually capable to target web components that didn't

render their shadow DOM yet? 🤔 Would be one way of applying skeleton styles

12 ответов

20 просмотров
Roman-Sharkov Автор вопроса
MUTHU・KUMAR 「メーカー」 🔺
Huh?

basically: sl-select:no(shadowDOM) { /* skeleton CSS */ }

Roman Sharkov
basically: sl-select:no(shadowDOM) { /* skeleto...

I don't think that's possible, but you could add a class to the custom element and remove it while attaching shadow dom

Roman-Sharkov Автор вопроса
MUTHU・KUMAR 「メーカー」 🔺
I don't think that's possible, but you could add a...

the problem then is I need to teach every shoelace.style component to do that

Roman Sharkov
the problem then is I need to teach every shoelace...

I hope you've learnt your lesson for why WebComponents are evil

Roman Sharkov
basically: sl-select:no(shadowDOM) { /* skeleto...

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 {}

Roman Sharkov
basically: sl-select:no(shadowDOM) { /* skeleto...

Apparently you can detect whether the custom element was defined, with sl-select:not(:defined) {} Would that work?

Roman Sharkov
how are they evil? 😂

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/

Roman-Sharkov Автор вопроса
MUTHU・KUMAR 「メーカー」 🔺
https://x.com/Rich_Harris/status/11983323985613537...

it's still a good solution for when you need to do UI web apps with anything other than JS

Похожие вопросы

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта