CSS Classes and Rules
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2026 06:50 AM
Hi All,
does anyone figure it out how to apply CSS rules in UI Builder and what they are for? ServiceNow Docs regarding this topic is a joke.
Create custom style classes and rules • Australia Build or modify applications • Docs | ServiceNow
Has anyone ever figured it out how to for example apply some CSS on :hover?
Any help would be appreciated.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2026 07:24 AM
Can you give the exact component and use case
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2026 09:05 AM
Hi @Naveen20 ,
there is no use case. How should I use css rules? Documentation should provide me with example.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2026 08:59 AM
I wish I could tell you. I've been wondering the same thing. I've used custom page CSS classes applied with data binding, but I'm as clueless about rules as you are. CSS rules may as well not exist from my perspective.
As far as I can tell, pseudoclasses aren't an option. They certainly aren't in the custom CSS classes section.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2026 12:36 AM
Hi @Fernnn ,
I've managed to apply rule to button component via script. So, I have repeater with few buttons, where I wanted to apply different background color of bare button if it's active.
And it actually works!