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

fxFlex flex-basis doesn't work like css flex flex-basis: sets max-with and min-width #625

Closed
aleixsuau opened this issue Feb 19, 2018 · 4 comments

Comments

@aleixsuau
Copy link
Contributor

aleixsuau commented Feb 19, 2018

Bug, feature request, or proposal:

fxFlex flex-basis doesn't work like css flex flex-basis: fxFlex is setting a max-with and min-width so the elements works like with a fixed size, it doesn't grow or shrink to fit the available space.

What is the expected behavior?

fxFlex flex-basis should work like flex flex-basis.

What is the current behavior?

fxFlex is setting a max-with and min-width so the element works like with a fixed size, it doesn't grow or shrink to fit the available space.

What are the steps to reproduce?

Here you can compare a fxFlex and css flex behaviours:
https://stackblitz.com/edit/flex-layout-issue?file=app%2Fapp.component.html

What is the use-case or motivation for changing an existing behavior?

It is not flexible nor intuitive.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

@angular/core 5.0.0 and @angular/flex-layout 2.0.0-beta.12

Is there anything else we should know?

Great work anyway, flexLayout is awesome :)

@CaerusKaru
Copy link
Member

Duplicate of #538

@CaerusKaru CaerusKaru marked this as a duplicate of #538 Feb 19, 2018
@aleixsuau
Copy link
Contributor Author

Hi @CaerusKaru ,
I think this is not a duplicate of #538, #538 is a feature/fix proposal and this is a bug report.

I saw that #538 was closed, but this bug remains in the latest version.

Please take a look at the stackblitz and resize the window to see that fxFlex="1 1 250px" is not working like style="flex: 1 1 250px;". In fact fxFlex="1 1 250px" works like style="flex: 1 0 250px;", with 0 shrink.

I guess the cause is that fxFlex is setting a max-with and min-width so the element works like with a fixed size, it doesn't shrink to fit the available space.

Thanks!

@CaerusKaru
Copy link
Member

Then this is a duplicate of #689 and #438

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants