Skip to content

Commit

Permalink
feat: upgrade pseudo selectors limit to 10000
Browse files Browse the repository at this point in the history
  • Loading branch information
jon301 committed Mar 22, 2024
1 parent ce5a455 commit 307490e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/preview/rewriteStyleSheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const rewriteRule = ({ cssText, selectorText }: CSSStyleRule, shadowRoot?: Shado

let ancestorSelector = ""
const statesAllClassSelectors = states.map((s) => `.pseudo-${s}-all`).join("")

if (selector.startsWith(":host(")) {
const matches = selector.match(/^:host\(([^ ]+)\) /)
if (matches && !matchOne.test(matches[1])) {
Expand Down Expand Up @@ -76,9 +76,9 @@ export const rewriteStyleSheet = (
shadowRoot?: ShadowRoot
): boolean => {
try {
const maximumRulesToRewrite = 1000
const maximumRulesToRewrite = 10000
const count = rewriteRuleContainer(sheet, maximumRulesToRewrite, shadowRoot);

if (count >= maximumRulesToRewrite) {
warnOnce("Reached maximum of 1000 pseudo selectors per sheet, skipping the rest.")
}
Expand Down

0 comments on commit 307490e

Please sign in to comment.