jsdom / cssstyle

A Node.js implementation of the CSS Object Model CSSStyleDeclaration interface
MIT License
107 stars 70 forks source link

Opaque hexadecimal color values should be resolved to rgb #135

Open cdoublev opened 3 years ago

cdoublev commented 3 years ago

This test expectation is wrong:

style.color = '#ffffffff';
expect(style.color).toEqual('rgba(255, 255, 255, 1)');

In Chrome/Firefox:

target.style.color = '#ffffffff'
console.log(target.style.color) // "rgb(255, 255, 255)"

Though I believe that this is not described in any specification.