Skip to content

‘max-{inline,block}-size’ not taken into account in positioned boxes #29592

Closed

Activity

  1. added
    A-layout/2020
    on Apr 6, 2023
  2. changed the title [-]‘max-{inline,block}-size’ not taken into account[/-] [+]‘max-{inline,block}-size’ not taken into account in positioned boxes[/+] on Apr 6, 2023
  3. added a commit that references this issue on Apr 12, 2023
  4. delan commented on Apr 20, 2023

    @delan
    MemberAuthor

    #29594 covers the positioned non-replaced case, and it looks like ‘{min,max}-width’ and ‘{min,max}-height’ are already taken into account in the positioned replaced case, so this issue is now resolved:

    <!doctype html><meta charset="utf-8">
    <style>
        section {
            background: black;
        }
        section, div {
            width: 2em;
            height: 2em;
        }
        div, img {
            position: absolute;
        }
    </style>
    <section><div><img style="width: 100%; height: 100%; max-width: 50%; max-height: 50%;"
        src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPj/HwADBwIAMCbHYQAAAABJRU5ErkJggg=="></div></section>
    <section><div><img style="width: 0; height: 0; min-width: 50%; min-height: 50%;"
        src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPj/HwADBwIAMCbHYQAAAABJRU5ErkJggg=="></div></section>
    <section><div><img style="width: 0; height: 0; min-width: 50%; min-height: 50%; max-width: 0; max-height: 0;"
        src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPj/HwADBwIAMCbHYQAAAABJRU5ErkJggg=="></div></section>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-layout/2020

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions