Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Wathan <[email protected]>
  • Loading branch information
philipp-spiess and adamwathan authored Oct 24, 2024
1 parent 1b1d7b9 commit 6460bcb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added
### Changed

- No longer require escaping underscores for CSS variables used in `var()` ([#14776](https://github.com/tailwindlabs/tailwindcss/pull/14776))
- Don't convert underscores in the first argument to `var()` to spaces ([#14776](https://github.com/tailwindlabs/tailwindcss/pull/14776))

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion packages/tailwindcss/src/candidate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ it('should not replace `_` inside of `url()`', () => {
`)
})

it('should not replace `_` for the first value of `var()`', () => {
it('should not replace `_` in the first argument to `var()`', () => {
let utilities = new Utilities()
utilities.functional('ml', () => [])

Expand Down
2 changes: 1 addition & 1 deletion packages/tailwindcss/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ describe('compiling CSS', () => {
).toMatchSnapshot()
})

test('unescapes underscores to spaces inside arbitrary values expect for url() and first parameter of var()', async () => {
test('unescapes underscores to spaces inside arbitrary values except for `url()` and first argument of `var()`', async () => {
expect(
await compileCss(
css`
Expand Down
2 changes: 1 addition & 1 deletion packages/tailwindcss/src/utils/decode-arbitrary-value.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as ValueParser from '../value-parser'
import { addWhitespaceAroundMathOperators } from './math-operators'

export function decodeArbitraryValue(input: string): string {
// There's definitely no functions in the input, so bail early
// There are definitely no functions in the input, so bail early
if (input.indexOf('(') === -1) {
return convertUnderscoresToWhitespace(input)
}
Expand Down

0 comments on commit 6460bcb

Please sign in to comment.