287 lines
5.4 KiB
CSS
287 lines
5.4 KiB
CSS
/**
|
|
* MYP Platform - CSS Caching-Optimierungen für Raspberry Pi
|
|
* Performance-optimierte Styles ohne GPU-intensive Effekte
|
|
*/
|
|
|
|
/* ===== KRITISCHE ABOVE-THE-FOLD STYLES - RASPBERRY PI OPTIMIERT ===== */
|
|
/* Diese Styles sollten inline im HTML-Head geladen werden */
|
|
.critical-header {
|
|
background: rgba(255, 255, 255, 0.98);
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 1000;
|
|
/* Entfernt: backdrop-filter, box-shadow */
|
|
}
|
|
|
|
.critical-nav {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 1rem;
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.critical-logo {
|
|
font-weight: 700;
|
|
font-size: 1.25rem;
|
|
color: #0073ce;
|
|
}
|
|
|
|
.critical-main {
|
|
min-height: 100vh;
|
|
background: #fafbfc;
|
|
/* Entfernt: gradient für bessere Performance */
|
|
}
|
|
|
|
/* ===== LAZY LOADING PLACEHOLDER - VEREINFACHT ===== */
|
|
.lazy-placeholder {
|
|
background: #f0f0f0;
|
|
border-radius: 4px;
|
|
/* Entfernt: gradient und animation */
|
|
}
|
|
|
|
.dark .lazy-placeholder {
|
|
background: #374151;
|
|
/* Entfernt: gradient und animation */
|
|
}
|
|
|
|
/* ===== PRELOAD HINTS ===== */
|
|
.preload-image {
|
|
content-visibility: auto;
|
|
contain-intrinsic-size: 300px 200px;
|
|
}
|
|
|
|
.preload-component {
|
|
content-visibility: auto;
|
|
contain-intrinsic-size: 100px;
|
|
}
|
|
|
|
/* ===== CACHE-OPTIMIERTE KOMPONENTEN - RASPBERRY PI OPTIMIERT ===== */
|
|
.cache-card {
|
|
background: rgba(255, 255, 255, 0.98);
|
|
border: 1px solid rgba(229, 231, 235, 0.5);
|
|
border-radius: 8px;
|
|
padding: 1rem;
|
|
margin-bottom: 1rem;
|
|
contain: layout style;
|
|
/* Entfernt: transition, hover-transform, paint containment */
|
|
}
|
|
|
|
.cache-button {
|
|
background: #0073ce;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 6px;
|
|
padding: 0.5rem 1rem;
|
|
font-weight: 600;
|
|
contain: layout style;
|
|
/* Entfernt: transition */
|
|
}
|
|
|
|
.cache-button:hover {
|
|
background: #005a9f;
|
|
}
|
|
|
|
.cache-input {
|
|
background: rgba(255, 255, 255, 0.98);
|
|
border: 1px solid rgba(229, 231, 235, 0.8);
|
|
border-radius: 4px;
|
|
padding: 0.5rem;
|
|
contain: layout style;
|
|
/* Entfernt: transition, box-shadow */
|
|
}
|
|
|
|
.cache-input:focus {
|
|
outline: none;
|
|
border-color: #0073ce;
|
|
/* Entfernt: box-shadow */
|
|
}
|
|
|
|
/* ===== LAYOUT SHIFT PREVENTION ===== */
|
|
.prevent-cls {
|
|
min-height: 200px;
|
|
contain: layout;
|
|
}
|
|
|
|
.image-container {
|
|
aspect-ratio: 16/9;
|
|
overflow: hidden;
|
|
border-radius: 8px;
|
|
background: #f3f4f6;
|
|
}
|
|
|
|
.image-container img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
/* Entfernt: transition */
|
|
}
|
|
|
|
.image-container img[loading="lazy"] {
|
|
opacity: 0;
|
|
}
|
|
|
|
.image-container img[loading="lazy"].loaded {
|
|
opacity: 1;
|
|
}
|
|
|
|
/* ===== OPTIMIERTE TYPOGRAPHY ===== */
|
|
.text-heading {
|
|
font-weight: 700;
|
|
line-height: 1.2;
|
|
color: #111827;
|
|
contain: layout style;
|
|
}
|
|
|
|
.text-body {
|
|
line-height: 1.6;
|
|
color: #374151;
|
|
contain: layout style;
|
|
}
|
|
|
|
.text-muted {
|
|
color: #6b7280;
|
|
contain: layout style;
|
|
}
|
|
|
|
/* ===== DARK MODE CACHE OPTIMIZATIONS - VEREINFACHT ===== */
|
|
.dark .cache-card {
|
|
background: rgba(30, 41, 59, 0.98);
|
|
border-color: rgba(100, 116, 139, 0.3);
|
|
}
|
|
|
|
.dark .cache-input {
|
|
background: rgba(30, 41, 59, 0.98);
|
|
border-color: rgba(100, 116, 139, 0.5);
|
|
color: #e2e8f0;
|
|
}
|
|
|
|
.dark .text-heading {
|
|
color: #f8fafc;
|
|
}
|
|
|
|
.dark .text-body {
|
|
color: #e2e8f0;
|
|
}
|
|
|
|
.dark .text-muted {
|
|
color: #94a3b8;
|
|
}
|
|
|
|
.dark .image-container {
|
|
background: #374151;
|
|
}
|
|
|
|
/* ===== RESPONSIVE OPTIMIZATIONS ===== */
|
|
@media (max-width: 768px) {
|
|
.critical-nav {
|
|
padding: 0.75rem;
|
|
}
|
|
|
|
.cache-card {
|
|
padding: 0.75rem;
|
|
margin-bottom: 0.75rem;
|
|
}
|
|
|
|
.cache-button {
|
|
padding: 0.75rem 1.25rem;
|
|
font-size: 0.875rem;
|
|
}
|
|
}
|
|
|
|
/* ===== PRINT OPTIMIZATIONS ===== */
|
|
@media print {
|
|
.critical-header,
|
|
.cache-button {
|
|
display: none;
|
|
}
|
|
|
|
.cache-card {
|
|
border: 1px solid #000;
|
|
break-inside: avoid;
|
|
}
|
|
}
|
|
|
|
/* ===== ALLE GPU ACCELERATION ENTFERNT ===== */
|
|
/* GPU-Beschleunigung ist auf Raspberry Pi problematisch */
|
|
|
|
/* ===== NUR FADE-IN OHNE TRANSFORM ===== */
|
|
.fade-in-optimized {
|
|
opacity: 0;
|
|
/* Entfernt: transform und alle transform-Animationen */
|
|
}
|
|
|
|
.fade-in-optimized.visible {
|
|
opacity: 1;
|
|
/* Nur opacity change */
|
|
}
|
|
|
|
/* ===== CONTAINER QUERIES SUPPORT ===== */
|
|
@container (min-width: 300px) {
|
|
.cache-card {
|
|
display: grid;
|
|
grid-template-columns: 1fr auto;
|
|
gap: 1rem;
|
|
align-items: center;
|
|
}
|
|
}
|
|
|
|
/* ===== CONTENT VISIBILITY OPTIMIZATIONS ===== */
|
|
.auto-height {
|
|
content-visibility: auto;
|
|
contain-intrinsic-size: 0 200px;
|
|
}
|
|
|
|
.hidden-content {
|
|
content-visibility: hidden;
|
|
}
|
|
|
|
/* ===== REDUCED MOTION PREFERENCES - ERWEITERT ===== */
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.fade-in-optimized,
|
|
.cache-card,
|
|
.cache-button,
|
|
.cache-input {
|
|
transition: none !important;
|
|
transform: none !important;
|
|
animation: none !important;
|
|
}
|
|
|
|
.lazy-placeholder {
|
|
animation: none !important;
|
|
background: #f0f0f0 !important;
|
|
}
|
|
}
|
|
|
|
/* ===== HIGH CONTRAST MODE ===== */
|
|
@media (prefers-contrast: high) {
|
|
.cache-card {
|
|
border-width: 2px;
|
|
border-color: #000;
|
|
}
|
|
|
|
.cache-button {
|
|
border: 2px solid #000;
|
|
}
|
|
|
|
.cache-input {
|
|
border-width: 2px;
|
|
border-color: #000;
|
|
}
|
|
}
|
|
|
|
/* ===== RASPBERRY PI SPECIFIC OPTIMIERUNGEN ===== */
|
|
.raspberry-pi-optimized {
|
|
/* Minimale CSS Properties */
|
|
/* Keine will-change */
|
|
/* Keine Transforms */
|
|
/* Keine Shadows */
|
|
/* Nur opacity und color Transitions */
|
|
transition: opacity 0.2s ease, color 0.2s ease, background-color 0.2s ease;
|
|
}
|
|
|
|
.performance-critical {
|
|
/* Für kritische Bereiche */
|
|
contain: layout style;
|
|
/* Keine paint containment */
|
|
} |