WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
272479
REGRESSION (
271848@main
): Incorrect position of ::before { position:absolute; bottom:0} dynamically changing content
https://bugs.webkit.org/show_bug.cgi?id=272479
Summary
REGRESSION (271848@main): Incorrect position of ::before { position:absolute;...
Aleksandar Totic
Reported
2024-04-10 13:41:10 PDT
Created
attachment 470854
[details]
Demo of the bug Dynamically changing CSS content: of an absolutely positioned pseudo-element (::after/::before) with bottom:0 moves content to the top of its container. I believe this is a regression, it worked a few weeks ago, might be the latest update. This is a problem with style invalidation. Works in FF/Chrome. See attached file for demo, detailed report. Basically, this css will display incorrectly if you toggle .changeContent class. .container { display: block; position: relative; } .container::after { position: absolute; bottom: 0; display: block; content: 'default ::after content'; } .container.changeContent::after { content: ".container.changeContent::after content "; }
Attachments
Demo of the bug
(2.46 KB, text/html)
2024-04-10 13:41 PDT
,
Aleksandar Totic
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2024-04-10 15:08:14 PDT
Thank you for the reduced test case with clear steps! I can reproduce in Safari 17.5 beta, and can not reproduce in Safari 17.1, so it's indeed a regression.
Radar WebKit Bug Importer
Comment 2
2024-04-10 15:08:23 PDT
<
rdar://problem/126234450
>
Antti Koivisto
Comment 3
2024-04-16 01:08:11 PDT
Excellent test case!
Antti Koivisto
Comment 4
2024-04-16 06:04:34 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/27324
Aleksandar Totic
Comment 5
2024-04-16 08:05:28 PDT
I was hoping that an excellent test case would lead to a quick fix. And it did, thanks!
Aleksandar Totic
Comment 6
2024-04-16 10:02:08 PDT
Checked out the pull request. This test would also be a good addition to wpt/css/CSS2/positioning/, dynamic test coverage is scarce.
EWS
Comment 7
2024-04-16 10:10:46 PDT
Committed
277550@main
(6d4b28213caf): <
https://commits.webkit.org/277550@main
> Reviewed commits have been landed. Closing PR #27324 and removing active labels.
Antti Koivisto
Comment 8
2024-04-17 01:17:24 PDT
Good point, I'll make a WPT version of the test.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug