Biete Bildausschnitt und Zoom für Bilder und Videos in Widgets an (ADR-70)
Redaktionelle Karten erhalten je Karte Fokus und Zoom, Einstieg, Bild und Text sowie Premium-Karten zusätzlich einen Zoom (100 bis 250 Prozent, darunter entstünden leere Ränder). Die Darstellung ist reines CSS um den Fokuspunkt; Video und Clip folgen dem Ausschnitt. Die Regler zeigen beim Laden die Vorgabe statt 0 (FramingSlider). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7f9534d289
commit
9353e2e38a
29 files changed
+641
-40
No files matched your search
@@ -294,3 +294,29 @@ @media (prefers-reduced-motion: reduce) {
|
||||
.lf-hero__button { transition: none; }
|
||||
.lf-hero__button:hover { transform: none; }
|
||||
}
|
||||
|
||||
/*
|
||||
* Zoom (ADR-70): Foto und Video liegen in einem Rahmen, der den vergrößerten Ausschnitt abschneidet. Vergrößert wird um den
|
||||
* Fokuspunkt, ab 100 % füllt das Bild den Rahmen, es entstehen keine Ränder. Ohne Zoom gibt es den Rahmen nicht.
|
||||
*/
|
||||
.lf-hero__frame {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
z-index: -2;
|
||||
overflow: hidden;
|
||||
border-radius: inherit;
|
||||
}
|
||||
|
||||
.lf-hero__frame > .lf-hero__photo,
|
||||
.lf-hero__frame > .lf-hero__video {
|
||||
z-index: auto;
|
||||
border-radius: 0;
|
||||
transform-origin: var(--lf-hero-focus-x) var(--lf-hero-focus-y);
|
||||
scale: var(--lf-hero-zoom, 1);
|
||||
}
|
||||
|
||||
@container lf-hero (max-width: 859.99px) {
|
||||
.lf-hero__frame { position: relative; inset: auto; display: block; aspect-ratio: 16 / 9; }
|
||||
.lf-hero__frame > .lf-hero__photo,
|
||||
.lf-hero__frame > .lf-hero__video { position: absolute; inset: 0; block-size: 100%; aspect-ratio: auto; }
|
||||
}
|
||||
Reference in new issue
Block a user