Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Nothing yet!
### Fixed

- Don’t break `sibling-*()` functions when used inside `calc(…)` ([#19335](https://github.com/tailwindlabs/tailwindcss/pull/19335))

## [3.4.18] - 2024-10-01

Expand Down
3 changes: 3 additions & 0 deletions src/util/dataTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ function normalizeMathOperatorSpacing(value) {
'repeating-conic-gradient',

'anchor-size',

'sibling-index',
'sibling-count',
]

return value.replace(/(calc|min|max|clamp)\(.+\)/g, (match) => {
Expand Down
2 changes: 2 additions & 0 deletions tests/normalize-data-types.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ let table = [

// Prevent formatting functions that are not math functions
['w-[calc(anchor-size(width)+8px)]', 'w-[calc(anchor-size(width) + 8px)]'],
['w-[calc(sibling-index()*1%)]', 'w-[calc(sibling-index() * 1%)]'],
['w-[calc(sibling-count()*1%)]', 'w-[calc(sibling-count() * 1%)]'],

// Misc
['color(0_0_0/1.0)', 'color(0 0 0/1.0)'],
Expand Down