How toddle thinks about responsive design
Responsive design is the art of presenting content in a way that makes your web application or site easy to use and navigate despite the available screen size.
Andreas Møller
October 10, 2024
Rule #1: Breakpoints should be the last tool you reach for
More sets of styles can make it harder to understand which styles are used at any given time, so when possible, don’t add unnecessary breakpoints.
Rule #2: Use relative units and with constraints
For example, you can add a max width of 100% to a card element that has a width of 400px. This will prevent overflow issues on smaller screens.
Rule #3: Learn the different layout engines in CSS
Rule #4: Use rem and em for text
Rule #5: Be careful with “height”
If you need an element's height to be limited, set an overflow value of either scroll or auto to ensure that the content does not overflow the element.
Rule #6: Don’t use device breakpoints
Many website builders, like Webflow and Framer, use fixed breakpoints, such as phones, tablets, laptops, etc. This can seem like a nice and simple approach, but the end result is usually less good.
The big problem when you define breakpoints based on devices is that a device for almost every possible screen size now exists. There is no such thing as a “standard phone screen”; ask Tony Stark.
A deep dive into responsive design and breakpoints in toddle