It's better to ditch fixed width and height solutions as antipatterns, because content changes, and such changes should be made without the help of a frontend developer.
The only robust solutions are flex and grid.
Transition-based solution can also be made robust by setting max-width, max-height and overflow, because we put the element out of the document flow by using absolute positioning, but why reinvent the wheel?
"in order of adherence to best practices" That's why the fixed width and height solutions are at the very bottom.
I didnt quite understand "Transition-based solution can also be made robust by setting max-width, max-height and overflow, because we put the element out of the document flow by using absolute positioning, but why reinvent the wheel?" Could you clarify?
Do you mean transform?
It's better to ditch fixed width and height solutions as antipatterns, because content changes, and such changes should be made without the help of a frontend developer.
The only robust solutions are flex and grid.
Transition-based solution can also be made robust by setting
max-width
,max-height
andoverflow
, because we put the element out of the document flow by using absolute positioning, but why reinvent the wheel?Nice article though!
"in order of adherence to best practices" That's why the fixed width and height solutions are at the very bottom.
I didnt quite understand "Transition-based solution can also be made robust by setting max-width, max-height and overflow, because we put the element out of the document flow by using absolute positioning, but why reinvent the wheel?" Could you clarify?
Do you mean transform?
Yes, it's transform. Sorry, it was 1am when I wrote the original comment)