{ CSS snippets }

Wes Bos

Wes Bos @wesbos

🔥 background-position can take four values which allows you to anchor from a specific corner and then skirt it around from there. https://t.co/fxJyj91Y2n

CSS
Wes Bos

Wes Bos @wesbos

🔥 You can use new CSS logical properties instead of top/bottom/left/right. Makes designing multi-language websites much easier when the flow direction changes. CSS Grid and Flexbox already setup for this with start/end values. https://t.co/gielwhWQBI

CSS
Wes Bos

Wes Bos @wesbos

🔥 Need elements to overlap? Assigning multiple elements the same CSS Grid row and column is a good alternative to absolute positioning. https://t.co/XbtqHwzcTe

CSS
Zak Nesler

Zak Nesler @zaknesler

Fellow #MacOS devs, try to avoid using "overflow: scroll" in containers that might overflow. It always forces a scrollbar on Windows, even if one is not necessary. Use "overflow: auto" instead. 😉 https://t.co/gLzCvq2IOZ

CSS
Swizec Teller

Swizec Teller @Swizec

Oh you haven't heard of "presentational" attributes? It means they listen to CSS. If you ain't keen on adding a bunch of attributes, you can use CSS. Even styled-components. https://t.co/jFllGjJYlR

Wes Bos

Wes Bos @wesbos

? CSS variables can be set to other CSS variables. Also we will soon be able to tweak colours with colour functions in CSS directly. Good for Canadians who can never remember which way to spell grey https://t.co/oqn74uDF4g

CSS
Ben Furfie

Ben Furfie @frontendben

Here's a really neat trick I always use in all my #tailwindcss powered sites. Need to make you <p> tag white but don't want to add text-white to every tag? You don't have to. Simply leverage the power of color: inherit. https://t.co/cfkoCb487k

CSS
Tyler van der Hoeven

Tyler van der Hoeven @tyvdh

Today I learned about `font-variant-numeric: tabular-nums;` Basically makes a text value act like monospace so when you’re scaling it up and down via a slider etc. it doesn’t jump around as much. https://t.co/2nb9ym3Khf

CSS
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