Css style with selector

Vaadin 14:
I have the following class :

.status-button:after {
border-top-color: #a8a8a8;
border-bottom-color: #a8a8a8;

The problem is that I want to change border-top-color and border-bottom-color dynamically.
I can if there is no :after selector.

Thank you!

Hi Yoeurm,

A bit confused as to what you’re trying to accomplish. You can change the border-color dynamically using button.getStyle().set("border-top-color", "#a8a8a8").

I’d be careful removing the pseudo-elements as they’re used for hover and active states.


Thanks. I will find other way to do it.