Do custom CSS properties use one leading dash or two?
#elem { -myCustom: 99; } OR #elem { --myCustom: 99; } I have seen both of the above used in examples online. What the difference between the two? Trying to access custom properties in JavaScript returns null.. #elem { -myCustom: 99; } <div id="elem">some text</div> elem = document.getElementById("elem"); style= window.getComputedStyle(elem); value = style.getPropertyValue('-myCustom'); alert(value); single leading dash is used for vendor prefixes double leading dash is used for defining custom properties . 2 Defining Custom Properties: the '--*' family of properties A custom property is any