From 5c32c7a4c32c6de5c10b6dab0a6dc3ef0afab4e8 Mon Sep 17 00:00:00 2001 From: Dan Jutan Date: Wed, 1 Jun 2022 18:30:36 -0400 Subject: [PATCH] Integration Docs: Tailwind (#3429) * test commi * add video * test video include * actually close the tag * try directly pasting the video link * remove the quote I forgot about * figured out how to properly upload a video to github * remove unneeded media directory * why tailwind * Installation and Usage * Troubleshooting * Add examples section * Update packages/integrations/tailwind/README.md Co-authored-by: Sarah Rainsberger * Update packages/integrations/tailwind/README.md Co-authored-by: Sarah Rainsberger * Update packages/integrations/tailwind/README.md Co-authored-by: Sarah Rainsberger * Update packages/integrations/tailwind/README.md Co-authored-by: Sarah Rainsberger * TOC + layout tweaks * separated, and example re: warning to not use Tailwind with other styling method Co-authored-by: Sarah Rainsberger --- packages/integrations/tailwind/README.md | 136 +++++++++++++++++------ 1 file changed, 99 insertions(+), 37 deletions(-) diff --git a/packages/integrations/tailwind/README.md b/packages/integrations/tailwind/README.md index 38eef5c86..ae5bc8458 100644 --- a/packages/integrations/tailwind/README.md +++ b/packages/integrations/tailwind/README.md @@ -1,40 +1,59 @@ # @astrojs/tailwind 💨 -This **[Astro integration][astro-integration]** brings [Tailwind CSS](https://tailwindcss.com/) to your Astro project. +This **[Astro integration][astro-integration]** brings [Tailwind's](https://tailwindcss.com/) utility CSS classes to every `.astro` file and [framework component](https://docs.astro.build/en/core-concepts/framework-components/) in your project, along with support for the Tailwind configuration file. -Tailwind brings utility CSS classes for fonts, colors, layouts, transforms, and more to every Astro page or [UI component](https://docs.astro.build/en/core-concepts/framework-components/) in your project. It also includes extensive theming options for unifying your styles. +- [Why Tailwind](#why-tailwind) +- [Installation](#installation) +- [Usage](#usage) +- [Configuration](#configuration) +- [Examples](#examples) +- [Troubleshooting](#troubleshooting) +- [Contributing](#contributing) +- [Changelog](#changelog) + +## Why Tailwind? + +Tailwind lets you use utility classes instead of writing CSS. These utility classes are mostly one-to-one with a certain CSS property setting: for example, adding the `text-lg` to an element is equivalent to setting `font-size: 1.125rem` in CSS. You might find it easier to write and maintain your styles using these predefined utility classes! + +If you don't like those predefined settings, you can [customize the Tailwind configuration file](https://tailwindcss.com/docs/configuration) to your project's design requirements. For example, if the "large text" in your design is actually `2rem`, you can [change the `lg` fontSize setting](https://tailwindcss.com/docs/font-size#customizing-your-theme) to `2rem`. + +Tailwind is also a great choice to add styles to React, Preact, or Solid components, which don't support a `