Write Cleaner CSS with Modern Properties

5 shorthands for CSS

Writing less CSS has never been easier.

Modern properties are doing some serious heavy lifting.

Here is a list of 5 CSS improvements

Instead of:

div {
  transform: scale(2);
}

Just write:

div {
  scale: 2;
}

Instead of:

div {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

Just write:

div {
  inset: 0;
}

And there’s more:

  • :is() simplifies selectors.
  • min() or max() combines constraints.
  • margin-inline or margin-block makes layouts more flexible.

All of these tweaks add up to cleaner CSS.


I’m working on an ebook called “You Don’t Need JavaScript”.

To get notified when it launches 👉 https://theosoti.com/you-dont-need-js/

Related Articles

Explore more articles on front-end development, covering HTML, CSS and JavaScript for building high-performance websites.

    No strings attached, unsubscribe anytime!