Похожие чаты

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 ответов

2 просмотра
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
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

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

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

------------------------------------------------------------------------------ 📢 MAJOR ANNOUNCEMENT: HSUITE ECOSYSTEM UPDATE 📢 @everyone Dear HbarSuite Community, After month...
Big Stones
3
Ready for some fun AND a chance to win TKO Tokens? Join us for exciting minigames in our Telegram group! 🕒 Don’t miss out—games start on today 25 October 2024, at 8 PM! Ge...
Milkyway | Tokocrypto
248
Здравствуйте, вопрос по структурам данных. Были у вас случаи, когда пришлось писать деревья или двунаправленные списки?
/ /
48
Всем привет! Скажите, никто не пытался уменьшить размер процесса ssl, которые ассоциируется с открытым соединением (не помню точное название этого процесса, но там была какая-...
Алексей
20
Let's say the current price of BCH is 400$, and average fee for transaction is .1$ If the price jumps to let's say 4000$, transaction fee should be 1$ ? I don't know exactly ...
Mohamed
25
This is so annoying and unfair and I will explain you why. Before you give answer that I have to check my ports and firewall and latest version of the node...EVERYTHING is che...
Richard
1
а проверьте, собирается ли у кого сейчас транк лазаря через делюкс? у меня вот: fpcupdeluxe: info: Lazarus Native Installer (BuildModuleCustom: UserIDE): LazBuild: building Us...
Iluha Companets
20
Мне тут приспичило встроить в программу форматировние текста SQL, расставить переносы строк и отступы так, чтобы лучше читалось. Я что-то свое изобразил, оно после ключевых сл...
Sergey Bodrov
11
why not complete my galxe task??
Crypto 6827
13
This is a big issue. Just by being a citizen of a country, you are denied to contribute to Open Source software: https://youtu.be/L5Ec5jrpLVk?si=1iIuHnMPbCB4anV-
Sharuzzaman Ahmat Raslan
72
Карта сайта