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: Grid initial gutter #20762
fix: Grid initial gutter #20762
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add tests to make sure this change works as expected?
Deploy preview for ant-design ready! Built with commit 56b4041 |
like SSR situation
06fb59c
to
56b4041
Compare
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 06fb59cb8c2e1d810c02026e5cb0c67146b9c4a1:
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 56b4041:
|
Codecov Report
@@ Coverage Diff @@
## master #20762 +/- ##
=======================================
Coverage 97.46% 97.46%
=======================================
Files 296 296
Lines 6877 6877
Branches 1865 1865
=======================================
Hits 6703 6703
Misses 174 174
Continue to review full report at Codecov.
|
ssr 下应该是 0 才对,如果 xs gutter 是 0,其他非 0。在移动端就是先大又缩回去。 |
这就是要抉择了,要么小屏幕先大后小,或者大屏幕先小后大。 |
现在首页跳动有点难看。或者给一个 |
我觉得如果没有很好的方案下,不做过多干预会好些。这其实和之前 remove less loop 一样,猜一个大屏幕,但是 windows 用户其实并不一定有 Mac 的分辨率。 |
我们至少应该在开发者给的 gutter 可能的取值中(以默认或者指定的方式)取一个作为初始值(例子中的 32 或者 40): ant-design/site/theme/template/Home/DesignPage/index.tsx Lines 272 to 275 in 117495e
0 是 100% 跳动的。
|
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
解决 next.ant.design 首屏卡片 ssr 初始化时间距为 0 的问题。
📝 Changelog
gutter
在 SSR 下初始值为0
的问题。☑️ Self Check before Merge