Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LibWeb: max-width incorrectly stretches ancestor in block layout #20235

Closed
awesomekling opened this issue Jul 28, 2023 · 1 comment · Fixed by #20317
Closed

LibWeb: max-width incorrectly stretches ancestor in block layout #20235

awesomekling opened this issue Jul 28, 2023 · 1 comment · Fixed by #20317
Labels
bug Something isn't working regression

Comments

@awesomekling
Copy link
Contributor

This document no longer behaves correctly:

<!doctype html><style>    
    * {    
        border: 1px solid black !important;    
    }    
    body {        
        width: max-content;    
    }      
    .inner {                 
        max-width: 200px;       
        font-size: 50px;          
    }    
</style><body><div class="outer"><div class="inner">well hello friends

Regressed in bf3144f.

cc @emilitzerjo

@awesomekling awesomekling added bug Something isn't working regression labels Jul 28, 2023
@awesomekling awesomekling changed the title LibWeb: max-height incorrectly stretches ancestor in block layout LibWeb: max-width incorrectly stretches ancestor in block layout Jul 28, 2023
@emilitzerjo
Copy link
Contributor

That's unfortunate. Defaulting to 0 seems to be too naive. I am currently on vacation and will have a look at it next week.
I had a local version where i tried to implement the width calculation more spec compliant for min-width so hopefully i can fix both.

kalenikaliaksandr added a commit to kalenikaliaksandr/serenity that referenced this issue Aug 1, 2023
max-width for boxes with inline children can only be applied after
inside layout is done and width of box content is known.

Fixes SerenityOS#20235
awesomekling pushed a commit that referenced this issue Aug 2, 2023
max-width for boxes with inline children can only be applied after
inside layout is done and width of box content is known.

Fixes #20235
auipc pushed a commit to auipc/serenity that referenced this issue Aug 12, 2023
max-width for boxes with inline children can only be applied after
inside layout is done and width of box content is known.

Fixes SerenityOS#20235
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants