jsdom / cssstyle

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

Invalid hexadecimal color value is parsed as valid #136

Open cdoublev opened 3 years ago

cdoublev commented 3 years ago

The following test fails because style.color === 'rgb(18, 52, 86)':

test('invalid hex color value', () => {
    var style = new CSSStyleDeclaration();
    style.color = '#1234567';
    expect(style.color).toEqual('');
})