Skip to content

🐛 BUG: CSS scoping problem #39

@azrdn

Description

@azrdn

What version of @astrojs/compiler-rs are you using?

0.2.0

What package manager are you using?

pnpm

What operating system are you using?

Fedora Linux 44

Describe the Bug

Generated css scoping in components is incorrect, leading to some styles not being applied.
Raw component CSS:

nav {
	ul {
		row-gap: 0;
		margin: 0;
	}

	li {
		position: relative;

		&::marker {
			content: "";
		}

		&:has(> a:hover) {
			&::before, &::after {
				border-color: var(--accent);
			}
		}
	}
}

(These output are prettified)
Output when using normal astro compiler:
Image

Using Rust compiler:
Image

Link to Minimal Reproducible Example

https://stackblitz.com/github/azrdn/website/tree/v6-rust

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions