CSS Fundamentals¶
Cascade analogy¶
Death match between classes
The property with the most specificity emerges victorious
Scroll bars¶
Always show scroll bars on mac!¶
Why
- by default, scroll bars are always visible on non-macs
Downside of inline-block
- it doesn't word wrap
Images¶
Get an image from Unsplash
Clip path¶
clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
Tooltip¶
- Basic tooltip that rises from the text
Accessible tooltip¶
????
Pseudo-elements¶
::before
and ::after
- can't add them to replaced elements
- whose contents can't be changed
Last update:
2023-03-20