Optimize and refine background styles for better performance
Removed unnecessary styles and adjusted z-indexing for dynamic viewport handling. Enhanced background blur effect and gradient styling to improve stability and appearance while minimizing potential rendering issues.
This commit is contained in:
@@ -764,8 +764,6 @@ export default function App() {
|
|||||||
const styles = {
|
const styles = {
|
||||||
page: {
|
page: {
|
||||||
minHeight: "100dvh",
|
minHeight: "100dvh",
|
||||||
margin: 0,
|
|
||||||
padding: 0,
|
|
||||||
background: "transparent",
|
background: "transparent",
|
||||||
position: "relative",
|
position: "relative",
|
||||||
zIndex: 1,
|
zIndex: 1,
|
||||||
@@ -1150,29 +1148,33 @@ const styles = {
|
|||||||
// ✅ Background (FIXED) — unter Content (zIndex -1) und ohne blur() Filter
|
// ✅ Background (FIXED) — unter Content (zIndex -1) und ohne blur() Filter
|
||||||
bgFixed: {
|
bgFixed: {
|
||||||
position: "fixed",
|
position: "fixed",
|
||||||
inset: 0,
|
top: 0,
|
||||||
zIndex: -1,
|
left: 0,
|
||||||
|
width: "100vw",
|
||||||
|
// iOS dynamic viewport support:
|
||||||
|
height: "100dvh",
|
||||||
|
zIndex: 0,
|
||||||
pointerEvents: "none",
|
pointerEvents: "none",
|
||||||
|
|
||||||
|
// verhindert “zucken” bei repaint:
|
||||||
|
transform: "translateZ(0)",
|
||||||
|
backfaceVisibility: "hidden",
|
||||||
|
willChange: "transform",
|
||||||
},
|
},
|
||||||
|
|
||||||
// ✅ WICHTIG: Nutze ein vorab geblurrtes Bild, sonst kriegst du wieder Nähte.
|
|
||||||
// Lege ab: /public/bg/marauders-map-blur.jpg
|
|
||||||
bgMap: {
|
bgMap: {
|
||||||
position: "absolute",
|
position: "absolute",
|
||||||
inset: 0,
|
inset: 0,
|
||||||
backgroundImage: 'url("/bg/marauders-map-blur.jpg")',
|
backgroundImage: 'url("/marauders-map.jpg")',
|
||||||
backgroundSize: "cover",
|
backgroundSize: "cover",
|
||||||
backgroundPosition: "center",
|
backgroundPosition: "center",
|
||||||
backgroundRepeat: "no-repeat",
|
backgroundRepeat: "no-repeat",
|
||||||
|
|
||||||
// KEIN blur() hier!
|
// Blur ist teuer -> aber stabilisieren:
|
||||||
filter: "saturate(0.95) contrast(1.05) brightness(0.98)",
|
filter: "blur(6px) saturate(0.95) contrast(1.05)",
|
||||||
|
transform: "scale(1.06) translateZ(0)",
|
||||||
// GPU / Seam-Fix
|
|
||||||
transform: "translate3d(0,0,0) scale(1.04)",
|
|
||||||
willChange: "transform",
|
|
||||||
backfaceVisibility: "hidden",
|
backfaceVisibility: "hidden",
|
||||||
|
willChange: "transform",
|
||||||
opacity: 0.95,
|
opacity: 0.95,
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -1181,16 +1183,19 @@ const styles = {
|
|||||||
inset: 0,
|
inset: 0,
|
||||||
background: `
|
background: `
|
||||||
radial-gradient(circle at 50% 45%,
|
radial-gradient(circle at 50% 45%,
|
||||||
rgba(0,0,0,0.10) 0%,
|
rgba(0,0,0,0.08) 0%,
|
||||||
rgba(0,0,0,0.22) 55%,
|
rgba(0,0,0,0.18) 48%,
|
||||||
rgba(0,0,0,0.55) 82%,
|
rgba(0,0,0,0.55) 78%,
|
||||||
rgba(0,0,0,0.70) 100%
|
rgba(0,0,0,0.72) 100%
|
||||||
),
|
),
|
||||||
linear-gradient(180deg,
|
linear-gradient(180deg,
|
||||||
rgba(245, 226, 185, 0.38),
|
rgba(245, 226, 185, 0.42),
|
||||||
rgba(214, 180, 120, 0.28)
|
rgba(214, 180, 120, 0.32)
|
||||||
)
|
)
|
||||||
`,
|
`,
|
||||||
mixBlendMode: "multiply",
|
mixBlendMode: "multiply",
|
||||||
|
transform: "translateZ(0)",
|
||||||
|
backfaceVisibility: "hidden",
|
||||||
},
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user