chanan / chanan/BlazorStyled

Nested selectors do not work if they are the only rule

Open
#109 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C#
Stars
193
Forks
19
PR merge metrics
No merged PRs in 30d

Description

I have to **Styled**-Elements in my source code:

```

& .ant-card-body {
display: none;
}

margin: 5px;

```

If the field **_edit** is set to **true**, _display: none_ should be applied to the descendant with the class name **ant-card-body**, which is not happening with the code above. But when I add another rule to the first **Styled** element it suddenly works as I expected it to:

```

color: red;
& .ant-card-body {
display: none;
}

margin: 5px;

```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the two Styled examples, comparing the nested-only rule with the version that also contains color: red, and inspect how the component handles those rules. Done means the nested .ant-card-body selector applies display: none without requiring an unrelated additional rule.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, css
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.