Page 1 of 1

Changing color from custom-light-grey to even lighter grey

Posted: 17 May 2021, 09:41
by Krisztyan
Hi Guys,


this is a follow-up of my previous topic:
viewtopic.php?f=138&t=66797

I created a new post because the question is a bit different. I hope it is OK.

I am using Rain theme. I would like to change the color of my button if it disabled to light grey.
The changing of the logic and the usage of light grey is fine.

Code: Select all

<p:commandButton styleClass="#{!prod.isCancelable() ? 'custom-light-grey' : 'danger-button'} p-mr-2" disabled="#{!prod.isCancelable()}">
I would like to have a more lighter grey button. Can please someone tell me how I can get a lighter grey than 'custom-light-grey'?

Can please someone tell me how to do that?

Many thanks and best regards,
Krisztyan

Primefaces version: 8.0.4
Rain theme: 1.0.0

Re: Changing color from custom-light-grey to even lighter grey

Posted: 17 May 2021, 11:35
by siris
Hi,

I could not understand exactly what you wanted. Do you need a css code or are you looking for a color code?
You can use "#e9ecef" or "#dee2e6" color codes for more lighter grey colors.
Here's a sample css code for you to add to your "webapp/resources/sass/overrides/_theme_styles.scss" file:

Code: Select all

body .ui-button.custom-lighter-grey{background-color: #e9ecef;border-color: #e9ecef;}
Best Regards,

Re: Changing color from custom-light-grey to even lighter grey

Posted: 17 May 2021, 15:08
by Krisztyan
Hello Siris,

thanks for your help. I overwrote the color in our custom .css part and it is working fine now.

Thank you and best regards,
Krisztyan

Re: Changing color from custom-light-grey to even lighter grey

Posted: 18 May 2021, 09:05
by siris
Hi,

I am glad your problem has been resolved. You are welcome.