a6ee115908
- Remove separate mobile image (was causing file bloat and complexity) - Use desktop.webp (716 KB) for all screen sizes via media query - Browser's background-size: cover handles responsive display - Simplify preload-images.html to single image preload - Cleaner CSS without unnecessary file duplication
35 lines
1.1 KiB
CSS
35 lines
1.1 KiB
CSS
/* Adaptive Background Images for Mobile and Desktop */
|
|
|
|
/* Mobile devices (max-width: 736px) - Use desktop.webp (same as desktop for consistency) */
|
|
@media screen and (max-width: 736px) {
|
|
#wrapper > .bg {
|
|
background-image: url('../../images/overlay.png'),
|
|
linear-gradient(0deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)),
|
|
url('../../images/desktop.webp') !important;
|
|
background-size: cover;
|
|
background-position: center;
|
|
background-attachment: fixed;
|
|
}
|
|
}
|
|
|
|
/* Tablet and larger (min-width: 737px) - Use desktop.webp (already set in main.scss) */
|
|
@media screen and (min-width: 737px) {
|
|
#wrapper > .bg {
|
|
background-image: url('../../images/overlay.png'),
|
|
linear-gradient(0deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)),
|
|
url('../../images/desktop.webp') !important;
|
|
background-size: cover;
|
|
background-position: center;
|
|
background-attachment: fixed;
|
|
}
|
|
}
|
|
|
|
/* High DPI displays optimization */
|
|
@media
|
|
(-webkit-min-device-pixel-ratio: 2),
|
|
(min-resolution: 192dpi) {
|
|
#wrapper > .bg {
|
|
background-size: cover;
|
|
}
|
|
}
|