Hello,
Someone know how to use primary and secondary color variable in custom CSS?
Thanks,
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.
Hi,
In your theme-***.scss for example theme-blue.scss there is primary color and accent color you can just change them it will apply to the ultima.
In your theme-***.scss for example theme-blue.scss there is primary color and accent color you can just change them it will apply to the ultima.
You should just define primary and accent color for your own components then apply them to it in your custom theme.
And take a look at here,
http://www.primefaces.org/ultima-ng/#/documentation
And take a look at here,
http://www.primefaces.org/ultima-ng/#/documentation
You should variable names directly to the your components.
For example you have a button
When you change theme after this your custom css will automatically applied to your components.
For example you have a button
Code: Select all
.button {
.loginBtn {
background-color: $primaryColor;(Your custom color)
color: $accentColor;
&.ui-state-hover {
background-color: $primaryDarkColor;
}
}
}
So, i tried this w/o success.
This is what i did :
Create a in my view and in my css
There is something missing in the process? Like declare my primary and accentColor in the root off my application with the path of the scss file ?
This is what i did :
Create a
Code: Select all
<p id="1">hello</p>
Code: Select all
#1 { color: $primaryColor; }
Yes you should have those variables in your root.
Hi,
I'm on the same problem.
In my component.ts, I have :
which is the good path to the theme.
Then, in my component.html, I have :
And, in my component.css, I try :
What's wrong with this method ? Because the navigator returns that $accentColor is an invalid value.
Thanks in advance
I'm on the same problem.
In my component.ts, I have :
Code: Select all
styleUrls: ['../../assets/primeng-ultima/theme/theme-dark-blue.scss']
Then, in my component.html, I have :
Code: Select all
<p class="test"> test</p>
And, in my component.css, I try :
Code: Select all
.test {
color: $accentColor;
}
Thanks in advance
-
- Information
-
Who is online
Users browsing this forum: No registered users and 1 guest