question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

poll: what should be the default behavior for fxFlex?

See original GitHub issue

This issue tracks the possibility of changing the default behavior for the fxFlex directive. Currently, the behavior is as follows:

  • When the input is an integer, this defaults to a percentage value input for fxFlex
  • When the input is any other singular value, it’s interpreted as the intended flex-basis value and results in flex: 1 1 <input> with min-width and max-width applied (assuming row format)
  • When the input is three values, it’s interpreted as a direct translation to the CSS flex property, with min/max-width applied according to the algorithm specified here
  • When the input is longer than three values, it is truncated to the first three values

I’ll list some alternative options for fxFlex behavior below, please vote for your preferred option, or feel free to add your own. If you like the current behavior, please do not add comments, but simply vote for this comment.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:34 (18 by maintainers)

github_iconTop GitHub Comments

6reactions
adamdportcommented, Mar 22, 2018

Option 5) The same as option 3 but the default min/max is none

3reactions
mtraynhamcommented, Apr 5, 2018

Alright @CaerusKaru, I have my app back in it’s original state… For some reason fxLayout="column" and a child of fxFlex, which as you’ve suggested gives it flex-basis of auto didn’t fill the parent for me. I also tried fxFlex="0%" on those children and that worked for Chrome, but not Firefox. I instead left my code as is with simple fxFlex and used the following scss to correct it (which goes back to the original hack). This seems to work for Chrome/Firefox/Safari, but I haven’t tried IE.

*[fxlayout='column'] > *[fxFlex] {
    flex-basis: 0.000000001px !important;
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Understanding fxFlex API in Angular flex layout
In this tutorial we will learn how to use fxFlex API in Angular flex ... In CSS, the flex-basis property specifies the initial...
Read more >
Why is Angular Flex Layout defaulting to small window view?
The expected behaviour is for all 3 to appear on the same row for all windows except for mobile view, where it will...
Read more >
How To Use Flex Layout for Angular - DigitalOcean
This code will set breakpoints at xs (extra small) screen sizes. It will change the layout from the default "row" to "column" and...
Read more >
Angular Flex Layout: The Masquerade | by Aleix Suau - Medium
We can change this default order with the 'order' property of the items: ... the style sheet anymore to understand the responsive behavior...
Read more >
Untitled
Roteiro de viagem america do sul, 4 pics 1 word television box, Theater newport, ... Jabberwock bravely default, Iobit uninstaller portable 2.1?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found