avatarLuca Spezzano

Summary

The web content introduces six lesser-known Tailwind CSS utilities that can enhance development efficiency.

Abstract

The article titled "6 Tailwind CSS Utilities You Are Probably Not Using" aims to acquaint developers with advanced Tailwind CSS utilities that can streamline the coding process. The author, who has transitioned from Bootstrap to Tailwind CSS, shares personal insights on the benefits of these utilities, which include Inset, Group-hover, Ring, Space Between, Divide, and Object Fit. Each utility is described with its purpose and practicality, such as Inset for positioning elements and Group-hover for styling child elements on parent hover. The article emphasizes the time-saving advantages of these utilities and provides links to the Tailwind CSS documentation for readers to explore further.

Opinions

  • The author expresses a preference for Tailwind CSS over Bootstrap due to its utility-first approach.
  • There is an appreciation for the Inset utility for its ability to simplify absolute positioning.
  • Group-hover is highlighted as a favorite utility for its effectiveness in styling child elements.
  • The Ring utility is recognized for its convenience in applying box-shadows without complex CSS.
  • Space Between is noted as a frequently used utility that simplifies spacing between elements.
  • The Divide utility is recommended as a better alternative to HTML borders and CSS for separating elements.
  • The author finds the Object Fit utility particularly useful for image adaptation without resorting to background-image styling.
  • The author is optimistic that introducing these utilities will save developers time and improve their workflow.

6 Tailwind CSS Utilities You Are Probably Not Using

Save time and use everything Tailwind CSS makes available to you

Photo by Lukas Blazek on Unsplash

It has been nearly a year since I started to use Tailwind CSS instead of Bootstrap. Sometimes I wonder if in a few months I’ll be able to add only utilities or if I’ll remember how to write CSS code.

Anyway, today I’d like to show you six utilities that I met after a few months of using Tailwind CSS but I would have been grateful if someone had introduced them to me before.

Inset

Utilities to anchor absolutely positioned elements against any of the edges of the nearest positioned parent. They are useful because they allow you to avoid writing a class for each position, for example, inset-0 will be

top: 0px;
right: 0px;
bottom: 0px;
left: 0px;

Read more here.

Group-hover

This is one of my favourite utilities. It is useful when you need to style a child element when hovering over a specific parent element. You simply need to add group class to the parent element and add the group-hover: prefix to the utility on the child element.

Read more here.

Ring

Utilities to apply solid box-shadow of a specific thickness to an element.

Read more here.

Space Between

This is one of the utilities I use the most and it can save you a lot of time. These utilities used in the parent allow you to control the horizontal and vertical space between children.

Read more here.

Divide

Utilities for controlling the border width between elements. You can use these utilities instead of using <br>, border-bottom , border-top , border-right , border-left to separate elements.

Read more here.

Object Fit

These utilities help to adapt our images to all needs without using the background-image property. They allow you to control how a replaced element’s content should be resized.

Read more here.

I hope I introduced you to some new utilities and saved you time 😃

CSS
Tailwind Css
Front End Development
Software Development
Coding
Recommended from ReadMedium