happy-dom
happy-dom copied to clipboard
getPropertyValue gives wrong value when getting hex alpha color notation
Describe the bug
In browsers when you use style.getPropertyValue("background-color")
when that color uses hex alpha notation it returns an rgba
color.
When using happy-dom it returns the hex alpha notation string instead.
To Reproduce Steps to reproduce the behavior:
- Run
git clone https://github.com/sandymcfadden/happy-dom-hex-alpha-color-notation.git
- Run
npm install
- Run
node src/index.js
Expected behavior
To match browsers and log the rgba
color string
Screenshots If applicable, add screenshots to help explain your problem.
Device:
- Node.js: v20.11.0
- happy-dom: 14.7.1