{"record":{"id":"68393e112868a5b7","repo":"amruthpillai/reactive-resume","slug":"unsupported-pseudo-class-name","errorCode":null,"errorMessage":"Unsupported pseudo-class :${name}.","messagePattern":"Unsupported pseudo-class :(.+?)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/resume/src/stylesheet/selector.ts","lineNumber":226,"sourceCode":"\t\t\t}\n\t\t\tif ([\"is\", \"where\", \"not\"].includes(name)) {\n\t\t\t\tif (context.depth >= SEMANTIC_CSS_LIMITS_V1.maxFunctionDepth) {\n\t\t\t\t\tthrow new Error(\"Selector function nesting is too deep.\");\n\t\t\t\t}\n\t\t\t\tconst nested = childrenOf(node);\n\t\t\t\tif (nested.length !== 1 || nested[0]?.type !== \"SelectorList\") {\n\t\t\t\t\tthrow new Error(`:${name} requires a selector list.`);\n\t\t\t\t}\n\t\t\t\tconst selectors = compileSelectorList(nested[0], { depth: context.depth + 1 });\n\t\t\t\treturn { type: \"pseudo\", name: name as \"is\" | \"where\" | \"not\", selectors };\n\t\t\t}\n\t\t\tif (name === \"nth-child\" || name === \"nth-of-type\") {\n\t\t\t\tif (context.depth >= SEMANTIC_CSS_LIMITS_V1.maxFunctionDepth) {\n\t\t\t\t\tthrow new Error(\"Selector function nesting is too deep.\");\n\t\t\t\t}\n\t\t\t\treturn compileNth(node, name, context);\n\t\t\t}\n\t\t\tthrow new Error(`Unsupported pseudo-class :${name}.`);\n\t\t}\n\t\tcase \"ClassSelector\":\n\t\t\tthrow new Error(\"Custom class selectors are not supported.\");\n\t\tcase \"PseudoElementSelector\":\n\t\t\tthrow new Error(\"Pseudo-elements are not supported.\");\n\t\tdefault:\n\t\t\tthrow new Error(`Unsupported selector node ${node.type}.`);\n\t}\n}\n\nfunction compileComplex(node: SelectorAst, context: CompileContext): CompiledComplexSelector {\n\tif (node.type !== \"Selector\") throw new Error(\"Expected a Selector AST.\");\n\n\tconst compounds: CompiledCompoundSelector[] = [];\n\tconst combinators: Combinator[] = [];\n\tlet selectors: CompiledSimpleSelector[] = [];\n\tfor (const child of childrenOf(node)) {\n\t\tif (child.type === \"Combinator\") {","sourceCodeStart":208,"sourceCodeEnd":244,"githubUrl":"https://github.com/amruthpillai/reactive-resume/blob/3a5b12e2a40374a9571988701fcb75c5a1831c42/packages/resume/src/stylesheet/selector.ts#L208-L244","documentation":"Thrown by compileSimple in the PseudoClassSelector branch when the pseudo-class name is not in the supported set (root, first-child, last-child, only-child, is, where, not, nth-child, nth-of-type). Any other pseudo-class is rejected; this compiler deliberately omits interactive ones like :hover, :focus, and :has.","triggerScenarios":"Writing :hover, :focus, :has(item), :checked, :empty, :disabled, or any pseudo-class outside the supported list.","commonSituations":"Copying interactive-state CSS from web contexts; using CSS Selectors Level 4 features not yet supported; assuming :has is available.","solutions":["Remove the unsupported pseudo-class.","Express the intent structurally: use :is/:where/:not or a combinator instead.","Check the supported list before authoring: root, first-child, last-child, only-child, is, where, not, nth-child, nth-of-type."],"exampleFix":"// before\nsection:hover\n// after\nsection","handlingStrategy":"validation","validationCode":"const SUPPORTED = new Set(['root','first-child','last-child','only-child','is','where','not','nth-child','nth-of-type']);\nconst pseudoClassIsSupported = (name) => SUPPORTED.has(name.toLowerCase());\n// check each pseudo-class name (lowercase) before compiling","typeGuard":"const isRejected = (r) => r.selector === null && typeof r.error === 'string';","tryCatchPattern":"const result = compileSelector(selector);\nif (result.selector === null && result.error.startsWith('Unsupported pseudo-class :')) {\n  dropOrReplacePseudoClass(selector);\n}","preventionTips":["This model has no interactive states; do not use :hover/:focus/:checked.",":has is intentionally unsupported; express the relation with a combinator instead.","Keep the supported pseudo-class list on hand when authoring."],"tags":["semantic-css","selector","pseudo-class","validation"],"backgroundTag":null,"analyzedSha":"3a5b12e2a40374a9571988701fcb75c5a1831c42","analyzedAt":"2026-08-12T22:31:22.666Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}