Repository: biomejs/biome (language: rust)

Issue:
💅 Unexpected unknown pseudo-elements: slotted
### Environment information

```bash
CLI:
  Version:                      1.9.4
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v22.13.1"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/10.9.2"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 false

Linter:
  JavaScript enabled:           true
  JSON enabled:                 true
  CSS enabled:                  true
  GraphQL enabled:              false
  Recommended:                  true
  All:                          false
  Enabled rules:
  suspicious/noCatchAssign
  complexity/useLiteralKeys
  complexity/noMultipleSpacesInRegularExpressionLiterals
  suspicious/useNamespaceKeyword
  complexity/noUselessEmptyExport
  nursery/useConsistentMemberAccessibility
  suspicious/noAssignInExpressions
  suspicious/noDuplicateSelectorsKeyframeBlock
  suspicious/noDuplicateParameters
  correctness/noConstructorReturn
  style/useSelfClosingElements
  style/useTemplate
  correctness/noUnusedLabels
  correctness/noUnreachableSuper
  suspicious/noCompareNegZero
  a11y/noAutofocus
  correctness/noUnsafeOptionalChaining
  correctness/noConstAssign
  suspicious/noControlCharactersInRegex
  style/noVar
  suspicious/noDoubleEquals
  suspicious/noEmptyInterface
  suspicious/noConstEnum
  nursery/noDuplicateElseIf
  correctness/noPrecisionLoss
  nursery/noRestrictedImports
  correctness/noSetterReturn
  correctness/noInvalidConstructorSuper
  suspicious/noImplicitAnyLet
  a11y/useKeyWithClickEvents
  suspicious/noDuplicateObjectKeys
  suspicious/noUnsafeDeclarationMerging
  correctness/noInnerDeclarations
  nursery/useGoogleFontDisplay
  style/noUselessElse
  correctness/noInvalidDirectionInLinearGradient
  nursery/noValueAtRule
  nursery/noMissingVarFunction
  suspicious/noImportantInKeyframe
  complexity/noUselessLabel
  complexity/noUselessCatch
  a11y/useAriaPropsForRole
  nursery/noOctalEscape
  correctness/noNonoctalDecimalEscape
  suspicious/noDuplicateTestHooks
  complexity/noStaticOnlyClass
  nursery/noDocumentImportInPage
  nursery/noNestedTernary
  a11y/noInteractiveElementToNoninteractiveRole
  suspicious/noLabelVar
  correctness/noUnnecessaryContinue
  suspicious/noApproximativeNumericConstant
  nursery/noDuplicateCustomProperties
  correctness/noEmptyCharacterClassInRegex
  correctness/noUnknownUnit
  suspicious/noSparseArray
  a11y/useIframeTitle
  nursery/noExportedImports
  a11y/noSvgWithoutTitle
  correctness/noVoidElementsWithChildren
  correctness/useJsxKeyInIterable
  style/useExportType
  complexity/noUselessLoneBlockStatements
  style/noArguments
  a11y/useValidAriaValues
  suspicious/noGlobalAssign
  suspicious/noCommentText
  suspicious/noThenProperty
  suspicious/useGetterReturn
  a11y/noPositiveTabindex
  nursery/noDuplicateProperties
  correctness/noRenderReturnValue
  correctness/useExhaustiveDependencies
  nursery/noSecrets
  security/noGlobalEval
  a11y/noRedundantRoles
  suspicious/noSelfCompare
  suspicious/noAsyncPromiseExecutor
  nursery/noDescendingSpecificity
  nursery/noIrregularWhitespace
  security/noDangerouslySetInnerHtml
  style/useNodejsImportProtocol
  suspicious/noArrayIndexKey
  complexity/noWith
  suspicious/noDuplicateClassMembers
  complexity/noExtraBooleanCast
  performance/noAccumulatingSpread
  suspicious/noConfusingLabels
  correctness/noChildrenProp
  correctness/noUnknownFunction
  correctness/noInvalidPositionAtImportRule
  nursery/noDocumentCookie
  nursery/useDeprecatedReason
  a11y/noAriaUnsupportedElements
  nursery/noCommonJs
  correctness/noFlatMapIdentity
  a11y/noBlankTarget
  a11y/useHeadingContent
  nursery/noDynamicNamespaceImportAccess
  correctness/useValidForDirection
  correctness/noInvalidUseBeforeDeclaration
  a11y/noAriaHiddenOnFocusable
  a11y/useGenericFontNames
  nursery/useSortedClasses
  style/noUnusedTemplateLiteral
  style/useExponentiationOperator
  nursery/noStaticElementInteractions
  nursery/useAriaPropsSupportedByRole
  nursery/useAdjacentOverloadSignatures
  suspicious/noDuplicateAtImportRules
  complexity/noUselessFragments
  suspicious/noEmptyBlock
  suspicious/noFunctionAssign
  performance/noDelete
  suspicious/noUnsafeNegation
  a11y/useValidLang
  suspicious/useValidTypeof
  a11y/useValidAriaRole
  correctness/noConstantCondition
  a11y/useAriaActivedescendantWithTabindex
  style/useDefaultParameterLast
  complexity/noEmptyTypeParameters
  nursery/useComponentExportOnlyModules
  correctness/noUnknownProperty
  nursery/useTrimStartEnd
  complexity/noUselessTernary
  suspicious/noExplicitAny
  correctness/noSwitchDeclarations
  complexity/noUselessTypeConstraint
  suspicious/noRedundantUseStrict
  style/useLiteralEnumMembers
  suspicious/noGlobalIsNan
  suspicious/noMisleadingCharacterClass
  a11y/noLabelWithoutControl
  suspicious/noRedeclare
  correctness/noStringCaseMismatch
  nursery/noUselessStringRaw
  nursery/noImgElement
  complexity/noUselessThisAlias
  correctness/noUnreachable
  suspicious/noFallthroughSwitchClause
  complexity/noThisInStatic
  complexity/useOptionalChain
  suspicious/noDuplicateCase
  style/noParameterAssign
  a11y/useValidAnchor
  complexity/useRegexLiterals
  correctness/noSelfAssign
  correctness/noInvalidBuiltinInstantiation
  nursery/noProcessEnv
  nursery/useGuardForIn
  style/useShorthandFunctionType
  suspicious/noShadowRestrictedNames
  a11y/useMediaCaption
  nursery/useAtIndex
  correctness/noUnsafeFinally
  nursery/useCollapsedIf
  nursery/noHeadElement
  nursery/useExplicitType
  style/useEnumInitializers
  a11y/useHtmlLang
  nursery/noRestrictedTypes
  style/useWhile
  complexity/useArrowFunction
  style/noInferrableTypes
  a11y/noNoninteractiveTabindex
  complexity/useSimpleNumberKeys
  correctness/useYield
  style/useNumericLiterals
  suspicious/noImportAssign
  suspicious/useDefaultSwitchClauseLast
  nursery/noDuplicatedFields
  correctness/noGlobalObjectCalls
  a11y/useAltText
  suspicious/noSuspiciousSemicolonInJsx
  complexity/noBannedTypes
  suspicious/noPrototypeBuiltins
  style/useAsConstAssertion
  nursery/noEnum
  suspicious/noDebugger
  suspicious/noMisleadingInstantiator
  nursery/noUnknownPseudoClass
  a11y/useFocusableInteractive
  correctness/noUnmatchableAnbSelector
  suspicious/noDuplicateJsxProps
  correctness/noEmptyPattern
  complexity/noExcessiveNestedTestSuites
  security/noDangerouslySetInnerHtmlWithChildren
  a11y/useKeyWithMouseEvents
  suspicious/noExtraNonNullAssertion
  suspicious/noShorthandPropertyOverrides
  nursery/noUnknownPseudoElement
  style/useConst
  style/noNonNullAssertion
  complexity/useFlatMap
  correctness/useIsNan
  suspicious/noGlobalIsFinite
  suspicious/noDuplicateFontNames
  a11y/noDistractingElements
  nursery/useValidAutocomplete
  a11y/useValidAriaProps
  a11y/noRedundantAlt
  nursery/noHeadImportInDocument
  suspicious/noConfusingVoidType
  suspicious/noFocusedTests
  a11y/useButtonType
  a11y/useSemanticElements
  correctness/noInvalidGridAreas
  nursery/noUnknownTypeSelector
  correctness/noVoidTypeReturn
  correctness/noUnknownMediaFeatureName
  nursery/noUselessEscapeInRegex
  a11y/useAnchorContent
  complexity/noUselessRename
  nursery/noSubstr
  style/useNumberNamespace
  complexity/noUselessConstructor
  a11y/noAccessKey
  complexity/noUselessSwitchCase
  style/useSingleVarDeclarator
  suspicious/noExportsInTest
  a11y/noNoninteractiveElementToInteractiveRole
  nursery/noTemplateCurlyInString
  style/noCommaOperator
  suspicious/useIsArray
  nursery/useConsistentCurlyBraces
  a11y/noHeaderScope
  suspicious/noMisrefactoredShorthandAssign
  complexity/noForEach
  suspicious/noClassAssign
  style/useImportType

Workspace:
  Open Documents:
```

