fixing the cls caused by scale on images

so i have this element on this page & this selector is responsible for the element
.accomodation-single-item-more-info-facilities .accomodation-single-item-facilities-benefits figure{
scale: 2;
margin-block: 2rem;
}
.accomodation-single-item-more-info-facilities .accomodation-single-item-facilities-benefits figure{
scale: 2;
margin-block: 2rem;
}
i score 67 in lighthouse & sometimes it drops to 60 as you see in the screenshots; i don't know tho how to fix the other thing that's causing the cls to shift that bad
No description
No description
No description
No description
16 Replies
Dev_HK
Dev_HKOP6d ago
i need the image to scale tho so i need it even tho it hurts the whole thing i don't know if there's a way to optimize it or not
Kevin Powell
Kevin Powell6d ago
Are you sure the scale is the issue here?
Dev_HK
Dev_HKOP6d ago
about the menu moving to the right yes, about the cls i'm still trying to figure it our when i try to check the performance tab i get good insight i don't know if this is a false positive or not but in lighthouse it says otherwise h1 & a div that has the slider in it is the cause of the issue
No description
No description
Dev_HK
Dev_HKOP5d ago
https://web.dev/articles/optimize-cls i believe so about the menu going outside of the viewport
ἔρως
ἔρως5d ago
if you have to use scalez you are doing something VERY VERY VERY wrong
Dev_HK
Dev_HKOP5d ago
What? No only scale, unless if that's what you actually meant
ἔρως
ἔρως5d ago
what i mean is that if you need to use scale for something other than effects, then you did something wrong somewhere else
Dev_HK
Dev_HKOP5d ago
Ohh no no it's the images they're too small, and uneven I guess when adding width to it, they look weird like not the right scale I guess, they only look the same width and height when I do scale I'll send you a screenshot tomorrow, I'm tired now
ἔρως
ἔρως5d ago
this might be why
Dev_HK
Dev_HKOP5d ago
hey there good morning so
Dev_HK
Dev_HKOP5d ago
when i use this look on how the images look
No description
Dev_HK
Dev_HKOP5d ago
No description
Dev_HK
Dev_HKOP5d ago
quite even
Dev_HK
Dev_HKOP5d ago
but when i change scale:2 to let's say width:50% i get this
No description
Dev_HK
Dev_HKOP5d ago
that was the reason i used scale
ἔρως
ἔρως5d ago
remember this: scale doesn't re-layout the page and is just for presentation so, there is something wrong there also, it is complaining more about the image at the top

Did you find this page helpful?