Add CSS for fluid width images

This commit is contained in:
Zach Leatherman 2024-11-15 17:09:48 -06:00
parent 287d4736bb
commit 940e69d2bf
2 changed files with 14 additions and 1 deletions

View file

@ -1,6 +1,6 @@
MIT License
Copyright (c) 20172023 Zach Leatherman @zachleat
Copyright (c) 20172024 Zach Leatherman @zachleat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View file

@ -71,6 +71,19 @@ body {
width: 1px;
}
/* Fluid images via https://www.zachleat.com/web/fluid-images/ */
img {
max-width: 100%;
}
img[width][height] {
height: auto;
}
img[src$=".svg"] {
width: 100%;
height: auto;
max-width: none;
}
p:last-child {
margin-bottom: 0;
}