Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Setting flex-basis to 0 results in max-width: 0 #277

Closed
@adamdport

Description

@adamdport

I'm trying to set up rows with equal-width columns. I can tell flexbox to not consider the contents in its calculations by setting a flex-basis of 0. This lets flex-grow distribute all available space in consistent proportions.

I tried the following:

<div fxLayout="row">
    <div fxFlex="1 1 0px">Grows to 25% width</div>
    <div fxFlex="3 1 0px">Grows to 75% width</div>
</div>

What resulted was both child divs having max-width: 0px set, which ruined my layout. If I remove this max-width property, the row renders correctly. Here's a plunker demonstrating the issue.

Metadata

Metadata

Labels

P1Urgent issue that should be resolved before the next re-leasebughas prA PR has been created to address this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions