The CreatorCon Call for Content is officially open! Get started here.

VaranAwesomenow
Mega Sage

As per following support articles if you want to apply a field style to both form and list then value field of style has to be left blank but issue with that is, it will apply style to list which is not expected, for example with below field style output on form and list would look like below

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0584393

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0564026

background-color:red;
font-size:16px;
color:green;

without value above style would apply to all rows which is not expected.

But with just this and without value it applies fine to the form

font-size:16px;
color:green;

In order to get desired results which is to apply to both form and list, you can create two field styles one with value and one without value so that style gets applied to both field and list.

form view