As you see I write:
border: 1px solid red;
then remove only the right border:
border: 1px solid red;
border-right-width: 0;
because I don't want to write:
border-top: 1px solid red;
border-bottom: 1px solid red;
border-left: 1px solid red;
But I get an error:
wrong scss code
recommendation:
recommendation
ide decision:
ide decision
And I don't understand why.
Webstorm says that I should keep only
border: $border;
or border-right-width: 0;
not two lines of code at the same time.
But if I write like this:
border: 1px solid red;
border-width: 1px 0 1px 1px;
It says that it's ok. I don't understand Why is it ok but border-right-with not?
I also tried border-right: 0;
but it says that it's the wrong code too.
The error you're encountering in WebStorm regarding your SCSS code is related to a recommendation or decision made by the IDE's code analysis tool and actually, it's not the scss compiler error. It suggests that you should choose either border: $border;
or border-right-width: 0;
, but not have both lines of code simultaneously. This recommendation is due to the conflicting nature of border
and border-right-width
properties, as both affect the overall border appearance.