What’s New

Tailwind CSS

Frameworks & Libraries

A utility-first CSS framework for rapid UI development.

Latest v4.3.3 · by Tailwind LabsWebsitetailwindlabs/tailwindcss

Changelog

v4.3.3

Fixed
  • Support `--watch --poll[=ms]` in `@tailwindcss/cli` when filesystem events are unreliable or unavailable
  • Match arbitrary hex colors against theme colors case-insensitively during canonicalization (e.g. `bg-[#fff]` and `bg-[#FFF]` → `bg-white`)
  • Prevent Preflight from overriding Firefox's native `iframe:focus-visible` outline styles
  • Ensure `theme('colors.foo')` in JS plugins resolves correctly when both `--color-foo` and `--color-foo-bar` exist
  • Ensure fractional opacity modifiers work with named shadow sizes like `shadow-sm/12.5`, `text-shadow-sm/12.5`, `drop-shadow-sm/12.5`, and `inset-shadow-sm/12.5`
  • Parse selectors like `[data-foo]div` as two selectors instead of one
  • Ensure `@tailwindcss/postcss` rebuilds when a preprocessor like Sass changes the input CSS without changing the input file on disk
  • Ensure CSS nesting is handled even when Lightning CSS isn't run, such as in `@tailwindcss/browser` and Tailwind Play
  • Prevent achromatic theme colors from shifting hue when mixed in polar color spaces like `oklch`
  • Ensure `--spacing(0)` is optimized to `0px` instead of `0` so it remains a `<length>` when used in `calc(…)`
  • Load `@parcel/watcher` only when needed in `@tailwindcss/cli --watch` mode, so one-off builds and `--watch --poll` work when `@parcel/watcher` can't be loaded
  • Use explicit platform fonts instead of `system-ui` and `ui-sans-serif` so CJK text respects the page's `lang` attribute on Windows
  • Prevent `@tailwindcss/upgrade` from rewriting ignored files when run from a subdirectory
  • Ensure earlier `@source` rules pointing to nested files are scanned when later `@source` rules point to files in parent folders
  • Prevent `@tailwindcss/vite` from triggering full page reloads when scanned files are processed by Vite but haven't been loaded as modules yet
