Home > Net >  Are CSS variables supported by mobile browsers / Android / IOS?
Are CSS variables supported by mobile browsers / Android / IOS?

Time:01-06

I am writing a React APP primarily intended for mobile usage. I heavily rely on CSS variables to change the color themes etc.

Will this be supported in mobile browsers, Android, and IOS?

for example:



:root {
  --dark-main-color: #0d1117;
  --light-main-color: #fefefa;

  // defaulting to dark theme 
  --main-color: var(--dark-main-color);
}

CodePudding user response:

I have ran into the same problem, and I found this website very useful.

LINK: https://caniuse.com/css-variables

  •  Tags:  
  • Related