You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 14, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: src/pages/tailwindcss-v2/index.mdx
+20-23Lines changed: 20 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ Tailwind CSS v2.0 is the first major update ever, including:
47
47
48
48
Even though Tailwind CSS v2.0 is a new major version, **we've worked really hard to minimize significant breaking changes**, especially ones that would force you to edit tons of your templates. We've renamed two classes, removed three that are no longer relevant in modern browsers, and replaced two with more powerful alternatives. Any other breaking changes that might impact you can be remedied with a couple small additions to your `tailwind.config.js` file. Upgrading shouldn't take more than about 30 minutes.
49
49
50
-
[Check out the upgrade guide](#) for more details and step-by-step instructions on migrating your project to Tailwind CSS v2.0.
50
+
[Check out the upgrade guide](https://tailwindcss.com/docs/upgrading-to-v2) for more details and step-by-step instructions on migrating your project to Tailwind CSS v2.0.
51
51
52
52
If you'd like to start a brand new project with v2.0, [head over to our updated installation documentation](https://tailwindcss.com/docs/installation) to get started fast.
53
53
@@ -66,9 +66,7 @@ The new color palette includes 22 colors _(compared to 10 previously)_ with 10 s
66
66
We've added an extra light `50` shade for every color, so they go from 50–900 now:
67
67
68
68
```html
69
-
<divclass="bg-gray-50">
70
-
I can't believe it's not white.
71
-
</div>
69
+
<divclass="bg-gray-50">I can't believe it's not white.</div>
72
70
```
73
71
74
72
The palette even includes 5 different shades of gray now, so you can choose "blue gray" if you want something really cool, or go all the way to "warm gray" for something with a lot more brown in it.
@@ -125,7 +123,9 @@ Boom — now just add `dark:` to the beginning of a class like `bg-black` and it
@@ -157,9 +157,7 @@ I'm pretty sure they make an iPhone that is 1280px wide now, so it's time to ste
157
157
We've added a new `2xl` breakpoint out-of-the-box that lets you target things at 1536px and above:
158
158
159
159
```html
160
-
<h1class="... 2xl:text-9xl">
161
-
Godzilla
162
-
</h1>
160
+
<h1class="... 2xl:text-9xl">Godzilla</h1>
163
161
```
164
162
165
163
Exciting I know but also let's be serious [you've been able to add this yourself](https://tailwindcss.com/docs/responsive-design#customizing-breakpoints) for like three years. Now it's blessed though, I get it.
@@ -173,15 +171,19 @@ You know how the `outline` property ignores border radius and pretty much just a
173
171
They work a lot like the `border` utilities, except they add a solid box-shadow rather than a border so they don't impact the layout:
In v2.0, we've made it possible to specify a default duration and timing function that is used automatically any time any `transitionProperty` utility is added:
@@ -427,17 +428,13 @@ module.exports = {
427
428
So now you only need to write a single class if you have a common duration and timing function that you use really frequently:
428
429
429
430
```html
430
-
<buttonclass="... transition">
431
-
Count them again
432
-
</button>
431
+
<buttonclass="... transition">Count them again</button>
433
432
```
434
433
435
434
Of course you can override this by layering on separate duration or timing function utilities:
0 commit comments