Tailwind CSS - Introduction


Tailwind CSS is a utility first framework, which means it is a CSS architectural approach that uses pre-defined utility classes to style HTML elements instead of writing custom CSS without leaving your HTML document file.

Table of Content


 

What is Tailwind CSS?

It is utility first and currently the best CSS framework available. With a ton of predefined classes, customization options, and the ability to remove unnecessary CSS that was predefined with HTML elements.

Benefits of Utility First Approach

  • Consistency: By creating a limited set of styles to use, the developer can maintain the consistency.
  • Customization: By generating utility classes from your configuration file, you can customize the existing styles or you can create your own classes.
  • Efficiency: By avoiding bloating your CSS with unnecessary styles, it is easy to maintain the efficiency.
  • Rapid UI development: By applying pre-designed utility classes directly to HTML elements.
  • Time Save: By reusing the same sizes and colors, which can also improve the UI.

Tailwind CSS Versions

The versions mentioned below mentioned versions can be checked on official website; there are lots of minor updates in between those versions updates as well.

Tailwind CSS Versions

What Tailwind CSS Offers?

There are a lot of things that Tailwind CSS offers, like designing layout, flexbox, grid, spacing, sizing, typography, backgrounds, borders, effects, filters, tables, transitions, animations, transforms and interactivity. Before these, you need to know about the core concepts and customization so you can use Tailwind CSS in its full potential.

Tailwind CSS Core Concepts

Tailwind CSS Core Concepts covers a wide range of fundamental topics, such as utility classes, custom configuration, and more.

Tailwind CSS Customization

Tailwind CSS is a highly customizable and utility-first CSS framework. Its customization options include a configurable 'tailwind.config.js' file, themeable architecture, and plugin architecture. Its customization allows the configuration of content, theme, screens, spacing, plugins and more.

Limitation of Tailwind CSS

There are certain limitations on Tailwind CSS if you are planning to use it through the CDN link.

  • Plugins can not be used.
  • Directives can not be used.
  • Customize Tailwind's default theme can not be used.

Advantages of Tailwind CSS

  • Responsive Layout: Tailwind CSS offers a list of utility classes; one of these classes is for formatting a responsive layout. Just by inserting a single line of class into a document, we can achieve a well-organized responsive layout.
  • Utility-First Fundamental: Tailwind CSS is a Utility-First CSS Framework in which "Utility-first" means the framework focusses on providing utility classes. This enables us to use utility classes directly on an HTML document.
  • Highly Customizable: Tailwind CSS is highly customizable due to its extensibility and utility-first approach. You can easily customize your color palette, spacing, typography, and breakpoints.
  • Less Custom Code: Tailwind CSS enables us to add design to an HTML document directly by adding utility classes to an HTML document, eliminating the need for using custom CSS.

Disadvantages of Tailwind CSS

  • Tailwind CSS contains a large set of utility classes, so developers need to spend more time learning how to use the framework effectively.
  • There are missing headers and navigation components.