capricorn86 / happy-dom

A JavaScript implementation of a web browser without its graphical user interface
MIT License
3.28k stars 200 forks source link

getPropertyValue gives wrong value when getting hex alpha color notation #1405

Open sandymcfadden opened 5 months ago

sandymcfadden commented 5 months ago

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:

  1. Run git clone https://github.com/sandymcfadden/happy-dom-hex-alpha-color-notation.git
  2. Run npm install
  3. 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: