Skip to content
This repository was archived by the owner on Feb 14, 2022. It is now read-only.

Commit a546752

Browse files
committed
Update diff snippets
1 parent 0c3c5da commit a546752

File tree

2 files changed

+3982
-5
lines changed

2 files changed

+3982
-5
lines changed

src/pages/tailwindcss-2-2/index.mdx

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,15 @@ export const meta = {
1717
`,
1818
}
1919

20+
<!--excerpt-->
21+
2022
Well I can't say we were really planning on it but over the last few weeks we've been having a ton of fun dumping new and exciting features into Tailwind and now feels like the right time to cut a release, so here it is Tailwind CSS v2.2!
2123

22-
<!--more-->
24+
We've built-in a new high-performance CLI tool, added `::before` and `::after` support, introduced new `peer-*` variants for sibling styling, added variants for styling highlighted text, and tons more.
25+
26+
<!--/excerpt-->
27+
28+
Well I can't say we were really planning on it but over the last few weeks we've been having a ton of fun dumping new and exciting features into Tailwind and now feels like the right time to cut a release, so here it is Tailwind CSS v2.2!
2329

2430
<div className="aspect-w-16 aspect-h-9 my-12">
2531
<iframe
@@ -54,6 +60,12 @@ For the full details, [check out the release notes](https://github.com/tailwindl
5460

5561
It's important to note that although this is a minor release and there are no breaking changes in the classic engine, **Just-in-Time mode is still in preview and v2.2 introduces a few very small changes that might impact you**, so make sure you read through the [changes and deprecations](https://github.com/tailwindlabs/tailwindcss/releases/tag/v2.2.0#changes-and-deprecations) in the release notes when upgrading.
5662

63+
When you're ready to upgrade, just install the latest version from npm and you're off to the races:
64+
65+
```shell
66+
npm install -D tailwindcss@latest
67+
```
68+
5769
---
5870

5971
<a name="all-new-high-performance-tailwind-cli"></a>
@@ -254,7 +266,7 @@ _This feature is only available in [Just-in-Time mode](https://tailwindcss.com/d
254266

255267
Instead of using utilities like `bg-opacity-50`, `text-opacity-25`, or `placeholder-opacity-40`, Tailwind CSS v2.2 gives you a new color opacity shorthand you can use to tweak the alpha channel of a color directly in the color utility itself:
256268

257-
```diff
269+
```diff-html
258270
- <div class="bg-red-500 bg-opacity-25">
259271
+ <div class="bg-red-500/25">
260272
```
@@ -363,7 +375,7 @@ Under the hood, this uses a new `screen()` function we've introduced that you ca
363375

364376
You probably won't need to use this yourself but it could be helpful if you're ever integrating Tailwind with another tool that understands `@media` but doesn't handle `@screen` properly.
365377

366-
```diff
378+
```diff-css
367379
- @screen sm { /* ... */ }
368380
+ @media screen(sm) { /* ... */ }
369381
```
@@ -421,7 +433,7 @@ _This feature is only available in [Just-in-Time mode](https://tailwindcss.com/d
421433

422434
The `transform`, `filter`, and `backdrop-filter` classes are no longer necessary to "enable" their respective set of composable utilities.
423435

424-
```diff
436+
```diff-html
425437
- <div class="transform scale-50 filter grayscale backdrop-filter backdrop-blur-sm">
426438
+ <div class="scale-50 grayscale backdrop-blur-sm">
427439
```
@@ -430,7 +442,7 @@ Now those features are automatically enabled any time you use any of the relevan
430442

431443
It's important to understand though that because these utilities aren't needed anymore, you can no longer expect transforms and filters to be "dormant" by default. If you were relying on conditionally "activating" transforms or filters by toggling these classes, you will want to make sure you are toggling the sub-utilities themselves instead:
432444

433-
```diff
445+
```diff-html
434446
- <div class="scale-105 -translate-y-1 hover:transform">
435447
+ <div class="hover:scale-105 hover:-translate-y-1">
436448
```

0 commit comments

Comments
 (0)