From 940e69d2bfd522654ceefb0495931049865b9b2d Mon Sep 17 00:00:00 2001 From: Zach Leatherman Date: Fri, 15 Nov 2024 17:09:48 -0600 Subject: [PATCH] Add CSS for fluid width images --- LICENSE | 2 +- public/css/index.css | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index c97fe3d..5027c0d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017–2023 Zach Leatherman @zachleat +Copyright (c) 2017–2024 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 diff --git a/public/css/index.css b/public/css/index.css index 1cfa083..ee37c46 100644 --- a/public/css/index.css +++ b/public/css/index.css @@ -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; }