From d6facc7438df49b2266cbe0947e20e6d92643f2f Mon Sep 17 00:00:00 2001 From: Thomas Knickman Date: Thu, 16 Dec 2021 12:43:48 -0500 Subject: [PATCH] chore(blog-starter-typescript): update tailwindcss to v3 (#32579) Updates the [blog-starter-typescript](https://github.com/vercel/next.js/tree/canary/examples/blog-starter-typescript) example to use the new [tailwindcss v3](https://tailwindcss.com/blog/tailwindcss-v3) by following the [upgrade guide](https://tailwindcss.com/docs/upgrade-guide). Removes out-dated `tailwind.config.js` theme customizations for simplicity in favor of tailwind defaults (some were one-to-one mappings) Thanks! ## Documentation / Examples - [ ] Make sure the linting passes by running `yarn lint` --- examples/blog-starter-typescript/README.md | 4 +-- .../components/alert.tsx | 8 ++--- .../components/cover-image.tsx | 4 +-- .../components/footer.tsx | 4 +-- .../components/hero-post.tsx | 2 +- .../components/intro.tsx | 4 +-- .../components/more-stories.tsx | 2 +- .../components/post-title.tsx | 2 +- .../components/section-separator.tsx | 2 +- examples/blog-starter-typescript/package.json | 6 ++-- .../blog-starter-typescript/styles/index.css | 12 ------- .../tailwind.config.js | 32 ++----------------- 12 files changed, 21 insertions(+), 61 deletions(-) diff --git a/examples/blog-starter-typescript/README.md b/examples/blog-starter-typescript/README.md index b74a6e5ad721a..15856d06a4942 100644 --- a/examples/blog-starter-typescript/README.md +++ b/examples/blog-starter-typescript/README.md @@ -36,6 +36,4 @@ Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&ut # Notes -This blog-starter-typescript uses [Tailwind CSS](https://tailwindcss.com). To control the generated stylesheet's filesize, this example uses Tailwind CSS' v2.0 [`purge` option](https://tailwindcss.com/docs/controlling-file-size/#removing-unused-css) to remove unused CSS. - -[Tailwind CSS v2.0 no longer supports Node.js 8 or 10](https://tailwindcss.com/docs/upgrading-to-v2#upgrade-to-node-js-12-13-or-higher). To build your CSS you'll need to ensure you are running Node.js 12.13.0 or higher in both your local and CI environments. +`blog-starter-typescript` uses [Tailwind CSS](https://tailwindcss.com) [(v3.0)](https://tailwindcss.com/blog/tailwindcss-v3). diff --git a/examples/blog-starter-typescript/components/alert.tsx b/examples/blog-starter-typescript/components/alert.tsx index f804ff6192868..067672f380826 100644 --- a/examples/blog-starter-typescript/components/alert.tsx +++ b/examples/blog-starter-typescript/components/alert.tsx @@ -10,8 +10,8 @@ const Alert = ({ preview }: Props) => { return (
@@ -21,7 +21,7 @@ const Alert = ({ preview }: Props) => { This page is a preview.{' '} Click here {' '} @@ -32,7 +32,7 @@ const Alert = ({ preview }: Props) => { The source code for this blog is{' '} available on GitHub diff --git a/examples/blog-starter-typescript/components/cover-image.tsx b/examples/blog-starter-typescript/components/cover-image.tsx index 6497d4c1bb85a..78def80024126 100644 --- a/examples/blog-starter-typescript/components/cover-image.tsx +++ b/examples/blog-starter-typescript/components/cover-image.tsx @@ -12,8 +12,8 @@ const CoverImage = ({ title, src, slug }: Props) => { {`Cover ) diff --git a/examples/blog-starter-typescript/components/footer.tsx b/examples/blog-starter-typescript/components/footer.tsx index e8a7fdce4cd0d..d2bcba33363b6 100644 --- a/examples/blog-starter-typescript/components/footer.tsx +++ b/examples/blog-starter-typescript/components/footer.tsx @@ -3,10 +3,10 @@ import { EXAMPLE_PATH } from '../lib/constants' const Footer = () => { return ( -