Color specific to a value - Forum | JoomShaper
Staff replied SP Page Builder

Color specific to a value

Asked by TOCHTERMANN DAMIEN 3 weeks ago Last activity 3 weeks ago

Hello,

In the website i work actually on , i have a status field (dynamic field). How to change color of text depending on that value ? Thanks ( for example, : "started" in green, "work in progress" in yellow etc...

1 reply

Toufiq Senior Staff

Hi there,

Thank you for your question. Right now there is no feature to do it. This can be achieved by using custom CSS based on the value of the status field.

Best regards,

Toufiqur Rahman (Team Lead, Support)

TOCHTERMANN DAMIEN Asked this

do you have an example of css for this ? i just have 2 values in this website ( "In progress" / "Finalized").

Thanks

PS : would be welcome to be able to custom this.

Toufiq Senior Staff

Share both url

TOCHTERMANN DAMIEN Asked this

French values are "En cours" and "Terminé" ( field eStatut") in Projets (Dynamic field)

Toufiq Senior Staff

Use this css code inside the custom.css file.

https://prnt.sc/sTFc7ZxSQ_cF

.sppb-addon-dynamic-content-filter-item-checkbox-option:nth-child(1) {
  --item-color: #ff3b30;
}

.sppb-addon-dynamic-content-filter-item-checkbox-option:nth-child(2) {
  --item-color: #28a745;
}

.sppb-addon-dynamic-content-filter-item-checkbox-option
.sppb-addon-dynamic-content-filter-fake-checkbox-input {
  border: 2px solid var(--item-color) !important;
}


.sppb-addon-dynamic-content-filter-item-checkbox-option
input:checked + .sppb-addon-dynamic-content-filter-fake-checkbox-input {
  background-color: var(--item-color) !important;
}


.sppb-addon-dynamic-content-filter-item-checkbox-option
input:checked + .sppb-addon-dynamic-content-filter-fake-checkbox-input i {
  display: block !important;
  color: #fff !important;
}

.sppb-addon-dynamic-content-filter-item-checkbox-option > label {
  color: var(--item-color);
}
TOCHTERMANN DAMIEN Asked this

Sorry i forgot to mention... not on filtters but on values from items (list view and detail view)

Toufiq Senior Staff

Did you change login credential?

TOCHTERMANN DAMIEN Asked this

no

Log in to reply.