Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

Unexpected behaviour: offset is always horizontal #328

Closed
sasensi opened this issue Jun 24, 2017 · 3 comments · Fixed by #369
Closed

Unexpected behaviour: offset is always horizontal #328

sasensi opened this issue Jun 24, 2017 · 3 comments · Fixed by #369
Assignees
Labels
bug has pr A PR has been created to address this issue P3 Important issue that needs to be resolved
Milestone

Comments

@sasensi
Copy link

sasensi commented Jun 24, 2017

Hi,
I found an unexpected behaviour when you set fxFlexOffset in a fxLayout="column" child, it result in a margin-left added; instead of a margin-top which is what I was expecting.

Demo here: https://plnkr.co/edit/PDOtQk?p=preview

Is it on purpose or a bug ? Thanks in advance.

@ThomasBurleson ThomasBurleson added bug P3 Important issue that needs to be resolved labels Jul 11, 2017
@ThomasBurleson ThomasBurleson added this to the v2.0.0-beta.9 milestone Jul 11, 2017
@ThomasBurleson
Copy link
Contributor

@sasensi - This is a bug and will be addressed/fixe before Beta.9. Thank you.

@ThomasBurleson ThomasBurleson self-assigned this Jul 11, 2017
ThomasBurleson added a commit that referenced this issue Aug 7, 2017
`fxFlexOffset` assigns inline `margin-left` style for flow directions == 'row' [default].

If the parent flow direction == 'column', then a `margin-top` should be used. Subscriptions
to an optional parent element LayoutDirective will trigger the fxFlexOffset to update the inline
styles to match the current flow direction.

Fixes #328.
ThomasBurleson added a commit that referenced this issue Aug 7, 2017
`fxFlexOffset` assigns inline `margin-left` style for flow directions == 'row' [default].

If the parent flow direction == 'column', then a `margin-top` should be used. Subscriptions
to an optional parent element LayoutDirective will trigger the fxFlexOffset to update the inline
styles to match the current flow direction.

> Note: if `fxFlexOffset` is used with a parent flexbox styling, then a `display:flex; flex-direction:row;`
will be auto assigned to the fxFlexOffset host element's parent.

Fixes #328.
ThomasBurleson added a commit that referenced this issue Aug 7, 2017
`fxFlexOffset` assigns inline `margin-left` style for flow directions == 'row' [default].

If the parent flow direction == 'column', then a `margin-top` should be used. Subscriptions
to an optional parent element LayoutDirective will trigger the fxFlexOffset to update the inline
styles to match the current flow direction.

> Note: if `fxFlexOffset` is used with a parent flexbox styling, then a `display:flex; flex-direction:row;` will be auto assigned to the fxFlexOffset host element's parent.

Fixes #328.
ThomasBurleson added a commit that referenced this issue Aug 7, 2017
`fxFlexOffset` assigns inline `margin-left` style; assuming default flow directions == 'row'. If the parent flow direction == 'column', then a `margin-top` should be used.

Also added a subscription to an optional parent element LayoutDirective; which will trigger the FlexOffsetDirective to update the inline styles to match the current flow direction.

> Note: if `fxFlexOffset` is used with a parent flexbox styling, then a `display:flex; flex-direction:row;` will be auto assigned to the fxFlexOffset host element's parent.

Fixes #328.
ThomasBurleson added a commit that referenced this issue Aug 7, 2017
`fxFlexOffset` assigns inline `margin-left` style; assuming default flow directions == 'row'. If the parent flow direction == 'column', then a `margin-top` should be used.

Also added a subscription to an optional parent element LayoutDirective; which will trigger the FlexOffsetDirective to update the inline styles to match the current flow direction.

> Note: if `fxFlexOffset` is used **without**  a parent flexbox styling (set via css or directive), then a `display:flex; flex-direction:row;` will be auto assigned to the fxFlexOffset host element's parent.

Fixes #328.
@ThomasBurleson ThomasBurleson added the has pr A PR has been created to address this issue label Aug 7, 2017
ThomasBurleson added a commit that referenced this issue Aug 8, 2017
`fxFlexOffset` assigns inline `margin-left` style; assuming default flow directions == 'row'. If the parent flow direction == 'column', then a `margin-top` should be used.

Also added a subscription to an optional parent element LayoutDirective; which will trigger the FlexOffsetDirective to update the inline styles to match the current flow direction.

> Note: if `fxFlexOffset` is used **without**  a parent flexbox styling (set via css or directive), then a `display:flex; flex-direction:row;` will be auto assigned to the fxFlexOffset host element's parent.

Fixes #328.
ThomasBurleson added a commit that referenced this issue Aug 8, 2017
`fxFlexOffset` assigns inline `margin-left` style; assuming default flow directions == 'row'. If the parent flow direction == 'column', then a `margin-top` should be used.

Also added a subscription to an optional parent element LayoutDirective; which will trigger the FlexOffsetDirective to update the inline styles to match the current flow direction.

> Note: if `fxFlexOffset` is used **without**  a parent flexbox styling (set via css or directive), then a `display:flex; flex-direction:row;` will be auto assigned to the fxFlexOffset host element's parent.

Fixes #328.
mmalerba pushed a commit that referenced this issue Aug 9, 2017
`fxFlexOffset` assigns inline `margin-left` style; assuming default flow directions == 'row'. If the parent flow direction == 'column', then a `margin-top` should be used.

Also added a subscription to an optional parent element LayoutDirective; which will trigger the FlexOffsetDirective to update the inline styles to match the current flow direction.

> Note: if `fxFlexOffset` is used **without**  a parent flexbox styling (set via css or directive), then a `display:flex; flex-direction:row;` will be auto assigned to the fxFlexOffset host element's parent.

Fixes #328.
@yobryon
Copy link

yobryon commented Aug 23, 2017

With this changed, is there any elegant way of getting the margin-left behavior in a column-oriented layout other than resorting to style="margin-left: #px"?

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug has pr A PR has been created to address this issue P3 Important issue that needs to be resolved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants