mirror of
https://github.com/element-plus/element-plus.git
synced 2025-01-24 11:05:17 +08:00
refactor(empty): migrate css var (#2644)
This commit is contained in:
parent
741fd86f1d
commit
e3bf8ad3b3
@ -662,10 +662,8 @@ $--form-label-font-size: map.get($--font-size, 'base') !default;
|
||||
|
||||
/* Empty
|
||||
-------------------------- */
|
||||
$--empty-padding: 40px 0 !default;
|
||||
$--empty-image-width: 160px !default;
|
||||
$--empty-description-margin-top: 20px !default;
|
||||
$--empty-bottom-margin-top: 20px !default;
|
||||
// refactor with css3 var
|
||||
// See packages/theme-chalk/src/empty.scss
|
||||
|
||||
/* Descriptions
|
||||
-------------------------- */
|
||||
|
@ -1,6 +1,13 @@
|
||||
@import 'mixins/mixins';
|
||||
@import 'common/var';
|
||||
|
||||
:root {
|
||||
--el-empty-padding: 40px 0;
|
||||
--el-empty-image-width: 160px;
|
||||
--el-empty-description-margin-top: 20px;
|
||||
--el-empty-bottom-margin-top: 20px;
|
||||
}
|
||||
|
||||
@include b(empty) {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
@ -8,10 +15,10 @@
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
padding: $--empty-padding;
|
||||
padding: var(--el-empty-padding);
|
||||
|
||||
@include e(image) {
|
||||
width: $--empty-image-width;
|
||||
width: var(--el-empty-image-width);
|
||||
|
||||
img {
|
||||
user-select: none;
|
||||
@ -30,16 +37,16 @@
|
||||
}
|
||||
|
||||
@include e(description) {
|
||||
margin-top: $--empty-description-margin-top;
|
||||
margin-top: var(--el-empty-description-margin-top);
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
font-size: var(--el-font-size-base);
|
||||
color: $--color-text-secondary;
|
||||
color: var(--el-color-text-secondary);
|
||||
}
|
||||
}
|
||||
|
||||
@include e(bottom) {
|
||||
margin-top: $--empty-bottom-margin-top;
|
||||
margin-top: var(--el-empty-bottom-margin-top);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user