<nz-form-control> in <nz-form-item nzGutter> should generated correct padding
See original GitHub issueVersion
1.8.0
Environment
Windows 10 Chrome 70.0.3538.102(正式版本) (64 位) ng-zorro-antd@1.8.0
Reproduction link
https://stackblitz.com/edit/ng-zorro-antd-start-z14eiy?file=src%2Fapp%2Fapp.component.html
Steps to reproduce
<nz-form-item nzGutter="8">
<nz-form-control nzSpan="10">
<nz-form-text>Col 10 In Form</nz-form-text>
</nz-form-control>
</nz-form-item>
What is expected?
<nz-form-control> get correct style padding-left: 4px; padding-right: 4px, like [nz-col] in [nz-row].
What is actually happening?
<nz-form-control> has no style, but <nz-form-item> generated margin style.
Other?
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
NG-ZORRO/ng-zorro-antd (Raised $277.00) - Issuehunt
<nz-form-control> in <nz-form-item nzGutter> should generated correct padding. Funded#2479created bywheeljs. $20.00. 使用OnPush策略的组件里,nz-modal关闭后 ...
Read more >Form | NG-ZORRO - Ant Design
Used to separate the item in forms, contains label(optional) and control field. nz-form-label component #. The label of the form item, optional. nz-form-control...
Read more >Angular (forked) - StackBlitz
Created with <3 by the StackBlitz SDK! ... <div nz-row nzGutter="8">. <div nz-col nzSpan="12">. <nz-form-item> ... <nz-form-control>. <input nz-input.
Read more >CHANGELOG.md · Gitee 极速下载/ng-zorro - Gitee.com
... grid: nzGutter support string type (#6450) (ec03c7f) ... tabs: fix the pagnation padding-right when scrolling (#3539) (#3709) (9a4df38) ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hi, so I have taken a look at it, I discovered that the nz-form-control selector has no padding added, so I have added that, but then once nzSpan directive is added, the padding rule gets overwritten and then set to 0 which are the rules for nzSpan directive. So I added an extra rule to override it
is repeating the rules optimal or is there a better way I can do it?
@wendzhue alright. I’ll do it in a bit… sorry about the delay. Thanks.