Use colors theme variables in custom CSS
Forum rules
Please note that response time for technical support is within 3-5 business days.
Please note that response time for technical support is within 3-5 business days.
You can use sass variables with .css file it's sass exclusive.
No you can use it.For example in app.component.html you have a div with width and height both 200px.I assume that you want to change the background color of that div to primaryColor.
in your app.component.scss you should import the theme which you are using for example you can try this one.
I placed my theme-** folder and files to a folder called shared then i import my theme-blue.scss from overthere after that primaryColor and accentColor are defined in that theme-blue.scss
Now you have access for theme colors.
in your app.component.scss you should import the theme which you are using for example you can try this one.
Code: Select all
@import './shared/resources/theme/theme-blue.scss';
.test {
width: 200px;
height: 200px;
background-color: $primaryColor;
}
Now you have access for theme colors.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 19 guests