Add cover styling for petition pages

Add responsive cover image styling with object-fit and height
constraints
Adjust cover image positioning to focus on bottom of image
Update HTML class to include cover styling context
This commit is contained in:
Ruben 2026-01-17 13:35:42 +01:00
parent 199b49ef9e
commit 7151d3b933
3 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,3 @@
<section class="escape">
<section class="escape cover">
<img src="cover.jpg"/>
</section>

View file

@ -8,6 +8,11 @@ article > h4 {
color: oklch(from var(--color-grey) l c h / calc(l + 0.35));
}
main article .cover img {
object-position: center 100%; /* adjustable focus point */
}
/* Button */
.button--petition {
background-color: var(--color-green);

View file

@ -107,6 +107,11 @@ main {
padding-bottom: 2rem;
aside, form { margin-top: 1.3em }
article {
.cover img {
width: 100%;
max-height: clamp(250px, 50vh, 550px);
object-fit: cover;
}
.intro { font-size: 1.2rem; line-height: 1.35em }
.footnotes {
margin-top: 1rem;