September 30, 2021
I had an issue where I had a flexbox (.flex
with Tailwind) layout for two elements, but once the screen got narrower one element (in my case, an SVG) would get squished by the other element.
I wanted that one element to keep its original size and not get smaller when the other element squeezed it.
I was able to fix the problem by applying Tailwind's .flex-shrink-0
class to the element that was becoming smaller!
The markup looked a bit like this:
<div class="flex">
<svg class="flex-shrink-0"></svg>
<p>...</p>
</div>
Tufts Meal Plan Wrapped
Mar 2, 2024
Building an e-ink picture frame that displays an iCloud photo album
Jan 9, 2024
2023 in review
Jan 5, 2024
Subscribe to my newsletter for a monthly round-up of new blog posts and projects Iām working on!