Search code examples
cssangularflexboxangular-flex-layout

Flex Layout - What does "flex-basis: 1e-09px" mean?


When using Angular Flex Layout I have noticed that it applied flex: 0 1 1e-09px to an element.

Was just wondering what the 1e-09px means and if this is a valid value for this field or just an error.


Solution

  • According to the Github page:

    1e-09px is shorthand for 0.000000001px and I believe it's a hack for IE:

    flex-layout/src/lib/flexbox/api/flex.spec.ts

    let hasFlex = _.hasStyle(dom, 'flex', '1 1 1e-09px') || // IE