Closed Bug 1819401 Opened 2 years ago Closed 2 years ago

The width of an inline-block element is incorrectly calculated when using ::first-letter and text-transform : uppercase

Categories

(Core :: Layout: Block and Inline, defect)

Firefox 110
Desktop
Windows 11
defect

Tracking

()

RESOLVED DUPLICATE of bug 362880

People

(Reporter: Arian.hamdi, Unassigned)

Details

Attachments

(2 files)

Attached video mozilla-bug.mp4

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0

Steps to reproduce:

<!DOCTYPE html>
<html lang="en">

<head>
<style>
.test {
display: inline-block;
background-color: orangered;
}

    .test::first-letter {
        text-transform: uppercase;
    }
</style>

</head>

<body>
<div class="test">
view profile
</div>
</body>

</html>

The bug occurs when I use text-transform : uppercase on ::first-letter .
There is no bug even when text-transform is set to lowercase or capitalize.

Actual results:

In Mozilla Firefox, you can see there is an incorrect width calculated for this element. You can zoom in or out to fix this.

Expected results:

Elements should be painted in the correct size.

OS: Unspecified → Windows 11
Hardware: Unspecified → Desktop
<head>
    <style>
        .test {
            display: inline-block;
            background-color: orangered;
        }
        .test::first-letter {
            text-transform: uppercase;
        }
    </style>

</head>

<body>
    <div class="test">
        view profile
    </div>
</body>

</html>

Here is the formatted HTML.

The Bugbug bot thinks this bug should belong to the 'Core::Web Painting' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Web Painting
Product: Firefox → Core
Attached file indf.html
Component: Web Painting → Layout: Block and Inline

This is unfortunately a longstanding known bug, tracked in bug 362880 and bug 385615.

Marking as a duplicate of the former bug.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Duplicate of bug: 362880
Resolution: --- → DUPLICATE

(In reply to Daniel Holbert [:dholbert] from comment #4)

This is unfortunately a longstanding known bug, tracked in bug 362880 and bug 385615.

Marking as a duplicate of the former bug.

*** This bug has been marked as a duplicate of bug 362880 ***

That's correct, it's duplicate, but there is no progress towards fixing them.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: