-
Notifications
You must be signed in to change notification settings - Fork 768
flex-direction: row; box-sizing: border-box; display: flex;
added automatically
#496
Comments
This is intended behavior, here's the rationale. |
@CaerusKaru I am just experiencing a little bit of a different behaviour setting up my sticky footer with the new flex layout and Angular 4 compared to Angular 1.6 and the flexlayout version from Material Design. |
Can you try wrapping the router-outlet with a div, and setting the flex on that? |
So perhaps fxFlex should NOT presume that the parent layouts need flexbox stylings. If we disable this feature by default, we could provide a FlexLayoutModule configuration option that allows developers to override default behavior: FlexLayoutModule.forRoot({
fxFlex : {
forceParentFlex : true
}
}); Thoughts ? |
Love the added configuration, but could we wrap the config in a token instead? Same with breakpoints (but that could be a separate issue) |
@ThomasBurleson I think turning it into a feature would be great. It allows more control by the library consumers, since everyone uses a different context/approach. |
Just wanted to add another voice to those experiencing this issue. I was trying to get my child component for the router to flex in the column direction and just couldn't. I posted this issue on SO: https://stackoverflow.com/q/48451609/571237 ...and created this minimal example on Stackblitz showing the issue: https://so-48451609-routing-flex-issue.stackblitz.io/a I understand the rationale, but this seems like a flawed assumption when considering the router-outlet tag used by Angular. I am happy there's a simple work-around using btw, love the library and really appreciate the work you all do! I'm glad to have found something to move past this one quirk |
I'm with @sstorie on this one -- it seems like that's an assumption that should be off by default with the option to enable if the dev so desired. |
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. |
I am seeing
flex-direction: row; box-sizing: border-box; display: flex;
added on my component that is rendered in the router-outlet.My app.component.html looks like
The router-outlet will render a component which I give a class
fxFlex
via
so it is flexed.
However, when the components root DIV uses fxLayout column WITH an fxFlex, like
it automatically adds flex-direction row to its parent.
The rendered html will be like
This row layout on the
pro-securing
component creates the side effect that when the footer becomes large, it pushes the pro-securing into the header. It doesn't allow a scrollbar.I find this a bit strange behaviour.
I am looking for a header, content (can expand) and sticky footer. Scroll bar should automatically engage when content is larger then header+content+footer.
Any thoughts?
The text was updated successfully, but these errors were encountered: