Skip to content

Latest commit

 

History

History
executable file
·
15 lines (14 loc) · 616 Bytes

Using_Color_Variables.md

File metadata and controls

executable file
·
15 lines (14 loc) · 616 Bytes

Using the colors.js file

  • The colors.js file has been added in the src folder
  • It has two objects DARK_THEME and LIGHT_THEME
  • In the index.js file the variable names have been added globally to all stylesheets that might be used using the document.documentElement.setProperty() method
  • In your css file, use these variables like this:
    #testId{
    color : var(--orangeText) //where orangeText is the name of the color variable
    }
  • Feel free to add more colors in the colors.js and then simultaneously in index.js(using documentElement.setProperty)