Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48979

How to use Ionic's default theme CSS variables

$
0
0

I’d like to use some of the default Ionic theme color variables like --ion-border-color, --ion-color-step-200 etc in my application. I notice several of these are defined in src/theme/variables.css for dark mode but not for the default :root selector. So for example if I set an icon’s color like below the style takes effect in dark mode but not in the default light mode.

.my_icon {
	color: var(--ion-color-step-200);
}

Am I missing the proper method for using Ionic’s default theme CSS variables?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48979

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>