Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript get css variable

getComputedStyle(document.documentElement)
    .getPropertyValue('--my-variable-name'); // #999999
Source by davidwalsh.name #
 
PREVIOUS NEXT
Tagged: #javascript #css #variable
ADD COMMENT
Topic
Name
4+3 =