'Vaadin button: add generic and specific disabled button styles

A generic disabled button style is added in vaadin-button.css like below:

:host([disabled][disabled]) { border-style: dotted !important; border-width: 1px !important; border-color: #545F66 !important; background-color: #F3F4F4 !important; }

In some cases, I want background to be transparent when disabled. How can I archive this?

I tried to add a class component-transparent class to the button, but I don't know how to select the disabled button. I tried:

:host(.component-transparent [disabled][disabled]) { border: none !important; background: transparent !important; }

This does not work. Can anybody help? Thanks in advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source