Created
November 15, 2023 09:46
-
-
Save Mix-Liten/157f918c4ae18149010c5f78997b8b48 to your computer and use it in GitHub Desktop.
reset <img> style
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* old way */ | |
img { | |
display: block; | |
max-width: 100%; | |
} | |
/* new way */ | |
img { | |
max-width: 100%; | |
height: auto; | |
vertical-align: middle; | |
font-style: italic; /* for alt */ | |
background-repeat: no-repeat; | |
background-size: cover; | |
shape-margin: 0.75rem; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment