Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to set css variables in javascript

		const docStyles = document.documentElement.style;

		docStyles.setProperty('--accent', '#ffffff');
		docStyles.setProperty('--textColor', '#ffffff');
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #set #css #variables #javascript
ADD COMMENT
Topic
Name
5+6 =