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.

Proposals for improving shorthand syntax and disabling additional styles #438

@adamdport

Description

@adamdport

I find myself constantly frustrated and surprised by this layout API. I wanted to start a conversation as to what I'm expecting vs what actually happens.

Shorthand syntax

The shorthand flex: 1; in CSS applies the flex-grow: 1; styling. The shorthand syntax for this API, however is fxFlex="<basis>". This is counter-intuitive.

I like that fxFlex alone applies flex: 1 1 0.000000001px, but imho fxFlex="2" should yield flex: 2 1 0.000000001px.

A compromise could be that if units are used (ie. fxFlex="100px" instead of fxFlex="100", then the shorthand affects flex-basis instead of flex-grow, but personally I don't find myself ever wanting to use shorthand to affect flex-basis.

Additional fxFlex Stylings

The shorthand flex: 1 1 200px in CSS implies flex-grow: 1; flex-shrink: 1; flex-basis: 200px;. The general form fxFlex="1 1 200px" however, adds max-width: 200px; min-width: 200px;. This is counter-intuitive (and unusable in all of my use cases thus far).

I'm sure you added this for a reason, but could I we have the ability to disable these additional fxFlex stylings via config or something?


I love the concept of this API but feel that it's trying to do too much for me. Thanks for your consideration!

Metadata

Metadata

Labels

P1Urgent issue that should be resolved before the next re-leasediscussionFurther discussion with the team is needed before proceedingenhancementflexbox

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions