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
Copy file name to clipboardExpand all lines: src/docs/upgrade-guide.mdx
+49-5Lines changed: 49 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -379,15 +379,20 @@ To customize the `container` utility in v4, extend it using the `@utility` direc
379
379
}
380
380
```
381
381
382
-
### Preflight changes
382
+
### Default border color
383
383
384
-
We've made a couple small changes to the base styles in Preflight in v4:
384
+
In v3, the `border-*` and `divide-*` utilities used your configured `gray-200` color by default. We've changed this to `currentColor` in v4 to make Tailwind less opinionated and match browser defaults.
385
385
386
-
#### New default border color
386
+
To update your project for this change, make sure you specify acolor anywhere you're using a `border-*` or `divide-*` utility utility:
387
387
388
-
In v3, borders used your configured `gray-200` color by default. We've updated this in v4 to be just `currentColor`, which matches the default behavior of all browsers.
388
+
```html
389
+
<!-- [!code classes:border-gray-200] -->
390
+
<div class="border border-gray-200px-2py-3 ...">
391
+
<!-- ... -->
392
+
</div>
393
+
```
389
394
390
-
To update your project for this change, make sure you're using a border color utility anywhere you're using the `border` utility, or add these lines of CSS to your project to preserve the v3 behavior:
395
+
Alternatively, add these base styles to your project to preserve the v3 behavior:
391
396
392
397
```css
393
398
/* [!code filename:CSS] */
@@ -402,6 +407,45 @@ To update your project for this change, make sure you're using a border color ut
402
407
}
403
408
```
404
409
410
+
### Default ring width and color
411
+
412
+
We've changed the width of the `ring` utility from 3px to 1px and changed the default color from `blue-500` to `currentColor` to make things more consistent the `border-*`, `divide-*`, and `outline-*` utilities.
413
+
414
+
To update your project for these changes, replace any use of `ring` with `ring-3`:
Alternatively, add these theme variables to your CSS to preserve the v3 behavior:
434
+
435
+
```css
436
+
/* [!code filename:CSS] */
437
+
@theme {
438
+
--default-ring-width: 3px;
439
+
--default-ring-color: var(--color-blue-500);
440
+
}
441
+
```
442
+
443
+
Note though that these variables are only supported for compatibility reasons, and are not considered idiomatic usage of Tailwind CSS v4.0.
444
+
445
+
### Preflight changes
446
+
447
+
We've made a couple small changes to the base styles in Preflight in v4:
448
+
405
449
#### New default placeholder color
406
450
407
451
In v3, placeholder text used your configured `gray-400` color by default. We've simplified this in v4 to just use the current text color at 50% opacity.
0 commit comments