MCPcopy Create free account
hub / github.com/darkreader/darkreader / makeSelectorEmpty

Function makeSelectorEmpty

src/inject/dynamic-theme/selectors.ts:36–42  ·  view source on GitHub ↗
(selector: string)

Source from the content-addressed store, hash-verified

34}
35
36export function makeSelectorEmpty(selector: string) {
37 selector = selector.trim();
38 if (emptyPseudoClasses.some((pseudo) => selector.endsWith(pseudo))) {
39 return selector;
40 }
41 return `${selector}:empty`;
42}
43
44export function isSelectorWithin(sub: string, parent: string): boolean {
45 const parentLength = parent.length;

Callers 1

selectors.tests.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…