Unverified Commit 9ded7aa9 authored by Justin Eder's avatar Justin Eder Committed by GitHub

Update to Tailwind CSS 2.0 in blog-starter-typescript example (#20664)

This updates the blog-starter-typescript example to use the latest version of Tailwind CSS (2.0.2)

Notes:
Followed the upgrade guide here: https://tailwindcss.com/docs/upgrading-to-v2 
And Next / PostCSS guide here: https://nextjs.org/docs/advanced-features/customizing-postcss-config
parent 8b803d79
...@@ -30,4 +30,6 @@ Deploy it to the cloud with [Vercel](https://vercel.com/import?filter=next.js&ut ...@@ -30,4 +30,6 @@ Deploy it to the cloud with [Vercel](https://vercel.com/import?filter=next.js&ut
# Notes # Notes
This blog-starter-typescript uses [Tailwind CSS](https://tailwindcss.com). To control the generated stylesheet's filesize, this example uses Tailwind CSS' v1.4 [`purge` option](https://tailwindcss.com/docs/controlling-file-size/#removing-unused-css) to remove unused CSS. 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.
...@@ -26,7 +26,7 @@ const HeroPost = ({ ...@@ -26,7 +26,7 @@ const HeroPost = ({
<div className="mb-8 md:mb-16"> <div className="mb-8 md:mb-16">
<CoverImage title={title} src={coverImage} slug={slug} /> <CoverImage title={title} src={coverImage} slug={slug} />
</div> </div>
<div className="md:grid md:grid-cols-2 md:col-gap-16 lg:col-gap-8 mb-20 md:mb-28"> <div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28">
<div> <div>
<h3 className="mb-4 text-4xl lg:text-6xl leading-tight"> <h3 className="mb-4 text-4xl lg:text-6xl leading-tight">
<Link as={`/posts/${slug}`} href="/posts/[slug]"> <Link as={`/posts/${slug}`} href="/posts/[slug]">
......
...@@ -11,7 +11,7 @@ const MoreStories = ({ posts }: Props) => { ...@@ -11,7 +11,7 @@ const MoreStories = ({ posts }: Props) => {
<h2 className="mb-8 text-6xl md:text-7xl font-bold tracking-tighter leading-tight"> <h2 className="mb-8 text-6xl md:text-7xl font-bold tracking-tighter leading-tight">
More Stories More Stories
</h2> </h2>
<div className="grid grid-cols-1 md:grid-cols-2 md:col-gap-16 lg:col-gap-32 row-gap-20 md:row-gap-32 mb-32"> <div className="grid grid-cols-1 md:grid-cols-2 md:gap-x-16 lg:gap-x-32 gap-y-20 md:gap-y-32 mb-32">
{posts.map((post) => ( {posts.map((post) => (
<PostPreview <PostPreview
key={post.slug} key={post.slug}
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
"@types/react": "^16.9.35", "@types/react": "^16.9.35",
"@types/react-dom": "^16.9.8", "@types/react-dom": "^16.9.8",
"postcss-preset-env": "^6.7.0", "postcss-preset-env": "^6.7.0",
"tailwindcss": "^1.4.0" "tailwindcss": "^2.0.2"
}, },
"license": "MIT" "license": "MIT"
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment