Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

css root variables

/* css variables set up */
:root {
  --main-bg-color: brown;
  --main-padding: 1rem;
}

/* use */
.element {
  background-color: var(--main-bg-color);
  padding: var(--main-padding);
}
 
PREVIOUS NEXT
Tagged: #css #root #variables
ADD COMMENT
Topic
Name
9+4 =