Fixed
  • Support --watch --poll[=ms] in @tailwindcss/cli when filesystem events are unreliable or unavailable (#20297)
  • Canonicalization: match arbitrary hex colors against theme colors case-insensitively (e.g. bg-[#fff] and bg-[#FFF]bg-white) (#20298)
  • Prevent Preflight from overriding Firefox's native iframe:focus-visible outline styles (#20292)
  • Ensure theme('colors.foo') in JS plugins resolves correctly when both --color-foo and --color-foo-bar exist (#20299)
  • Ensure fractional opacity modifiers work with named shadow sizes like shadow-sm/12.5, text-shadow-sm/12.5, drop-shadow-sm/12.5, and inset-shadow-sm/12.5 (#20302)
  • Parse selectors like [data-foo]div as two selectors instead of one (#20303)
  • Ensure @tailwindcss/postcss rebuilds when a preprocessor like Sass changes the input CSS without changing the input file on disk (#20310)
  • Ensure CSS nesting is handled even when Lightning CSS isn't run, such as in @tailwindcss/browser and Tailwind Play (#20124)
  • Prevent achromatic theme colors from shifting hue when mixed in polar color spaces like oklch (#20314)
  • Ensure --spacing(0) is optimized to 0px instead of 0 so it remains a <length> when used in calc(…) (#20319)
  • Load @parcel/watcher only when needed in @tailwindcss/cli --watch mode, so one-off builds and --watch --poll work when @parcel/watcher can't be loaded (#20325)
  • Use explicit platform fonts instead of system-ui and ui-sans-serif so CJK text respects the page's lang attribute on Windows (#20318)
  • Prevent @tailwindcss/upgrade from rewriting ignored files when run from a subdirectory (#20329)
  • Ensure earlier @source rules pointing to nested files are scanned when later @source rules point to files in parent folders (#20335)
  • Prevent @tailwindcss/vite from triggering full page reloads when scanned files are processed by Vite but haven't been loaded as modules yet (#20336)

v4.3.2

Fixed
  • Support bare spacing values for auto-rows-* and auto-cols-* utilities (e.g. auto-rows-12 and auto-cols-16)
  • Prevent @tailwindcss/cli in --watch mode from crashing on Windows when @source points to a directory that doesn't exist
  • Prevent @tailwindcss/vite from crashing in Deno v2.8.x when context.parentURL is not a valid URL
  • Ensure @tailwindcss/cli in --watch mode rebuilds when the input CSS file changes in an ignored directory
  • Allow @variant rules used in addBase(…) to use custom variants defined later
  • Prevent @tailwindcss/vite from crashing during HMR when scanned files or directories are deleted
  • Generate font-size instead of color declarations for text-[--spacing(…)]
  • Prevent @source patterns from scanning unrelated sibling files and folders
  • Extract class candidates adjacent to Template Toolkit delimiters like %]…[% in .tt, .tt2, and .tx files
  • Extract class candidates from conditional Maud syntax like p.text-black[condition]
  • Prevent @position-try rules from triggering unknown at-rule warnings when optimizing CSS
  • Support class suggestions for named opacity modifiers from --opacity theme values
  • Prevent type errors in @tailwindcss/postcss when used with newer PostCSS patch releases
Fixed
  • Support bare spacing values for auto-rows-* and auto-cols-* utilities (e.g. auto-rows-12 and auto-cols-16) (#20229)
  • Prevent @tailwindcss/cli in --watch mode from crashing on Windows when @source points to a directory that doesn't exist (#20242)
  • Prevent @tailwindcss/vite from crashing in Deno v2.8.x when context.parentURL is not a valid URL (#20245)
  • Ensure @tailwindcss/cli in --watch mode rebuilds when the input CSS file changes in an ignored directory (#20246)
  • Allow @variant rules used in addBase(…) to use custom variants defined later (#20247)
  • Prevent @tailwindcss/vite from crashing during HMR when scanned files or directories are deleted (#20259)
  • Generate font-size instead of color declarations for text-[--spacing(…)] (#20260)
  • Prevent @source patterns from scanning unrelated sibling files and folders (#20263)
  • Extract class candidates adjacent to Template Toolkit delimiters like %]…[% in .tt, .tt2, and .tx files (#20269)
  • Extract class candidates from conditional Maud syntax like p.text-black[condition] (#20269)
  • Prevent @position-try rules from triggering unknown at-rule warnings when optimizing CSS (#20277)
  • Support class suggestions for named opacity modifiers from --opacity theme values (#20287)
  • Prevent type errors in @tailwindcss/postcss when used with newer PostCSS patch releases (#20289)

v4.3.1

Added
  • Add `--silent` option to suppress output in `@tailwindcss/cli`
Changed
  • Generate `0` instead of `calc(var(--spacing) * 0)` for spacing utilities like `m-0` and `left-0`
  • Generate `var(--spacing)` instead of `calc(var(--spacing) * 1)` for spacing utilities like `m-1` and `left-1`
Fixed
  • Remove deprecation warnings by using `Module#registerHooks` instead of `Module#register` on Node 26+
  • Don't crash when plugin utilities throw for unsupported values during canonicalization
  • Allow `@apply` to be used with CSS mixins
  • Ensure `not-*` correctly negates `@container` queries, including `style(…)` queries
  • Ensure `drop-shadow-*` color utilities work with custom shadow values containing `calc(…)`
  • Fix 'Sourcemap is likely to be incorrect' warnings when using `@tailwindcss/vite`
  • Ensure `@tailwindcss/webpack` can be installed in Rspack projects without requiring `webpack` as a peer dependency
  • Don't suggest invalid `calc(…)` expressions during canonicalization
  • Avoid suggesting large spacing-scale values for arbitrary lengths during canonicalization
  • Ensure `@tailwindcss/cli` in `--watch` mode recovers when a tracked dependency is deleted and restored
  • Ensure standalone `@tailwindcss/cli` binaries are ignored when scanning for class candidates
  • Ensure class candidates are extracted from Twig `addClass(…)` and `removeClass(…)` calls
  • Don't crash in the Ruby or Vue preprocessors when scanning files containing invalid UTF-8 bytes
  • Allow `@variant` to be used inside `addBase`
  • Ensure `@source` globs with symlinks are preserved
  • Ensure later `@source` rules can re-include files excluded by earlier `@source not` rules
  • Don't migrate empty class rules to invalid `@utility` rules during upgrade
  • Ensure transitions between `inset-shadow-none` and other inset shadows work correctly
  • Ensure explicitly referenced `@source` directories are scanned even when ignored by git
  • Ensure `@source` globs ending in `**/*` preserve dynamic path segments to avoid scanning too many files
  • Don't fold `calc(…)` divisions when the result would require high precision during canonicalization
  • Serve ESM type declarations to ESM importers of `@tailwindcss/postcss`
Added
  • Add --silent option to suppress output in @tailwindcss/cli (#20100)
Fixed
  • Remove deprecation warnings by using Module#registerHooks instead of Module#register on Node 26+ (#20028)
  • Canonicalization: don't crash when plugin utilities throw for unsupported values (#20052)
  • Allow @apply to be used with CSS mixins (#19427)
  • Ensure not-* correctly negates @container queries, including style(…) queries (#20059)
  • Ensure drop-shadow-* color utilities work with custom shadow values containing calc(…) (#20080)
  • Fix 'Sourcemap is likely to be incorrect' warnings when using @tailwindcss/vite (#20103)
  • Ensure @tailwindcss/webpack can be installed in Rspack projects without requiring webpack as a peer dependency (#20027)
  • Canonicalization: don't suggest invalid calc(…) expressions (e.g. px-[calc(1rem+0px)]px-[calc(1rem+0)]) (#20127)
  • Canonicalization: avoid suggesting large spacing-scale values for arbitrary lengths (e.g. left-[99999px]left-[99999px], not left-24999.75) (#20130)
  • Ensure @tailwindcss/cli in --watch mode recovers when a tracked dependency is deleted and restored (#20137)
  • Ensure standalone @tailwindcss/cli binaries are ignored when scanning for class candidates (#20139)
  • Ensure class candidates are extracted from Twig addClass(…) and removeClass(…) calls (#20198)
  • Don't crash in the Ruby or Vue preprocessors when scanning files containing invalid UTF-8 bytes (#19588)
  • Allow @variant to be used inside addBase (#19480)
  • Ensure @source globs with symlinks are preserved (#20203)
  • Ensure later @source rules can re-include files excluded by earlier @source not rules (#20203)
  • Upgrade: don't migrate empty class rules to invalid @utility rules (#20205)
  • Ensure transitions between inset-shadow-none and other inset shadows work correctly (#20208)
  • Ensure explicitly referenced @source directories are scanned even when ignored by git (#20214)
  • Ensure @source globs ending in **/* preserve dynamic path segments to avoid scanning too many files (#20217)
  • Canonicalization: don't fold calc(…) divisions when the result would require high precision (e.g. w-[calc(100%/3.5)]w-[calc(100%/3.5)], not w-[28.571428571428573%]) (#20221)
  • Serve ESM type declarations to ESM importers of @tailwindcss/postcss (#20228)
Changed
  • Generate 0 instead of calc(var(--spacing) * 0) for spacing utilities like m-0 and left-0 (#20196)
  • Generate var(--spacing) instead of calc(var(--spacing) * 1) for spacing utilities like m-1 and left-1 (#20196)

v4.3.0

Added
  • Add `@container-size` utility
  • Add `scrollbar-{auto,thin,none}` utilities for `scrollbar-width`, and `scrollbar-thumb-*` / `scrollbar-track-*` color utilities for `scrollbar-color`
  • Add `scrollbar-gutter-*` utilities
  • Add `zoom-*` utilities
  • Add `tab-*` utilities
  • Allow using `@variant` with stacked variants (e.g. `@variant hover:focus { … }`)
  • Allow using `@variant` with compound variants (e.g. `@variant hover, focus { … }`)
  • Support `--default(…)` in `--value(…)` and `--modifier(…)` for functional `@utility` definitions
Fixed
  • Ensure `@plugin` resolves package JavaScript entries instead of browser CSS entries when using `@tailwindcss/vite`
  • Fix relative `@import` and `@plugin` paths resolving from the wrong directory when using `@tailwindcss/vite`
  • Ensure CSS files containing `@variant` are processed by `@tailwindcss/vite`
  • Resolve imports relative to `base` when `result.opts.from` is not provided when using `@tailwindcss/postcss`
  • Canonicalization: preserve significant `_` whitespace in arbitrary values
  • Canonicalization: add parentheses when removing whitespace from arbitrary values would hurt readability
  • Canonicalization: preserve the original unit in arbitrary values instead of normalizing to base units
  • Canonicalization: migrate arbitrary `:has()` variants from `[&:has(…)]` to `has-[…]`
  • Upgrade: don't migrate inline `style` attributes
  • Allow multiple `@utility` definitions with the same name but different value types
  • Export missing `PluginWithConfig` type from `tailwindcss/plugin` to fix errors when inferring plugin config types
  • Ensure `start` and `end` legacy utilities without values do not generate CSS
  • Ensure `--value(…)` is required in functional `@utility` definitions
  • Canonicalization: preserve required whitespace around operators in negated arbitrary values
Added
  • Add @container-size utility (#18901)
  • Add scrollbar-{auto,thin,none} utilities for scrollbar-width, and scrollbar-thumb-* / scrollbar-track-* color utilities for scrollbar-color (#19981, #20019)
  • Add scrollbar-gutter-* utilities (#20018)
  • Add zoom-* utilities (#20020)
  • Add tab-* utilities (#20022)
  • Allow using @variant with stacked variants (e.g. @variant hover:focus { … }) (#19996)
  • Allow using @variant with compound variants (e.g. @variant hover, focus { … }) (#19996)
  • Support --default(…) in --value(…) and --modifier(…) for functional @utility definitions (#19989)
Fixed
  • Ensure @plugin resolves package JavaScript entries instead of browser CSS entries when using @tailwindcss/vite (#19949)
  • Fix relative @import and @plugin paths resolving from the wrong directory when using @tailwindcss/vite (#19965)
  • Ensure CSS files containing @variant are processed by @tailwindcss/vite (#19966)
  • Resolve imports relative to base when result.opts.from is not provided when using @tailwindcss/postcss (#19980)
  • Canonicalization: preserve significant _ whitespace in arbitrary values (#19986)
  • Canonicalization: add parentheses when removing whitespace from arbitrary values would hurt readability (e.g. w-[calc(100%---spacing(60))]w-[calc(100%-(--spacing(60)))]) (#19986)
  • Canonicalization: preserve the original unit in arbitrary values instead of normalizing to base units (e.g. -mt-[20in]mt-[-20in], not mt-[-1920px]) (#19988)
  • Canonicalization: migrate arbitrary :has() variants from [&:has(…)] to has-[…] (#19991)
  • Upgrade: don’t migrate inline style attributes (e.g. style="flex-grow: 1"style="flex-grow: 1", not style="grow: 1") (#19918)
  • Allow multiple @utility definitions with the same name but different value types (#19777)
  • Export missing PluginWithConfig type from tailwindcss/plugin to fix errors when inferring plugin config types (#19707)
  • Ensure start and end legacy utilities without values do not generate CSS (#20003)
  • Ensure --value(…) is required in functional @utility definitions (#20005)
  • Canonicalization: preserve required whitespace around operators in negated arbitrary values (e.g. -left-[(var(--a)+var(--b))]) (#20011)

v4.2.4

Fixed
  • Ensure imports in @import and @plugin still resolve correctly when using Vite aliases in @tailwindcss/vite
Fixed
  • Ensure imports in @import and @plugin still resolve correctly when using Vite aliases in @tailwindcss/vite (#19947)

v4.2.3

Fixed
  • Improve canonicalizations for tracking-* utilities by preferring non-negative utilities
  • Fix crash due to invalid characters in candidate exceeding valid unicode code point range
  • Ensure query params in imports are considered unique resources when using @tailwindcss/webpack
  • Collapse arbitrary values into shorthand utilities such as px-[1.2rem] py-[1.2rem] into p-[1.2rem]
  • Collapse border-{t,b}-* into border-y-*, border-{l,r}-* into border-x-*, and border-{t,r,b,l}-* into border-*
  • Collapse scroll-m{t,b}-* into scroll-my-*, scroll-m{l,r}-* into scroll-mx-*, and scroll-m{t,r,b,l}-* into scroll-m-*
  • Collapse scroll-p{t,b}-* into scroll-py-*, scroll-p{l,r}-* into scroll-px-*, and scroll-p{t,r,b,l}-* into scroll-p-*
  • Collapse overflow-{x,y}-* into overflow-*
  • Collapse overscroll-{x,y}-* into overscroll-*
  • Read from --placeholder-color instead of --background-color for placeholder-* utilities
  • Ensure files are not emptied out when killing the upgrade process while it is running
  • Use config.content when migrating from Tailwind CSS v3 to Tailwind CSS v4
  • Never migrate files that are ignored by git
  • Add .env and .env.* to default ignored content files
  • Migrate overflow-ellipsis into text-ellipsis
  • Migrate start-full, start-auto, start-px, and start-<number> into inset-s-full, inset-s-auto, inset-s-px, and inset-s-<number> as well as negative versions
  • Migrate end-full, end-auto, end-px, and end-<number> into inset-e-full, inset-e-auto, inset-e-px, and inset-e-<number> as well as negative versions
  • Move the - sign inside the arbitrary value -left-[9rem] into left-[-9rem]
  • Move the - sign outside the arbitrary value ml-[calc(-1*var(--width))] into -ml-(--width)
  • Improve performance when scanning JSONL / NDJSON files
  • Support NODE_PATH environment variable in standalone CLI
Fixed
  • Canonicalization: improve canonicalizations for tracking-* utilities by preferring non-negative utilities (e.g. -tracking-tightertracking-wider) (#19827)
  • Fix crash due to invalid characters in candidate (exceeding valid unicode code point range) (#19829)
  • Ensure query params in imports are considered unique resources when using @tailwindcss/webpack (#19723)
  • Canonicalization: collapse arbitrary values into shorthand utilities (e.g. px-[1.2rem] py-[1.2rem]p-[1.2rem]) (#19837)
  • Canonicalization: collapse border-{t,b}-* into border-y-*, border-{l,r}-* into border-x-*, and border-{t,r,b,l}-* into border-* (#19842)
  • Canonicalization: collapse scroll-m{t,b}-* into scroll-my-*, scroll-m{l,r}-* into scroll-mx-*, and scroll-m{t,r,b,l}-* into scroll-m-* (#19842)
  • Canonicalization: collapse scroll-p{t,b}-* into scroll-py-*, scroll-p{l,r}-* into scroll-px-*, and scroll-p{t,r,b,l}-* into scroll-p-* (#19842)
  • Canonicalization: collapse overflow-{x,y}-* into overflow-* (#19842)
  • Canonicalization: collapse overscroll-{x,y}-* into overscroll-* (#19842)
  • Read from --placeholder-color instead of --background-color for placeholder-* utilities (#19843)
  • Upgrade: ensure files are not emptied out when killing the upgrade process while it's running (#19846)
  • Upgrade: use config.content when migrating from Tailwind CSS v3 to Tailwind CSS v4 (#19846)
  • Upgrade: never migrate files that are ignored by git (#19846)
  • Add .env and .env.* to default ignored content files (#19846)
  • Canonicalization: migrate overflow-ellipsis into text-ellipsis (#19849)
  • Canonicalization: migrate start-fullinset-s-full, start-autoinset-s-auto, start-pxinset-s-px, and start-<number>inset-s-<number> as well as negative versions (#19849)
  • Canonicalization: migrate end-fullinset-e-full, end-autoinset-e-auto, end-pxinset-e-px, and end-<number>inset-e-<number> as well as negative versions (#19849)
  • Canonicalization: move the - sign inside the arbitrary value -left-[9rem]left-[-9rem] (#19858)
  • Canonicalization: move the - sign outside the arbitrary value ml-[calc(-1*var(--width))]-ml-(--width) (#19858)
  • Improve performance when scanning JSONL / NDJSON files (#19862)
  • Support NODE_PATH environment variable in standalone CLI (#19617)

v4.2.2

Added
  • Support Vite 8 in @tailwindcss/vite
Fixed
  • Don't crash when candidates contain prototype properties like row-constructor
  • Canonicalize calc(var(--spacing)*…) expressions into --spacing(…)
  • Fix crash in canonicalization step when handling utilities containing @property at-rules
  • Skip full reload for server only modules scanned by client CSS when using @tailwindcss/vite
  • Improve canonicalization for bare values exceeding default spacing scale suggestions
  • Fix canonicalization resulting in empty list
Added
  • Support Vite 8 in @tailwindcss/vite (#19790)
Fixed
  • Don't crash when candidates contain prototype properties like row-constructor (#19725)
  • Canonicalize calc(var(--spacing)*…) expressions into --spacing(…) (#19769)
  • Fix crash in canonicalization step when handling utilities containing @property at-rules (e.g. shadow-sm border) (#19727)
  • Skip full reload for server only modules scanned by client CSS when using @tailwindcss/vite (#19745)
  • Improve canonicalization for bare values exceeding default spacing scale suggestions (e.g. w-1234 h-1234size-1234) (#19809)
  • Fix canonicalization resulting in empty list (e.g. w-5 h-5 size-5'' instead of size-5) (#19812)

v4.2.1

Fixed
  • Allow trailing dash in functional utility names for backwards compatibility
  • Properly detect classes containing . characters within curly braces in MDX files
Fixed
  • Allow trailing dash in functional utility names for backwards compatibility (#19696)
  • Properly detect classes containing . characters within curly braces in MDX files (#19711)

v4.2.0

Added
  • Add mauve, olive, mist, and taupe color palettes to the default theme
  • Add @tailwindcss/webpack package to run Tailwind CSS as a webpack plugin
  • Add pbs-* and pbe-* utilities for padding-block-start and padding-block-end
  • Add mbs-* and mbe-* utilities for margin-block-start and margin-block-end
  • Add scroll-pbs-* and scroll-pbe-* utilities for scroll-padding-block-start and scroll-padding-block-end
  • Add scroll-mbs-* and scroll-mbe-* utilities for scroll-margin-block-start and scroll-margin-block-end
  • Add border-bs-* and border-be-* utilities for border-block-start and border-block-end
  • Add inline-*, min-inline-*, max-inline-* utilities for inline-size, min-inline-size, and max-inline-size
  • Add block-*, min-block-*, max-block-* utilities for block-size, min-block-size, and max-block-size
  • Add inset-s-*, inset-e-*, inset-bs-*, inset-be-* utilities for inset-inline-start, inset-inline-end, inset-block-start, and inset-block-end
  • Add font-features-* utility for font-feature-settings
Fixed
  • Prevent double @supports wrapper for color-mix values
  • Allow whitespace around @source inline() argument
  • Emit comment when source maps are saved to files when using @tailwindcss/cli
  • Detect utilities containing capital letters followed by numbers
  • Fix class extraction for Rails' strict locals
  • Align @utility name validation with Oxide scanner rules
  • Fix infinite loop when using @variant inside @custom-variant
  • Allow multiples of .25 in aspect-* fractions (e.g. aspect-8.5/11)
  • Ensure changes to external files listed via @source trigger a full page reload when using @tailwindcss/vite
  • Improve performance of Oxide scanner in bigger projects by reducing file system walks
  • Ensure import aliases in Astro v5 work without crashing when using @tailwindcss/vite
  • Allow escape characters in @utility names to improve support with formatters such as Biome
  • Fix incorrect canonicalization results when canonicalizing multiple times
  • Add .jj to default ignored content directories
Deprecated
  • Deprecate start-* and end-* utilities in favor of inset-s-* and inset-e-* utilities
Added
  • Add mauve, olive, mist, and taupe color palettes to the default theme (#19627)
  • Add @tailwindcss/webpack package to run Tailwind CSS as a webpack plugin (#19610)
  • Add pbs-* and pbe-* utilities for padding-block-start and padding-block-end (#19601)
  • Add mbs-* and mbe-* utilities for margin-block-start and margin-block-end (#19601)
  • Add scroll-pbs-* and scroll-pbe-* utilities for scroll-padding-block-start and scroll-padding-block-end (#19601)
  • Add scroll-mbs-* and scroll-mbe-* utilities for scroll-margin-block-start and scroll-margin-block-end (#19601)
  • Add border-bs-* and border-be-* utilities for border-block-start and border-block-end (#19601)
  • Add inline-*, min-inline-*, max-inline-* utilities for inline-size, min-inline-size, and max-inline-size (#19612)
  • Add block-*, min-block-*, max-block-* utilities for block-size, min-block-size, and max-block-size (#19612)
  • Add inset-s-*, inset-e-*, inset-bs-*, inset-be-* utilities for inset-inline-start, inset-inline-end, inset-block-start, and inset-block-end (#19613)
  • Add font-features-* utility for font-feature-settings (#19623)
Fixed
  • Prevent double @supports wrapper for color-mix values (#19450)
  • Allow whitespace around @source inline() argument (#19461)
  • Emit comment when source maps are saved to files when using @tailwindcss/cli (#19447)
  • Detect utilities containing capital letters followed by numbers (#19465)
  • Fix class extraction for Rails' strict locals (#19525)
  • Align @utility name validation with Oxide scanner rules (#19524)
  • Fix infinite loop when using @variant inside @custom-variant (#19633)
  • Allow multiples of .25 in aspect-* fractions (e.g. aspect-8.5/11) (#19688)
  • Ensure changes to external files listed via @source trigger a full page reload when using @tailwindcss/vite (#19670)
  • Improve performance of Oxide scanner in bigger projects by reducing file system walks (#19632)
  • Ensure import aliases in Astro v5 work without crashing when using @tailwindcss/vite (#19677)
  • Allow escape characters in @utility names to improve support with formatters such as Biome (#19626)
  • Fix incorrect canonicalization results when canonicalizing multiple times (#19675)
  • Add .jj to default ignored content directories (#19687)
Deprecated
  • Deprecate start-* and end-* utilities in favor of inset-s-* and inset-e-* utilities (#19613)

v4.1.18

Fixed
  • Ensure validation of source() happens relative to the file it is in
  • Include filename and line numbers in CSS parse errors
  • Skip comments in Ruby files when checking for class names
  • Skip over arbitrary property utilities with a top-level ! in the value
  • Support environment API in @tailwindcss/vite
  • Preserve case of theme keys from JS configs and plugins
  • Write source maps correctly on the CLI when using --watch
  • Handle special defaults like ringColor.DEFAULT in JS configs
  • Improve backwards compatibility for content theme key from JS configs
  • Handle future and experimental config keys
  • Try to canonicalize any arbitrary utility to a bare value
  • Validate candidates similarly to Oxide
  • Canonicalization: combine text-* and leading-* classes
  • Correctly handle duplicate CLI arguments
  • Don't emit color-mix fallback rules inside @keyframes
  • CLI: Don't hang when output is /dev/stdout
Fixed
  • Ensure validation of source(…) happens relative to the file it is in (#19274)
  • Include filename and line numbers in CSS parse errors (#19282)
  • Skip comments in Ruby files when checking for class names (#19243)
  • Skip over arbitrary property utilities with a top-level ! in the value (#19243)
  • Support environment API in @tailwindcss/vite (#18970)
  • Preserve case of theme keys from JS configs and plugins (#19337)
  • Write source maps correctly on the CLI when using --watch (#19373)
  • Handle special defaults (like ringColor.DEFAULT) in JS configs (#19348)
  • Improve backwards compatibility for content theme key from JS configs (#19381)
  • Upgrade: Handle future and experimental config keys (#19344)
  • Try to canonicalize any arbitrary utility to a bare value (#19379)
  • Validate candidates similarly to Oxide (#19397)
  • Canonicalization: combine text-* and leading-* classes (#19396)
  • Correctly handle duplicate CLI arguments (#19416)
  • Don’t emit color-mix fallback rules inside @keyframes (#19419)
  • CLI: Don't hang when output is /dev/stdout (#19421)