v3.1.0
We just released Tailwind CSS v3.1 — the first new feature release since v3.0 came out last year!
Read the announcement post for all the details, and watch the YouTube video for a tour of some of the highlights.
Added
- Support PostCSS
Documentnodes (#7291) - Add
text-startandtext-endutilities (#6656) - Support customizing class name when using
darkMode: 'class'(#5800) - Add
--polloption to the CLI (#7725) - Add new
border-spacingutilities (#7102) - Add
enabledvariant (#7905) - Add TypeScript types for the
tailwind.config.jsfile (#7891) - Add
backdropvariant (#7924, #8526) - Add
grid-flow-denseutility (#8193) - Add
mix-blend-plus-lighterutility (#8288) - Add arbitrary variants (#8299)
- Add experimental
matchVariantAPI (#8310, 34fd0fb8) - Add
prefers-contrastmedia query variants (#8410) - Add opacity support when referencing colors with
themefunction (#8416) - Add
postcss-importsupport to the CLI (#8437) - Add
optionalvariant (#8486) - Add
<alpha-value>placeholder support for custom colors (#8501)
Fixed
- Types: allow for arbitrary theme values (for 3rd party plugins) (#7926)
- Don’t split vars with numbers in them inside arbitrary values (#8091)
- Require matching prefix when detecting negatives (#8121)
- Handle duplicate At Rules without children (#8122)
- Allow arbitrary values with commas in
@apply(#8125) - Fix intellisense for plugins with multiple
@applyrules (#8213) - Improve type detection for arbitrary color values (#8201)
- Support PostCSS config options in config file in CLI (#8226)
- Remove default
[hidden]style in preflight (#8248) - Only check selectors containing base apply candidates for circular dependencies (#8222)
- Rewrite default class extractor (#8204)
- Move
importantselector to the front when@apply-ing selector-modifying variants in custom utilities (#8313) - Error when registering an invalid custom variant (#8345)
- Create tailwind.config.cjs file in ESM package when running init (#8363)
- Fix
matchVariantsthat use at-rules and placeholders (#8392) - Improve types of the
tailwindcss/plugin(#8400) - Allow returning parallel variants from
addVariantormatchVariantcallback functions (#8455) - Try using local
postcssinstallation first in the CLI (#8270) - Allow default ring color to be a function (#7587)
- Don't inherit
tovalue from parent gradients (#8489) - Remove process dependency from log functions (#8530)
- Ensure we can use
@import 'tailwindcss/...'without node_modules (#8537)