Closed qjebbs closed 1 year ago
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
This PR fixes #733
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
The PR does two aspect of works:
remove unwanted padding for scaled down images
Large images (
.single .content img
) will be scaled down according to the stylemax-width: 100%
.For example, when a
1400*1400px
image is scaled to700px
, the height is still1400px
according to the element property ofheight=1400
, which leaves unwanted huge padding on the top & bottom of the image.The PR tries to add
height: auto;
to fix it.don't push well positioned anchors
With the
height: auto;
style, the height of the image is not fixed after the execution oflazysizes
library, which pushes well positioned anchors up or down right after the page is loaded & scrolled.The problem is caused by
lazysizes
lib, but we don't need it in most cases while we writing code like![](example.png)
.To avoid the problem, the PR choose to not activate
lazysizes
if we don't have multiple images for responsive usage.