CSS Variables in the Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2017 08:12 AM
Hi there,
I have created a CSS variable in the Stock theme record in the Service Portal as follows: "$my-color: #990010;".
From a CSS sheet attached to the theme I declare the following rule:
This does not work in widget on the portal page. If however, I change the CSS1 rule to "color: #990010;" then it does change my widget. Can any spot the error in my variable call from the CSS rule?
Darren
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2017 08:11 AM
Is it because the brand variables are not called from CSS style sheets that you create but directly from css section of the widget editor?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2017 03:42 PM
I once had same symptoms when I had a slight typo in my variable declaration:
$aqua: #001d1c1 !default;
Where it should have been:
$aqua: #00d1c1 !default;
The syntax in your variables looks correct though. So only thoughts are to try removing all the other variables except for "$my-color" and see if it works. If it does, then your CSS might be breaking because of another variable further up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2018 02:39 PM
I was able to resolve this by moving my class definition that called the variable from the CSS Include for the theme to the widget specific CSS (a header widget in my case).
We're on Kingston, if it makes any difference.