mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
style(theme-chalk): [message] resolve incorrect position during transition in Firefox (#23686)
* style(theme-chalk): [message] refacter center style * style(theme-chalk): [message] refactor center style * recover style * fix compatible
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
}
|
||||
|
||||
@include b(message) {
|
||||
width: fit-content;
|
||||
width: max-content;
|
||||
max-width: calc(100% - 32px);
|
||||
box-sizing: border-box;
|
||||
border-radius: getCssVar('border-radius-base');
|
||||
@@ -35,9 +35,8 @@
|
||||
}
|
||||
|
||||
&.is-center {
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: 0 auto;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
@include when(plain) {
|
||||
@@ -105,9 +104,20 @@
|
||||
.#{$namespace}-message-fade-enter-from,
|
||||
.#{$namespace}-message-fade-leave-to {
|
||||
opacity: 0;
|
||||
transform: translateY(-100%);
|
||||
&.is-left,
|
||||
&.is-right {
|
||||
transform: translateY(-100%);
|
||||
|
||||
&.is-bottom {
|
||||
transform: translateY(100%);
|
||||
&.is-bottom {
|
||||
transform: translateY(100%);
|
||||
}
|
||||
}
|
||||
|
||||
&.is-center {
|
||||
transform: translate(-50%, -100%);
|
||||
|
||||
&.is-bottom {
|
||||
transform: translate(-50%, 100%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user