The battle of Königgrätz.
Painting by Georg Bleibtreu
CSS
Battle
at
CSS
Café
Takeaways
- You can style
html and body elements.
- Don’t use
div when another element type is appropriate.
- There are other length units than
px, namely %, em, rem, ch, vw, vh, vmin, vmax. Use them wisely.
- Never rely on client-side data validation alone! Always check user inputs on the server!
Throwaways
- Omit white space, end tags and trailing
;, also ', ", }, ) at the end.
- Omit
px unit on some properties in quirks mode
- There are other length units than
px, namely q, mm, cm, in, …
- Never use
div. Use other element types like p, dl, dt, dd, …
- Never use
span. Use other element types like a, b, i, img, …
- Never use
class. Use attributes like a without value and attribute selectors like [a].
bgcolor and text attributes on body element; omit # and trailing 0 (tweak color).
- Omit
# in CSS …color properties.
Mindopeners
scale(-1) is the same as rotate(180deg) or rotate(.5turn)
box-shadow
Memorial to the Battery of the Death.
Photo by Zdeněk Pražák, CC BY-SA 3.0