Garrit's Notes
  • Blog
  • Contact
  • Resume

TIL about CSS Insets

Feb 19 2023

Just a quick tip that I thought is worth sharing. Instead of declaring:

.foo { 
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

you can just use:

.foo {
  inset: 0;
}

It's supported everywhere computers are sold!

MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/inset

Source: https://front-end.social/@estelle/109878532782943511

This is post 047 of #100DaysToOffload.


Reply via E-Mail

#web#note#til#quick-tip#css#100DaysToOffload

Links of Interest

RSS Feed
Todo List
PGP Key
Guestbook
Blogroll
Capture the Flag

Elsewhere

Github
LinkedIn
Mastodon (ActivityPub)
Contact

👻 Proud member of darktheme.club 👻

© 2018-2023 Garrit Franke
Privacy | Source Code