I have to Styled-Elements in my source code:
<Styled @bind-Classname="@hideBody">
& .ant-card-body {
display: none;
}
</Styled>
<Styled @bind-Classname="@root" ComposeHideBody="@hideBody" ComposeHideBodyIf="@(!_edit)">
margin: 5px;
</Styled>
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:
<Styled @bind-Classname="@hideBody">
color: red;
& .ant-card-body {
display: none;
}
</Styled>
<Styled @bind-Classname="@root" ComposeHideBody="@hideBody" ComposeHideBodyIf="@(!_edit)">
margin: 5px;
</Styled>
I have to Styled-Elements in my source code:
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: