Open esso23 opened 4 years ago
I will check it out right away, sorry about that
@esso23 Did that syntax work prior to V3? If so, I will need to work on getting it back up and running again. In the meantime you can use the following syntax:
<Styled @bind-Classname="@ExtraSmallOnlyClass">
@@media (min-width:0px) and (max-width:599.95px) {
&{
display: none;
}
}
</Styled>
The &
will be replaced by the dynamic name of the class
Yes, it worked with 2.2.0. Thanks, I'll use this in the meantime.
It still does not work. This is the class I'm currently trying this on:
<BlazorStyled.Styled @bind-Classname="@FontClass">
@@media screen and (max-width: 400px) {
&{
font-size: 60% !important;
}
}
@@media screen and (min-width: 400px) and (max-width: 600px) {
&{
font-size: 70% !important;
}
}
@@media screen and (min-width: 600px) and (max-width: 800px) {
&{
font-size: 80% !important;
}
}
@@media screen and (min-width: 800px) and (max-width: 1100px) {
&{
font-size: 90% !important;
}
}
@@media screen and (min-width: 1100px) {
&{
font-size: 90% !important;
}
}
</BlazorStyled.Styled>
Example class:
When I inspect it in Chrome the styled div looks like this
<div class=" "> ...
(There's space instead of class)