Type Safely

Type Safely

Share this post

Type Safely
Type Safely
Choose The Largest View For a Container With ViewThatFits

Choose The Largest View For a Container With ViewThatFits

Daily Coding Tip 182

Millie Sturgeon's avatar
Millie Sturgeon
Sep 25, 2022
∙ Paid

Share this post

Type Safely
Type Safely
Choose The Largest View For a Container With ViewThatFits
Share
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…

Keep reading with a 7-day free trial

Subscribe to Type Safely to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Type Safely
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share