Check out example codes for "ionic mobile always dark theme in web". It will help you in understanding the concepts better.
Code Example 1
// Change from dark to light. If you have not modified the variable.scss. it should be in line 79. @media (prefers-color-scheme: dark)
Learn ReactJs, React Native from akashmittal.com