Changeset 38120c7 in Klonkt


Ignore:
Timestamp:
06/30/2026 11:38:24 PM (2 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
2a58d76
Parents:
86fa2d2
Message:

fix(feed): video covers fill the square thumbnail (object-fit:cover), centered — incl. desktop

The desktop list-cover rule was .post-list-cover img (img only), so a federated <video> cover was
unstyled = rendered at its intrinsic size (e.g. 640x360), overflowing the square slot from the
top-left. Add video to that rule so it gets width/height:100% + object-fit:cover + center (fill the
square, keep aspect, crop the overflow). Reverted the earlier object-fit:contain — the ask is cover,
not letterbox. style.css buster 65 -> 66.

Co-Authored-By: Claude <noreply@…>

Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/assets/css/style.css

    r86fa2d2 r38120c7  
    19371937        color-mix(in srgb, var(--accent, #888) 6%, var(--paper-2, var(--paper))) 100%);
    19381938}
    1939 .post-list-cover img {
     1939.post-list-cover img, .post-list-cover video {
    19401940    width: 100%; height: 100%;
    1941     object-fit: cover;
     1941    object-fit: cover;                 /* fill the square, keep aspect, crop the overflow, centered */
     1942    object-position: center;
    19421943    display: block;
    19431944    background-color: #fff;            /* transparent logos sit on white once loaded */
     
    24012402.grid-tile-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; transition: opacity .4s ease; }
    24022403.grid-tile-img.is-loading { opacity: 0; }
    2403 /* A video cover keeps its own aspect ratio inside the square tile (centered, letterboxed) instead
    2404    of zoom-cropping a wide video to fill. Images stay object-fit:cover. */
    2405 video.grid-tile-img { object-fit: contain; background: var(--paper-2, #0a0e1a); }
    24062404.grid-tile:hover { transform: scale(0.98); }
    24072405.grid-tile-overlay {
  • src/views/partials/post-card.ejs

    r86fa2d2 r38120c7  
    154154  }
    155155  .post-list-cover img.is-loading { opacity: 0; }
    156   /* A video cover keeps its aspect ratio (centered, letterboxed) in the square slot, not zoom-cropped. */
    157   .post-list-cover video { object-fit: contain; background: var(--paper-2, #0a0e1a); }
    158156
    159157  /* Re-apply rounded corners on slightly larger phones */
  • src/views/shell.ejs

    r86fa2d2 r38120c7  
    216216
    217217<!-- v9 stylesheet (full palette system) -->
    218 <link rel="stylesheet" href="/assets/css/style.css?v=65">
     218<link rel="stylesheet" href="/assets/css/style.css?v=66">
    219219<script>
    220220/* iOS safe-area, built by hand. env(safe-area-inset-top) resolves to 0 on this iOS in
Note: See TracChangeset for help on using the changeset viewer.