diff --git a/lib/rules/selector-type-no-unknown/__tests__/index.js b/lib/rules/selector-type-no-unknown/__tests__/index.js index 88b415526d..642a7c2573 100644 --- a/lib/rules/selector-type-no-unknown/__tests__/index.js +++ b/lib/rules/selector-type-no-unknown/__tests__/index.js @@ -85,6 +85,10 @@ testRule(rule, { code: 'circle {}', description: 'svg tags', }, + { + code: 'foreignObject {}', + description: 'case-sensitive svg tags', + }, { code: '@media keyframes { 0.0% {} 49.1% {} 100% {} }', description: 'standard usage of keyframe selectors', diff --git a/lib/rules/selector-type-no-unknown/index.js b/lib/rules/selector-type-no-unknown/index.js index af9f8f94b0..592725ec39 100644 --- a/lib/rules/selector-type-no-unknown/index.js +++ b/lib/rules/selector-type-no-unknown/index.js @@ -87,7 +87,8 @@ const rule = function(actual, options) { if ( htmlTags.includes(tagNameLowerCase) || - svgTags.includes(tagNameLowerCase) || + // SVG tags are case-sensitive + svgTags.includes(tagName) || keywordSets.nonStandardHtmlTags.has(tagNameLowerCase) || mathMLTags.includes(tagNameLowerCase) ) {