Skip to content

Image Card as a Link Changes Image Layout #411

Open

Description

@wesleyboar

Overview

Layout of image card ([class*="card--image"]) changes if image is a link.

Steps

  <article class="c-card c-card--plain c-card--image-top">
    <h3>Card - Image top</h3>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In venenatis odio elit, faucibus blandit tellus mollis ut. Donec vel nibh at nisl fermentum sodales nec quis risus. Nullam et magna in metus vulputate fermentum a a augue.</p>
-   <img src="…">
+   <a href="…">
+     <img src="…">
+   </a>
  </article>

Expected

  • Zero visual change.
  • Image becomes a link.

Actual

  • Space is added around image.
  • Image crop changes.
  • Image becomes a link.
    • But has no hover state.

Screenshots

New Bug

Original Bug

Core-Styles

Before After
styles before styles after

Core-CMS

Before Change After
no change what cms user changes change breaks layout

Activity

  1. wesleyboar commented on Oct 31, 2024

    @wesleyboar
    MemberAuthor

    fixed by #419

  2. wesleyboar commented on Nov 1, 2024

    @wesleyboar
    MemberAuthor

    Reopened, because TACC/tup-ui#487 reveals bugs.

    Warning

    1. Crop of image can change.
    2. Outline might be cropped.
  3. changed the title [-]Image Card as a Link Breaks Image Layout[/-] [+]Image Card as a Link Changes Image Layout[/+] on Feb 20, 2025
  4. wesleyboar commented on Feb 20, 2025

    @wesleyboar
    MemberAuthor

    Warning

    Still open, because issues remain:

    • image crop changes / image is larger
    • image hover has no outline
    before after
    Image Image

    Tested on v2.39.0 via TACC/tup-ui#499.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprovements or additions to existing features

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions