[Webkit-unassigned] [Bug 272479] New: Incorrect position of ::before { position:absolute; bottom:0} dynamically changing content: regression

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 10 13:41:10 PDT 2024


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

            Bug ID: 272479
           Summary: Incorrect position of ::before { position:absolute;
                    bottom:0} dynamically changing content: regression
           Product: WebKit
           Version: Safari 17
          Hardware: Unspecified
                OS: macOS 14
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: a at totic.org

Created attachment 470854

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

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 ";
  }

-- 
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/20240410/5006bbbc/attachment-0001.htm>


More information about the webkit-unassigned mailing list