Basic typography & color Flashcards
what is a color assigned in html
html keyword and hex value
rgb
style method for color
.color-rgb {
color: rgb (amount of red #, amount of green #, amount of blue #)
}
rgba
.color-rgba {
color: rgba (amount of red #, amount of green #, amount of blue #, amount of alpha)
alpha –> level of transparency of the color
hex codes
.color-hex {
color: #1B9AAA;
}
colors correspond to a hex number
measurement unit types
fixed
relative
fluid
fixed
*small details like border, padding margin –> anything that cannot change
set units that never change
relative
*for fonts
set units, determined by values set on the parent element or the root element (<html>)
fluid
*for containers
scales upon viewport resizing based on various factors
fixed/absolute units
px
relative units
1em –> 1 times font size of parent element
1rem –> 1 times font size of the :root element (<html> usually 16px)
fluid units
1% –> 1% of parent element’s width and height **for font, 1% of elements assigned font size
1vh –> 1/100 of the height of the viewport (browser window)
1vw –> 1/100 of the width of the viewport (browser window)