CSS magic to size a container for any viewport
November 26, 2022
A simple CSS trick to set the max-width of component such that the content is centered and in-focus on any viewport. The same logic can be applied to other CSS quantities like height, font size, etc.