11
Views
5
Comments
Setting Non Editable Widget's Color Back to White
Question

Hi all,

I notice everytime i set a widget's "enabled" value to false, the widget always turns grey. Is there any way to turn it back white while the "enabled" value is still false?

Thanks before!

Hi Steven,

Jst try by adding the background color to the input control by css and set it to white.

"background-color: white; "

You need to set it css style to important as per your requirement.

Hope this helps you,


Regards,

LK

Rank: #156

Hi Steven,


Yes, you can use CSS and the pseudoelement disabled for that. The reason why you want to use the pseudoelement disabled is to apply the style only if it is disabled. Something like this:


.Button[disabled] {

  background: white;

}


I for instance applied CSS to the New Post button which I set to disabled and it works


Cheers,

João

mvp_badge
MVP
Rank: #96

Hi Steven,

You can also override the below class definition to get the same behavior for all the Disabled widget in the screen..

[disabled="disabled"], [readonly="readonly"], textarea[readonly="readonly"] {
    background-color: var(--color-neutral-0);
}


Hope this helps you!


Regards,

Benjith Sam

Rank: #214

Hello Steven,

One way to do this is to simply add a style, example:


Regards :D