-
Notifications
You must be signed in to change notification settings - Fork 591
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(dialog): support custom padding bottom when no footer #3800
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3800 +/- ##
==========================================
- Coverage 90.59% 90.57% -0.03%
==========================================
Files 303 303
Lines 17819 17833 +14
Branches 5369 5375 +6
==========================================
+ Hits 16143 16152 +9
- Misses 1657 1661 +4
- Partials 19 20 +1
Continue to review full report at Codecov.
|
感觉会有breakchange, 如果用户就是期望不写footer 的时候内容是向下贴边的呢 你可以在 Dialog 内容区域自己做间距控制 |
@bindoon 改成向前兼容的模式了,即使用户配了不要下边距也不会影响。 之所以不在内容区域做控制,是为了整个主题能作为一个开箱即用的设计规范给开发者用。起码要让主题网站的实例能和设计稿保持一致。而主题网站是不支持自己去配置内容的,看起来就会有问题。这个主题未来是要给整个国际站用的,设计师希望这个主题能够有比较高的完成度。 |
@@ -164,6 +171,9 @@ | |||
#{$dialog-prefix}-header + #{$dialog-prefix}-body { | |||
padding: $dialog-content-padding-top $dialog-content-padding-left-right $dialog-content-padding-bottom $dialog-content-padding-left-right; | |||
} | |||
#{$dialog-prefix}-header + #{$dialog-prefix}-body-no-footer { | |||
padding: $dialog-content-padding-top $dialog-content-padding-left-right $dialog-content-padding-bottom-no-footer $dialog-content-padding-left-right; |
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.
在 body 上面加padding 似乎依然是贴边的
如果期望留着底边是不是可以 footer={[]} 把两个按钮去掉? |
没有 footer 时,给
.next-dialog-body
增加一个类.next-dialog-body-no-footer
。这个类的 padding-bottom 会使用一个新的变量$dialog-content-padding-bottom-no-footer
,可供定制。默认值和原有的$dialog-content-padding-bottom
一致,保证向前兼容。Fix #3799