question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Card & Thumbs Have Different Background Size Properties

See original GitHub issue

The CSS for the cards and thumbs are diffrrent. This means that what people see in the thumb area isn’t the same as what they will see in cards.

**Card: **

.card__media {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: 50% 50%;
    background-color: var(--color-placeholder);
}

Thumb:

.thumbnail-preview {
    height: var(--thumbnail-preview-height);
    width: var(--thumbnail-preview-width);
    border: var(--thumbnail-preview-border);
}

image

image

As another option, you could take out the size and width from the thumb and get the correct aspect ratio and contained in the css max height/width set area. However, this is not how it will look as a card unless the card CSS is the same.

.thumbnail-preview {
    height: var(--thumbnail-preview-height);
    /* width: var(--thumbnail-preview-width); */
    /* border: var(--thumbnail-preview-border); */
}

image

*Took out the border for easier visualisation of this issue.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
tzarebczancommented, Aug 21, 2018

We do recommend a size and aspect ratio on the publish page.

1reaction
kauffjcommented, Aug 21, 2018

I missed this when it was originally filed. Great catch @Invariant-Change, really appreciate your eye for correctness and ability to make contributions like this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

A Deep Dive Into object-fit And background-size In CSS
In this article, we will go through how `object-fit` and `background-size` work, when we can use them, and why, along with some practical ......
Read more >
background-size - CSS: Cascading Style Sheets | MDN
The background-size CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, ...
Read more >
Perfect Full Page Background Image - CSS-Tricks
Four techniques are explored on accomplishing a full page background image that conforms to our exceptions: no white space, scales as needed ...
Read more >
How to get div height to auto-adjust to background size?
There is no way to auto adjust for background image size using CSS. You can hack around it by measuring ...
Read more >
The Ideal Cover Photo Size for Each of the Major Social Media ...
Some social media platforms display cover photos slightly different on the ... A good rule-of-thumb is to avoid having any important details in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found