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

new directive fxLayoutGutter #1100

@4val0v

Description

@4val0v

Proposal

What is the summary of the proposal?

<md-card-content>
  <div fxLayout="row wrap" fxLayoutGap="24px">
    <md-input-container fxFlex="25%">
      <input mdInput placeholder="Name">
    </md-input-container>
    <md-input-container fxFlex="25%">
      <input mdInput placeholder="Occupation">
    </md-input-container>
    <md-input-container fxFlex="50%">
      <input mdInput placeholder="Company">
    </md-input-container>
  </div>
</md-card-content>

fxLayoutGap adds this style:

margin-right: 24px;

In this case there will be a transition to a new line, but I would not like
Using css calc is not convenient fxFlex="calc(50% - 24px)"

What is the proposal?

Create new directive fxLayoutGutter or update fxLayoutGap
If set to fxLayoutGutter="24px" apply a style padding:

padding-left: 12px;
padding-right: 12px;

We divide the value of fxLayoutGutter / 2 and insert padding in the style

Is there anything else we should know?

This implementation is in ng-zorro grid

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionFurther discussion with the team is needed before proceeding

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions