{ CSS snippets }

Wes Bos

Wes Bos @wesbos

πŸ”₯ Did you know CSS has a `turn` unit? It’s often easier to turn something `rotate(0.75turn)` instead of doing the math to `rotate(270deg)`

CSS
Wes Bos πŸ”₯

Wes Bos πŸ”₯ @wesbos

πŸ”₯ All CSS background properties can take multiple values - helpful for layering colours, gradients and textures https://t.co/kfiTpekvag

CSS
Wes Bos πŸ”₯

Wes Bos πŸ”₯ @wesbos

Two things I’ve been doing lately: 1. using aria-attributes in my CSS to dictate different UI states. (aria-busy for loading, aria-expanded for open/closed navs) 2. Disabling an entire <form> during loading states by wrapping in a fieldset. Using CSS to add loading animation https://t.co/rW1uRNK8eG

CSS
Achraf Kassioui

Achraf Kassioui @achrafkassioui

CSS tip: the <main> element isn't recognized as a default block level element in Internet Explorer. Set it to display: block in CSS so IE can display it correctly.

Wes Bos πŸ”₯

Wes Bos πŸ”₯ @wesbos

πŸ”₯ CSS Variables are perfect for overwriting parts of a definition that can’t be broken up like text-shadows, transforms or gradients https://t.co/6vKDLNgg1T

CSS
Wes Bos πŸ”₯

Wes Bos πŸ”₯ @wesbos

Another neat thing you can use CSS Grid for is managing full bleed and contained layouts. Very similar to max-width; margin: 0 auto; https://t.co/gcuEtBHTEi

CSS