### Rule name

linter/rules/no-unknown-selector-pseudo-element

### Playground link

https://biomejs.dev/playground/?indentStyle=space&quoteStyle=single&jsxQuoteStyle=single&lintRules=all&files.index.css=OgA6AHMAbABvAHQAdABlAGQAKABbAHMAbABvAHQAPQAiAGIAdQB0AHQAbwBuAHMAIgBdACkAIAB7AAoACQBnAHIAaQBkAC0AYQByAGUAYQA6ACAAYgB1AHQAdABvAG4AcwA7AAoACQBqAHUAcwB0AGkAZgB5AC0AcwBlAGwAZgA6ACAAZQBuAGQAOwAKAH0ACgAKAGMAdQBzAHQAbwBtAC0AZQBsAGUAbQBlAG4AdAA6ADoAcABhAHIAdAAoAGYAbwBvACkAIAB7AAoAIAAgAGMAbwBsAG8AcgA6ACAAYgBsAHUAZQAKAH0ACgA%3D

### Expected result

Using [::slotted](https://developer.mozilla.org/en-US/docs/Web/CSS/::slotted) in CSS is throwing linter error `linter/rules/no-unknown-selector-pseudo-element`

`::slotted()` is a widely available pseudo-element and should no throw an error

### Code of Conduct

- [x] I agree to follow Biome's Code of Conduct


Discussion / hints:
Wanna send a PR @Th3S4mur41 ? 

Needs to update this array, probably https://github.com/biomejs/biome/blob/main/crates/biome_css_analyze/src/keywords.rs#L776
I'm an absolute rust newbie, but why not... I'll give it a try 😊

Fix patch:
diff --git a/.changeset/smart-seals-collect.md b/.changeset/smart-seals-collect.md
new file mode 100644
index 000000000000..55dba1ec052d
--- /dev/null
+++ b/.changeset/smart-seals-collect.md
@@ -0,0 +1,5 @@
+---
+"@biomejs/biome": patch
+---
+
+[noUnknownPseudoElement](https://biomejs.dev/linter/rules/no-unknown-pseudo-element/) add support for `::slotted` ([#5116](https://github.com/biomejs/biome/issues/5116)).
diff --git a/crates/biome_css_analyze/src/keywords.rs b/crates/biome_css_analyze/src/keywords.rs
index 0304b9323115..196ee0b67536 100644
--- a/crates/biome_css_analyze/src/keywords.rs
+++ b/crates/biome_css_analyze/src/keywords.rs
@@ -773,8 +773,8 @@ pub const FUNCTION_KEYWORDS: [&str; 685] = [
 ];
 
 // These are the ones that can have single-colon notation
-pub const LEVEL_ONE_AND_TWO_PSEUDO_ELEMENTS: [&str; 4] =
-    ["after", "before", "first-letter", "first-line"];
+pub const LEVEL_ONE_AND_TWO_PSEUDO_ELEMENTS: [&str; 5] =
+    ["after", "before", "first-letter", "first-line", "slotted"];
 
 pub const VENDOR_SPECIFIC_PSEUDO_ELEMENTS: [&str; 66] = [
     "-moz-focus-inner",


Test patch:
diff --git a/crates/biome_css_analyze/tests/specs/nursery/noUnknownPseudoClass/invalid.css.snap b/crates/biome_css_analyze/tests/specs/nursery/noUnknownPseudoClass/invalid.css.snap
index 9b4398313ac9..1ae7212a8e61 100644
--- a/crates/biome_css_analyze/tests/specs/nursery/noUnknownPseudoClass/invalid.css.snap
+++ b/crates/biome_css_analyze/tests/specs/nursery/noUnknownPseudoClass/invalid.css.snap
@@ -1,7 +1,6 @@
 ---
 source: crates/biome_css_analyze/tests/spec_tests.rs
 expression: invalid.css
-snapshot_kind: text
 ---
 # Input
 ```css
@@ -189,23 +188,6 @@ invalid.css:11:2 lint/nursery/noUnknownPseudoClass ━━━━━━━━━
   i See MDN web docs for more details.
   
 
-```
-
-```
-invalid.css:12:2 lint/nursery/noUnknownPseudoClass ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
-
-  × Unexpected unknown pseudo-class slotted 
-  
-    10 │ ::-webkit-scrollbar-button:horizontal:unknown {}
-    11 │ :first { }
-  > 12 │ :slotted {}
-       │  ^^^^^^^
-    13 │ :placeholder {}
-    14 │ @page :blank:unknown { }
-  
-  i See MDN web docs for more details.
-  
-
 ```
 
 ```