-
Notifications
You must be signed in to change notification settings - Fork 772
feat(breakpoints): only apply flex properties if a breakpoint is activated #296
Comments
BTW happy to submit a PR if maintainers agree with the request and we can agree on a design, but I'm guessing this would require significant internal changes. |
@jeffbcross - When using the flex-layout API, if you use responsive directives WITHOUT default flex-layout directives, then those defaults are injected as needed. So - in your scenario above - the following is what is actually happening: <div fxLayout="row"
fxLayoutAlign="start start"
fxLayoutGap="0px"
fxLayout.gt-xs="row"
fxLayoutAlign.gt-xs="center"
fxLayoutGap.gt-xs="25px">
<div fxFlex
fxFlex.gt-xs="500px"
class="victor"></div>
</div> Now if you have CSS define for Closing as non-issue. |
@jeffbcross - The current architecture assumption is that any responsive API usage also implies that the host element will have default (non-responsive) flexbox settings auto-applied . Under what scenarios would you want the container
|
@ThomasBurleson I think this should be considered, i mean, if you use Even more for those(like me) who use this API since material 1, when you would only get what you declared in your HTML. |
@matheusdavidson - Help me understand this one... if you use a |
For other people seeing this, the workaround for now, at least for |
@ThomasBurleson, i think the best thing to do is not have a default at all. Apply the style only in the breakpoint specified. If one wants a default value, its easy, just use without any breakpoint(fxFlex). For example, if i want to use I think is much better this way:
<div fxFlex.xs></div>
<div fxLayout.xs></div>
<div fxFlex fxFlex.xs="none"></div>
<div fxLayout="row" fxLayout.xs="column"></div> |
@matheusdavidson - if |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
(opening issue per @ThomasBurleson suggestion in #201)
My comment:
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 :)
The text was updated successfully, but these errors were encountered: