Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove child elements direction dependency from parent element #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ayan-bloomscorp
Copy link
Contributor

No description provided.

@synopss
Copy link
Owner

synopss commented Jan 28, 2024

This time, tests are not breaking, but I can confirm that your solution doesn't comply with what Flex-Layout is currently doing :

https://github.com/angular/flex-layout/blob/90761cafdfc16ba69992ae32f55e2f9a5d0b2bc2/projects/libs/flex-layout/flex/layout-align/layout-align.ts#L90

return extendObject(css, {
      'display' : parent.inline ? 'inline-flex' : 'flex',
      'flex-direction' : parent.layout,
      'box-sizing' : 'border-box',
      'max-width': crossAxis === 'stretch' ?
        !isFlowHorizontal(parent.layout) ? '100%' : null : null,
      'max-height': crossAxis === 'stretch' ?
        isFlowHorizontal(parent.layout) ? '100%' : null : null,
    }) as StyleDefinition;

Nevertheless #5 is valid, not the way to fix it.
Adding a test case will be interesting as well.

@ayan-bloomscorp
Copy link
Contributor Author

I need to check the fx-Layout codebase. I will get back on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants