src/content/docs/linter/rules/no-unknown-type-selector.mdx
import { Tabs, TabItem } from '@astrojs/starlight/components';
<Tabs> <TabItem label="CSS" icon="seti:css"> ## Summary - Rule available since: `v1.9.4` - Diagnostic Category: [`lint/correctness/noUnknownTypeSelector`](/reference/diagnostics#diagnostic-category) - This rule is **recommended**, meaning it is enabled by default. - This rule doesn't have a fix. - The default severity of this rule is [**error**](/reference/diagnostics#error). - Sources: - Same as [`selector-type-no-unknown`](https://github.com/stylelint/stylelint/blob/main/lib/rules/selector-type-no-unknown/README.md){
"linter": {
"rules": {
"correctness": {
"noUnknownTypeSelector": "error"
}
}
}
}
Disallow unknown type selectors.
This rule considers tags defined in the HTML, SVG, and MathML specifications to be known. For details on known CSS type selectors, see the following links
This rule allows custom elements.
unknown {}
unknown > ul {}
x-Foo {}
input {}
ul > li {}
x-foo {}