fix(frontend): restore banner carousel visible height
Global border-box collapsed the banner's height:0 + padding-bottom aspect box to zero, so slides rendered but took no space. Prefer aspect-ratio (with content-box fallback) and make .new-swiper honor data-swiper-config so autoplay/loop/navigation from templates apply.
This commit is contained in:
@@ -175,9 +175,20 @@
|
||||
--scale-height: 40%;
|
||||
--pc-height: 100%;
|
||||
--m-height: 100%;
|
||||
padding-bottom: var(--scale-height);
|
||||
width: 100%;
|
||||
height: 0;
|
||||
height: auto;
|
||||
/* Prefer aspect-ratio so global border-box cannot collapse the box. */
|
||||
aspect-ratio: 5 / 2;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
@supports not (aspect-ratio: 1 / 1) {
|
||||
.scale-height {
|
||||
height: 0;
|
||||
padding-bottom: var(--scale-height);
|
||||
box-sizing: content-box;
|
||||
aspect-ratio: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.scale-height .swiper-wrapper,
|
||||
|
||||
Reference in New Issue
Block a user