[Webkit-unassigned] [Bug 272527] Elements with border, position: absolute and aspect-ratio: 1 are not square

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Apr 14 20:21:48 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=272527

--- Comment #7 from Karl Dubost <karlcow at apple.com> ---
Created attachment 470923

  --> https://bugs.webkit.org/attachment.cgi?id=470923&action=review

more reduced testcase

div {
    border: 0px solid;

    position: absolute;
    background-color: gold;
    top: 0;
    left: 0px;
    height: 100px;
    width: auto;
    aspect-ratio: 1 / 1;
}

document.querySelector('div').getBoundingClientRect().width = 100
document.querySelector('div').getBoundingClientRect().height = 100


div {
    border: 20px solid;

    position: absolute;
    background-color: gold;
    top: 0;
    left: 0px;
    height: 100px;
    width: auto;
    aspect-ratio: 1 / 1;
}

document.querySelector('div').getBoundingClientRect().height = 100
document.querySelector('div').getBoundingClientRect().width
Safari: 180
Chrome, Firefox: 140

In addition to the border, twice the width of the border is being added.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240415/cba6fc73/attachment-0001.htm>


More information about the webkit-unassigned mailing list