mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 04:20:12 +02:00
fix performance issue related to blurred library header
This commit is contained in:
@@ -6,6 +6,8 @@
|
|||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
background-image: var(--theme-overlay-subheader);
|
background-image: var(--theme-overlay-subheader);
|
||||||
|
transform: translate3d(0, 0, 0);
|
||||||
|
backface-visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.background-overlay {
|
.background-overlay {
|
||||||
@@ -30,6 +32,18 @@
|
|||||||
var(--dither);
|
var(--dither);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.background-image-stack {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 0;
|
||||||
|
width: 100%;
|
||||||
|
pointer-events: none;
|
||||||
|
isolation: isolate;
|
||||||
|
transform: translate3d(0, 0, 0);
|
||||||
|
backface-visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.background-image {
|
.background-image {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -37,6 +51,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
background-position: center !important;
|
background-position: center !important;
|
||||||
background-size: cover !important;
|
background-size: cover !important;
|
||||||
|
isolation: isolate;
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ export const LibraryBackgroundImage = ({ blur, headerRef, imageUrl }: LibraryBac
|
|||||||
const url = imageUrl ? `url(${imageUrl})` : undefined;
|
const url = imageUrl ? `url(${imageUrl})` : undefined;
|
||||||
const height = useHeaderHeight(headerRef);
|
const height = useHeaderHeight(headerRef);
|
||||||
return (
|
return (
|
||||||
<>
|
<div className={styles.backgroundImageStack}>
|
||||||
<div
|
<div
|
||||||
className={styles.backgroundImage}
|
className={styles.backgroundImage}
|
||||||
style={{
|
style={{
|
||||||
@@ -91,7 +91,7 @@ export const LibraryBackgroundImage = ({ blur, headerRef, imageUrl }: LibraryBac
|
|||||||
height: height ? `${height + 64}px` : undefined,
|
height: height ? `${height + 64}px` : undefined,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user