I'm trying to change width and height of pseudo-class element through the attribute. I'm doing this because I cannot change pseudo element in javascript. What's wrong in my code? Mozilla says its posible: https://developer.mozilla.org/en/docs/Web/CSS/attr#Examples
.loader::before {
height: 30px;
width: attr(data-width);
display: block;
position: absolute;
background-color: red;
content: '';}
javascript:
$('.loader').attr('data-width', '100px');});