Closed Impally closed 5 years ago
A quick check in Chrome shows that this is not the case, at least not for all browsers:
> element.style.backgroundColor = 'fff'
"fff"
> element.style.backgroundColor
"initial"
> element.style.backgroundColor = '#fff'
"#fff"
> element.style.backgroundColor
"rgb(255, 255, 255)"
Could you provide an example of a browser that works without #
?
Closing because of no activity.
The CSS Style declaration looks for only a # followed by 6 characters for Hex values, browsers treat the # as optional and will resolve any value 0-ffffff as hex. The change seems pretty simple, change the regex in parse.js .