dollar-js icon indicating copy to clipboard operation
dollar-js copied to clipboard

Support custom css properties?

Open seebigs opened this issue 8 years ago • 0 comments

<div style="--color: red; color: var(--color)">text</div>
<script>
$('div').css('--color') ; // should return "red"
$('div').css('--color','blue') ; // should change text color to blue

//without jQuery we must currently do it like this:
getComputedStyle($('div')[0]).getPropertyValue('--color') ;
$('div')[0].style.setProperty('--color','blue') ;
</script>

seebigs avatar Mar 17 '17 20:03 seebigs