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

inline 类型的 form Item 的最后一项 是否需要清除 margin-right #46943

Closed
Plutoron opened this issue Jan 12, 2024 · 5 comments
Closed

Comments

@Plutoron
Copy link

What problem does this feature solve?

现在默认inline 类型的 表单项都有 margin-right, 布局的时候,最后一项会会多一部分margin,右侧布局的话会导致多余间距

What does the proposed API look like?

添加 inline 类型 style添加last-child判断

@MadCcc
Copy link
Member

MadCcc commented Jan 12, 2024

给个复现例子看看?

@MadCcc MadCcc added the 🤔 Need Reproduce We cannot reproduce your problem label Jan 12, 2024
Copy link
Contributor

Hello @Plutoron. Please provide a online reproduction by forking codesandbox of antd@5.x or antd@4.x, or provide a minimal GitHub repository. Issues labeled by Need Reproduce will be closed if no activities in 3 days.

你好 @Plutoron,我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击这里创建一个 antd@5.xantd@4.x 的 codesandbox,或者提供一个最小化的 GitHub 仓库。3 天内未跟进此 issue 将会被自动关闭。

什么是最小化重现,为什么这是必需的?

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 16, 2024
@Wxh16144
Copy link
Member

给个复现例子看看?

image

感觉确实可以优化一下 🤔,来个 PR

@Wxh16144
Copy link
Member

之前 Tags 做过一些剥离工作,由于会 break change,所以回滚了。

#47504 (comment)

Form inline 如果要做清理,也需要慎重一些。

这么看来却是会有一定风险啊🤔

@Wxh16144
Copy link
Member

避免和 #47504 (comment) 一样产生 break change ,所以这个问题先不修复。 可以自行用 css 进行覆盖。

将下列 css 样式贴在全局进行覆盖~

/* https://github.com/ant-design/ant-design/issues/46943 */
form[class*="form-inline"] div[class*="form-item"]:last-of-type {
  margin-inline-end: 0;
}

@Wxh16144 Wxh16144 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants