Files
NebulaBrowser/renderer/performance.css
T
andrew fbd9ba8a1b Add GPU error handling and performance optimizations
Introduces a comprehensive GPU configuration and fallback system to resolve GPU process launch failures (Error 18), including new modules for GPU management and performance monitoring. Adds a GPU diagnostics HTML page, optimized CSS for rendering, and a diagnostic startup script. Updates main and preload scripts for improved stability, async file operations, and enhanced API exposure. Site history and bookmarks handling are optimized for performance and reliability.
2025-07-26 14:38:05 +12:00

73 lines
1.7 KiB
CSS

/* Performance optimizations for renderer CSS - GPU Error 18 compatible */
/* Conservative hardware acceleration for animations */
.tab, .bookmark, .icon-item {
/* Only enable will-change when actually needed */
transform: translateZ(0);
}
.tab:hover, .bookmark:hover, .icon-item:hover {
will-change: transform;
}
.tab:not(:hover), .bookmark:not(:hover), .icon-item:not(:hover) {
will-change: auto;
}
/* Optimize scrolling - more conservative approach */
#webviews, #bookmarkList, #iconGrid {
-webkit-overflow-scrolling: touch;
/* Use layout containment only, avoid paint containment which can cause GPU issues */
contain: layout style;
}
/* Use CSS containment for better performance - conservative approach */
.tab-content {
contain: layout style;
}
/* Optimize transitions - reduced complexity */
.tab {
transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Reduce paint areas - more conservative transforms */
.tab:hover, .bookmark:hover {
transform: scale(1.01); /* Reduced scale to minimize GPU load */
}
/* Use efficient selectors */
.material-symbols-outlined {
font-display: swap;
}
/* Optimize text rendering - conservative settings */
body {
text-rendering: optimizeSpeed;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* Conditional subpixel rendering for retina displays */
@media (-webkit-min-device-pixel-ratio: 2) {
body {
-webkit-font-smoothing: subpixel-antialiased;
}
}
/* Additional GPU-safe optimizations */
* {
/* Prevent unnecessary repaints */
backface-visibility: hidden;
}
/* Safe animation performance */
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.fade-in {
animation: fadeIn 0.3s ease-in-out;
}