/
githubmirror
/
material-ui
Обзор
Документация
Войти
/
githubmirror
/
material-ui
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
docs/src/modules/utils/globalSelector.ts
17 строк
553 B
Alexandre Fauquette
[docs-infra] Fix RTL dark mode (#41803)
04 дек 2024, 15:20
Не верифицирован
04 дек 2024, 15:20
e2ba426
Код
Авторство
О чём код?
/* eslint-disable default-case */ import { Element, RULESET } from 'stylis'; // A workaround to https://github.com/emotion-js/emotion/issues/2836 // to be able to use `:where` selector for styling. export default function globalSelector(element: Element) { switch (element.type) { case RULESET: element.props = (element.props as string[]).map((value: any) => { if (value.match(/(:where|:is)\(/)) { value = value.replace(/\.[^:]+(:where|:is)/, '$1'); return value; } return value; }); } }