/
githubmirror
/
30-seconds-of-code
Обзор
Документация
Войти
/
githubmirror
/
30-seconds-of-code
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/astro/components/ContentComponentsFallback.astro
25 строк
1 KB
Angelos Chalaris
Prevent error flash when JS is enabled
05 апр 2025, 14:26
Не верифицирован
05 апр 2025, 14:26
60ec8f5
Код
Авторство
О чём код?
--- // Special styles for web components are loaded by the web components. However, // for non-interactive components (e.g. disabled JS), we need some fallback // styles, as the web components themselves can't import the necessary style // modules (these load via JS). Web components have an `interactive` attribute // that is set to "false" when the component is not interactive. This can be // used to select the non-interactive version of the component. --- <noscript> <style> [interactive='false']::after { display: block; content: 'Some interactive features on this page may not work as expected. \00000aPlease enable JavaScript and reload the page to use all features.'; padding-inline: var(--layout-bleed-width); padding-block: var(--spacing-6); background: var(--color-background-light); border: var(--border-width-thin) solid var(--color-caution); border-radius: var(--layout-border-radius); white-space: pre-wrap; text-align: center; margin-block-start: var(--layout-row-spacing); } </style> </noscript>