mirror of
https://github.com/prymitive/karma
synced 2026-05-09 03:36:44 +00:00
feat(ui): speed up animations with translateZ and translate3d
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
.components-animation-slide {
|
||||
will-change: opacity, height;
|
||||
transform: translateZ(0);
|
||||
}
|
||||
|
||||
.components-animation-slide-enter,
|
||||
.components-animation-slide-appear {
|
||||
opacity: 0.25;
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
.components-animation-fade {
|
||||
will-change: opacity;
|
||||
transform: translateZ(0);
|
||||
}
|
||||
|
||||
.components-animation-fade-appear {
|
||||
opacity: 0.01;
|
||||
}
|
||||
.components-animation-fade-appear-active {
|
||||
opacity: 1;
|
||||
transition: all 0.3s ease-in;
|
||||
transition: opacity 0.3s ease-in;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,11 @@
|
||||
|
||||
$duration: 0.2s;
|
||||
|
||||
.components-animation-modal {
|
||||
will-change: opacity, transform;
|
||||
transform: translateZ(0);
|
||||
}
|
||||
|
||||
.components-animation-modal-appear,
|
||||
.components-animation-modal-enter {
|
||||
opacity: 0.01;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
.components-animation-navbar {
|
||||
will-change: opacity;
|
||||
transform: translateZ(0);
|
||||
}
|
||||
|
||||
.components-animation-navbar-appear,
|
||||
.components-animation-navbar-enter {
|
||||
opacity: 0.01;
|
||||
|
||||
@@ -195,8 +195,11 @@ const AlertGroup = observer(
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="components-grid-alertgrid-alertgroup p-1" style={style}>
|
||||
<MountFade in={true}>
|
||||
<MountFade in={true}>
|
||||
<div
|
||||
className="components-grid-alertgrid-alertgroup p-1"
|
||||
style={style}
|
||||
>
|
||||
<div className={`card ${cardBackgroundClass}`}>
|
||||
<GroupHeader
|
||||
collapseStore={this.collapse}
|
||||
@@ -258,8 +261,8 @@ const AlertGroup = observer(
|
||||
/>
|
||||
) : null}
|
||||
</div>
|
||||
</MountFade>
|
||||
</div>
|
||||
</div>
|
||||
</MountFade>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
.components-grid-alertgrid-alertgroup {
|
||||
transition-property: top, left;
|
||||
transition-duration: 0.3s;
|
||||
.components-grid-alertgrid-alertgroup.components-animation-fade-appear-done {
|
||||
will-change: transform;
|
||||
transform: translateZ(0);
|
||||
|
||||
transition-property: transform;
|
||||
transition-duration: 0.4s;
|
||||
transition-timing-function: ease;
|
||||
}
|
||||
|
||||
@@ -215,6 +215,7 @@ const AlertGrid = observer(
|
||||
<MasonryInfiniteScroller
|
||||
key={settingsStore.gridConfig.config.groupWidth}
|
||||
ref={this.storeMasonryRef}
|
||||
position={false}
|
||||
pack={true}
|
||||
sizes={this.viewport.gridSizesConfig}
|
||||
loadMore={this.loadMore}
|
||||
|
||||
Reference in New Issue
Block a user