Skip to content

Commit

Permalink
Add CSS for fluid width images
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Nov 15, 2024
1 parent 287d473 commit 940e69d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 13 additions & 0 deletions public/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 940e69d

Please sign in to comment.