Card & Thumbs Have Different Background Size Properties
See original GitHub issueThe 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);
}
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); */
}
*Took out the border for easier visualisation of this issue.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:11 (7 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We do recommend a size and aspect ratio on the publish page.
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.