F
Filament11mo ago
Noor

Css !Important

Just a quick question if we cannot use !important too much , and if your css code doesn't work without !important then what solution do we have to make your code work. Otherwise there would be alot !important.
6 Replies
awcodes
awcodes11mo ago
If you’re using a custom theme you shouldn’t need many important at all.
Noor
NoorOP11mo ago
but then it doesn't change the color of text from some classes eg. here
.dark .fi-sidebar-item-active .fi-sidebar-item-icon {
color : rgba(var(--secondary-300))!important;
}
.dark .fi-sidebar-item-active .fi-sidebar-item-icon {
color : rgba(var(--secondary-300))!important;
}
awcodes
awcodes11mo ago
That’s probably getting set with the custom color css properties. But some things might still need it but it shouldn’t be a lot.
Noor
NoorOP11mo ago
so what's the limit of using i t?
awcodes
awcodes11mo ago
Could also try just setting the property too. Would need to see what the actual custom number is on the icon though.
.dark .fi-sidebar-item-active .fi-sidebar-item-icon {
custom-300: var(—secondary-300);
}
.dark .fi-sidebar-item-active .fi-sidebar-item-icon {
custom-300: var(—secondary-300);
}
There’s no actual issue with it except that it can’t be overridden later in the cascade. Important exists for a reason you just have to be conscious of what you are doing with it.
Noor
NoorOP10mo ago
this doesn't changing color
Want results from more Discord servers?
Add your server