How to change the font-size of record list on ui builder

Ramjipal
ServiceNow Employee

Ramjipal_0-1766511232661.png


i want to change the font size of record list cells current default font-size is 16 px.
i have tried adding css class and rules but it is not working

 

6 REPLIES 6

Maham Tahir
Mega Guru

Hi @Ramjipal,

 

If you are trying to change this in the Native Backend (Next Experience/UI16), so this could be the reason for css not working as ServiceNow blocks global CSS injection and DOM manipulation for standard lists in modern releases (Polaris/Next Experience) for security and upgrade safety. You cannot apply a custom stylesheet to the OOB list grid globally.

 

The supported way to reduce row height and font perception is to click the User Menu (Avatar) > Preferences > Display and select "Compact".

MahamTahir_0-1766517382450.png

 

If you need specific fields to stand out, use System UI > Field Styles. You can set a style like font-size: 14px there, but it applies per column, not the whole row/grid.

 

However, if you are working in Service Portal (Widget), your CSS is likely being overridden by Bootstrap defaults. You just need to target the specific table cell classes and use !important.

 

Lemme know if you got your issue resolved by following this!

If you find my response helpful, mark it as helpful and accepted solution.

 

Regards, 

Maham Tahir.

 

Ramjipal
ServiceNow Employee

hi @Maham Tahir  i have applied the field style and also on the compact property to true but still it is 16px;
any workaround on this?

 

Ramjipal_0-1766554465586.png

 

Ramjipal_1-1766554492048.png

 

@Ramjipal I don't think there is a way to achieve this for workspaces.

 


Raghav
MVP 2023
LinkedIn

Hi @Ramjipal

 

Check on simple List view, did it get apply? If yes then maybe we can't apply on workspaces.