Type Safely

Type Safely

Choose The Largest View For a Container With ViewThatFits

Daily Coding Tip 182

Millie Sturgeon's avatar
Millie Sturgeon
Sep 25, 2022
∙ Paid
green and brown wooden sticks
Photo by Markus Spiske on Unsplash

I want to be able to change the size of three squares. One is the size of the container for the other two squares. If the first square fits inside the container it will be shown, otherwise the second square will be shown. Interestingly the second square does not have to fit inside the container, because it is the only o…

User's avatar

Continue reading this post for free, courtesy of Type Safely.

Or purchase a paid subscription.
© 2026 Type Safely · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture