Skip to content

layout: Ensure legacy alignment-related presentational hints match specification#42220

Merged
mrobinson merged 1 commit intoservo:mainfrom
mrobinson:alignment-presentational-attributes
Jan 28, 2026
Merged

layout: Ensure legacy alignment-related presentational hints match specification#42220
mrobinson merged 1 commit intoservo:mainfrom
mrobinson:alignment-presentational-attributes

Conversation

@mrobinson
Copy link
Copy Markdown
Member

The legacy alignment presentation hints differed from the specification
in a way that was breaking them when dealing with <img>. The culprit
seems to be the selector img[type = image i] which seems a little
nonsensical. This change makes the CSS in presentational-hints.css
match what is found in the specification.

There is still an issue with "bottom" alignment of replaced elements and
more investigation is necessary to understand what specified or
unspecified behavior we are failing to implement.

Testing: This fixes a variety of WPT tests.
Fixes: #41048.

…ecification

The legacy alignment presentation hints differed from the specification
in a way that was breaking them when dealing with `<img>`. The culprit
seems to be the selector `img[type = image i]` which seems a little
nonsensical. This change makes the CSS in `presentational-hints.css`
match what is found in the specification.

There is still an issue with "bottom" alignment of replaced elements and
more investigation is necessary to understand what specified or
unspecified behavior we are failing to implement.

Signed-off-by: Martin Robinson <[email protected]>
@mrobinson mrobinson requested a review from Loirooriol as a code owner January 28, 2026 15:21
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jan 28, 2026
@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Jan 28, 2026
@mrobinson mrobinson added this pull request to the merge queue Jan 28, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jan 28, 2026
Merged via the queue into servo:main with commit da7027a Jan 28, 2026
32 checks passed
@mrobinson mrobinson deleted the alignment-presentational-attributes branch January 28, 2026 18:29
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

<img> align attribute doesn't work

3 participants