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.

feat(breakpoints): only apply flex properties if a breakpoint is activated #296

@jeffbcross

Description

@jeffbcross

(opening issue per @ThomasBurleson suggestion in #201)

My comment:

I'd like to be able disable flex layout completely for some elements when the width is extra small. But right now, even if I use gt-xs breakpoints, flex CSS properties are being added to the elements.

<div fxLayoutAlign.gt-xs="center" fxLayout.gt-xs="row" fxLayoutGap.gt-xs="25px">
  <div fxFlex.gt-xs="500px" class="victor"></div>
</div>

The layout element has display: flex; flex-direction: row; and the "victor" element has flex: 1 1 0 0.00000001px; when the width is xs. I expected that using only gt-xs, and no defaults, would mean that the flex properties would only be applied when the screen was greater than xs.

For further context, the main motivation is for a responsive layout where I want rows to be columns (stacked) on mobile. Safari has requirement of parent column containers having a set height (not auto), or else elements start clobbering each other. I want the child elements to be display: block; height: auto;.

Thanks :)

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions