-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
bugcssStuff related to Svelte's built-in CSS handlingStuff related to Svelte's built-in CSS handling
Milestone
Description
Describe the bug
The <legend> element appears as
[email protected]- Yellow (Broken)[email protected]- Red (Expected)
<form action="">
<fieldset>
<legend></legend>
</fieldset>
</form>
<style lang="postcss">
fieldset:has(> legend) {
background-color: yellow;
}
/* Unused CSS selector "form > fieldset:has(> legend)" */
form > fieldset:has(> legend) {
background-color: red;
}
</style>I don't think this is an intended change of the following PR, because <legend> clearly appears in the markup.
Reproduction
pnpm i [email protected]
pnpm check
# ====================================
# Loading svelte-check in workspace:
# Getting Svelte diagnostics...
#
# /src/routes/+page.svelte:12:2
# Warn: Unused CSS selector "form > fieldset:has(> legend)" (svelte)
# /* Unused CSS selector "form > fieldset:has(> legend)" */
# form > fieldset:has(> legend) {
# background-color: red;
#
#
# ====================================
# svelte-check found 0 errors and 1 warning in 1 filepnpm i [email protected]
pnpm check
# ====================================
# Loading svelte-check in workspace:
# Getting Svelte diagnostics...
#
# ====================================
# svelte-check found 0 errors and 0 warningsLogs
No response
System Info
System:
OS: macOS 15.0.1
CPU: (10) arm64 Apple M1 Pro
Memory: 116.39 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.10.0 - ~/.local/state/fnm_multishells/16744_1729417203997/bin/node
npm: 10.9.0 - ~/.local/state/fnm_multishells/16744_1729417203997/bin/npm
pnpm: 9.12.2 - ~/.local/state/fnm_multishells/16744_1729417203997/bin/pnpm
Browsers:
Chrome: 129.0.6668.101
Edge: 130.0.2849.46
Safari: 18.0.1
npmPackages:
svelte: 5.0.0-next.266 => 5.0.0-next.266Severity
blocking an upgrade
ViincentLim, leoweigand and vnphanquang
Metadata
Metadata
Assignees
Labels
bugcssStuff related to Svelte's built-in CSS handlingStuff related to Svelte's built-in CSS handling