capricorn86/happy-dom

window.getComputedStyle(element).width does not return the correct size in pixels

jgonte opened this issue · 0 comments

Describe the bug
window.getComputedStyle(element).width does not return the correct size in pixels

To Reproduce
Steps to reproduce the behavior:
const e= document.createElement('div');

document.body.appendChild(e);

e.style.width = "10ch";

const width= window.getComputedStyle(e).width;

width equals "10ch"

Expected behavior
It should be the size in pixels, for example "120px"