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

feat(api): add new directive 'layout-gap' #4

Closed
ThomasBurleson opened this issue Nov 28, 2015 · 5 comments
Closed

feat(api): add new directive 'layout-gap' #4

ThomasBurleson opened this issue Nov 28, 2015 · 5 comments
Assignees
Labels
Milestone

Comments

@ThomasBurleson
Copy link
Contributor

The intent is to insert a gap between the immediate flex children of an element defining both the layout and layout-gap attributes. The result is a column or row of items that have an 8px gap between each item but no gap/margin applied to the final element nor to a single item.

[layout=column][layout-gap] > [flex]:not(:last-child) {
  margin-bottom: 8px;
}

[layout=row][layout-gap] > [flex]:not(:last-child) {
  margin-right: 8px;
}

References angular/material#2360

@ThomasBurleson ThomasBurleson added this to the v1.0.0-beta.2 milestone Dec 14, 2016
@ThomasBurleson ThomasBurleson self-assigned this Dec 14, 2016
@ThomasBurleson ThomasBurleson changed the title add new injector 'layout-gap' feat(api): add new directive 'layout-gap' Dec 15, 2016
@ThomasBurleson
Copy link
Contributor Author

ThomasBurleson commented Dec 17, 2016

layout-margin, and layout-padding will also be useful to easily add margin or padding values to all content children element nodes.

<div fxLayout="column" fxFill>
    <div fxLayout fxLayoutGap="17px" fxFlex >
        <div class="one" fxFlex="20" fxLayoutAlign="center center"> A </div>
        <div class="two" fxFlex="80" fxLayoutAlign="center center"> B </div>
    </div>
</div>    

@un33k
Copy link

un33k commented Mar 14, 2017

So confusing ... not sure to use fxFlexLayoutGap or fx-layout-gap as examples show both?

@ThomasBurleson
Copy link
Contributor Author

@un33k - That was a comment for alpha-releases. The @angular convention is to use camelCase notations for directive markup/selectors.

<div fxLayout="column" fxFill>
    <div fxLayout fxLayoutGap="17px" fxFlex >
        <div class="one" fxFlex="20" fxLayoutAlign="center center"> A </div>
        <div class="two" fxFlex="80" fxLayoutAlign="center center"> B </div>
    </div>
</div>    

We are unable to support changes to closed issues and comments. We will endeavor to keep our WIki and API Documentation updated.

@un33k
Copy link

un33k commented Mar 16, 2017

@ThomasBurleson clear now. thx

@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
Projects
None yet
Development

No branches or pull requests

2 participants