- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2018 05:56 AM
Hi,
I have a problem with my CSS on a custom widget.
When I write this CSS code to my widget :
.desaturate {
-webkit-filter: grayscale(100%);
filter: grayscale(100%);
}
.desaturate:hover {
-webkit-filter: grayscale(0%);
filter: grayscale(0%);
}
.panel-app:hover {
-webkit-filter: brightness(97%);
filter: brightness(97%);
}
The page is loaded with only this CSS :
<style type="text/css" id="v296d731bdb2453c03ca3f9c41d961988-s" widget="U Store - Applications">
.v296d731bdb2453c03ca3f9c41d961988 .panel-app:hover {
-webkit-filter: brightness(97%);
}</style>
At start, I think CSS property "filter" was ignored but it doesn't work with "-webkit-filter: grayscale...".
Where is the script to ignore these properties ? And why these properties are ignored ?
Thx
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2019 12:45 AM
2 years later working with widgets, it seems css not understanded by Servicenow is just ignored.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2019 02:09 PM
I am also experiencing the same issue, not being able to use the filter style in my SP
Theme. If anyone knows what is causing css to ignore this and not allow any styling
after the filter is read, I would really appreciate an explanation. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2019 03:34 PM
I figured out a way around this issue.
You need to use "-webkit-filter: unquote("grayscale(100%)");"
for your filter to work. I didn't try just "filter" or any other variation for different browsers, but I'm pretty sure they would work fine with this method.
this is my css:
.top-content {
-webkit-filter: unquote("grayscale(100%)");
-webkit-transition: -webkit-filter ease 1s;
}
.top-content:hover {
-webkit-filter: unquote("grayscale(0%)");
}
And here is a screenshot of what this would look like:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2025 07:46 AM - edited ‎06-19-2025 07:47 AM
Hi Brian! It's Brian! A different Brian from the future!
You can still use `filter` (I hate using prefixed properties!)!
It's, ok, well, it's a little bit ew, but, it works! You can interpolate the filter property, like so:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2019 02:52 AM
Hi, I was wondering, the css that you used and what you say that is being loaded differs quite a lot. It looks like all styling in the "desaturate" class is not being loaded. So despite the dicussion on filter and web-kit filter I was wondering more about why or what the reason is for the styling to dissapear. I do know that desaturate is a scss function, so perhaps you can not use that as a class name? Could you perhaps test this and give it another classname in your code and in your style? And what happens if you move this styling out of your widget to the stylesheet of your portal page? Curious...
Regards!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2019 12:45 AM
2 years later working with widgets, it seems css not understanded by Servicenow is just ignored.