"If a worker wants to do his job well, he must first sharpen his tools." - Confucius, "The Analects of Confucius. Lu Linggong"
Front page > Programming > Tailwind Commands Cheat Sheet

Tailwind Commands Cheat Sheet

Published on 2024-11-03
Browse:634

Tailwind Commands Cheat Sheet

Tailwind CSS is a utility-first CSS framework packed with classes that can be composed to build any design, directly in your markup.

Features:

Utility-first:

Tailwind css is a utility-first css framework that provides low-level utility classes to build custom designs without writing css.This approach allows us to implement a completely custom component design without writing a single line of custom CSS."You aren’t wasting energy inventing class names".

Content purging:

It is the process of removing unused CSS classes from the final CSS file that will be used in production environment.It is an optimization process in which the final CSS size is smaller, easier to maintain and shows improved performance.

Commands:

Underline:

underline 
underline-offset-
decoration-- //color for underline
decoration- // size of underline
decoration-

Text Styling

text-- //color of text
text-opacity- //opacity of text
text- //size of text
text- //alignment of text

Background Color

bg--

Border Radius

rounded-

Font Styling

font-

Italic:

italic

Visibility

Hide elements:

hidden

Display (Opposite to hide):

block

Padding

p-   /* All sides */
px-  /* Horizontal (left and right) */
py-  /* Vertical (top and bottom) */
pl-  /* Left */
pr-  /* Right */
pt-  /* Top */
pb-  /* Bottom */

Margin

m-   /* All sides */
mx-  /* Horizontal (left and right) */
my-  /* Vertical (top and bottom) */
ml-  /* Left */
mr-  /* Right */
mt-  /* Top */
mb-  /* Bottom */

Flexbox

flex
flex- // row or column

Justify Content

justify-

Align Items

items-

Responsive Design

sm  /* Small devices */
md  /* Medium devices */
lg  /* Large devices */
xl  /* Extra large devices */

Sizing

h-
w-

Borders

border
border-
border-

Hover States

hover:
Release Statement This article is reproduced at: https://dev.to/madgan95/tailwind-commands-cheat-sheet-2mb3?1 If there is any infringement, please contact [email protected] to delete it
Latest tutorial More>

Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.

Copyright© 2022 湘ICP备2022001581号-3