Skip to content

FF148 respects CSS overflow for replaced elements#29002

Merged
caugner merged 1 commit intomdn:mainfrom
hamishwillee:ff148_overflow_replaced_elements
Feb 13, 2026
Merged

FF148 respects CSS overflow for replaced elements#29002
caugner merged 1 commit intomdn:mainfrom
hamishwillee:ff148_overflow_replaced_elements

Conversation

@hamishwillee
Copy link
Contributor

@hamishwillee hamishwillee commented Feb 9, 2026

The overflow (and longhand variants) set how overflow is handled - such as by overflowing (visible), hiding or clipping to the bounding container, or clipping and adding scrollbars.

Prior to CSS Module 4 this was ignored for replaced elements (such as images) that overflow their container. In CSS Module 4 replaced elements should do as other elements: https://drafts.csswg.org/css-overflow-4/#overflow-control

Support was added for FF148 in https://bugzilla.mozilla.org/show_bug.cgi?id=1999100

Support was added for Crhome in 108 - https://chromestatus.com/feature/5137515594383360

Safari doesn't support this yet - ran this test code on latest browserstack hosted browser and you can see that the image is clipped to the circle https://codepen.io/therealpaulplay/pen/JoGQogd

This adds a subfeature to overflow and its longhands.

Related docs can be tracked in mdn/content#42744

@github-actions github-actions bot added the data:css Compat data for CSS features. https://developer.mozilla.org/docs/Web/CSS label Feb 9, 2026
@github-actions github-actions bot added the size:s [PR only] 7-24 LoC changed label Feb 9, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2026

Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs).

@hamishwillee hamishwillee force-pushed the ff148_overflow_replaced_elements branch from 7923cc9 to 4db5dd6 Compare February 9, 2026 23:37
@github-actions github-actions bot added size:l [PR only] 101-1000 LoC changed and removed size:s [PR only] 7-24 LoC changed labels Feb 9, 2026
@hamishwillee hamishwillee force-pushed the ff148_overflow_replaced_elements branch from 4db5dd6 to 680976b Compare February 12, 2026 22:25
@caugner caugner changed the title FF148 CSS overflow respected for replaced elements FF148 respects CSS overflow for replaced elements Feb 13, 2026
@caugner caugner merged commit 14031da into mdn:main Feb 13, 2026
8 checks passed
@mdn-bot mdn-bot mentioned this pull request Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data:css Compat data for CSS features. https://developer.mozilla.org/docs/Web/CSS size:l [PR only] 101-1000 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants