25/11
TOP - Intermediate HTML and CSS: 18%.
Intermediate CSS Concepts - CSS Units (day 4)
Done reading the second article and currently reading the third (last) article of TOP assignment.
The second article: https://web.archive.org/web/20251130034321/https://codyloyd.com/2021/css-units/
was about how and when to use em, rem and px. This article suggested to use rem for font-size and px for almost everything else.
It said that using rem for other thing like padding and margin can lead to when changing the font-size, everything else will scale up along with the font.
Interesting take, I will be more mindful about this when using px and rem.
The third article: https://css-tricks.com/fun-viewport-units/
this article is about viewport unit, still reading but I learned about how useful viewport units is.
Viewport width vw: 1vw = 1% of the width of the viewport.
Viewport height vh: 1vh = 1% of the height of the viewport.
Viewport minimun - vmin: 1vmin = 1% of the width or height of the viewport, whichever is smaller. If your viewport has width < height then 1vmin will be 1% of the width of the viewport, else, if width > height then 1vmin will be 1% of the height of the viewport.
Viewport maximum - vmax: the opposite of vmin: 1vmax = 1% of the width or height of the viewport, whichever is larger.
Learned that viewport units and % is like rem and em. % take the length relative to the containing element while vw, vh, vmin, vmax is relative to the full width or height of the browser window.
Really useful for design layout.