I would like to different color self element when it is disabled, similar to hover using the sass nested syntax. Is it possible to achive something like the following?
.class {
color: blue;
&:hover {
color: grey;
}
&:[disabled] {
color: red;
}
}
I know that I can do that without nesting and Sass Ampersand like this:
.class {
color: blue;
&:hover {
color: grey;
}
}
.class[disabled] {
color: red;
}
I am curious if this can be achieved with some sort of first solution.
This is how the DOM element looks in the browser.
<div _ngcontent-luo-c245 mat-menu-item disabled="true" class="mat-focus-indicator menu-item mat-menu-item" ng-reflect-disabled role="menuitem" tabindex="-1" aria-disabled="true">...</div>