Skip to content

Commit 3f17dbb

Browse files
authored
Merge branch 'next' into fix/issue-15501
2 parents d5dc879 + 52325a8 commit 3f17dbb

File tree

10 files changed

+179
-179
lines changed

10 files changed

+179
-179
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
- Don’t detect arbitrary properties when preceded by an escape ([#15456](https://github.com/tailwindlabs/tailwindcss/pull/15456))
1414
- Fix incorrectly named `bg-round` and `bg-space` utilities to `bg-repeat-round` to `bg-repeat-space` ([#15462](https://github.com/tailwindlabs/tailwindcss/pull/15462))
1515
- Fix `inset-shadow-*` suggestions in IntelliSense ([#15471](https://github.com/tailwindlabs/tailwindcss/pull/15471))
16+
- Only compile arbitrary values ending in `]` ([#15503](https://github.com/tailwindlabs/tailwindcss/pull/15503))
1617
- Ensure `@utility` is fully processed before it's used ([#15542](https://github.com/tailwindlabs/tailwindcss/pull/15542))
1718

1819
### Changed

crates/oxide/src/cursor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ impl<'a> Cursor<'a> {
6767
}
6868
}
6969

70-
impl<'a> Display for Cursor<'a> {
70+
impl Display for Cursor<'_> {
7171
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7272
let len = self.input.len().to_string();
7373

crates/oxide/src/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ impl<'a> Extractor<'a> {
204204
}
205205

206206
#[inline(always)]
207-
fn split_candidate(candidate: &'a [u8]) -> SplitCandidate {
207+
fn split_candidate(candidate: &'a [u8]) -> SplitCandidate<'a> {
208208
let mut brackets = 0;
209209
let mut idx_end = 0;
210210

crates/oxide/src/scanner/detect_sources.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,8 @@ impl DetectSources {
9595
)
9696
.into_iter();
9797

98-
loop {
99-
// We are only interested in valid entries
100-
let entry = match it.next() {
101-
Some(Ok(entry)) => entry,
102-
_ => break,
103-
};
104-
98+
// We are only interested in valid entries
99+
while let Some(Ok(entry)) = it.next() {
105100
// Ignore known directories that we don't want to traverse into.
106101
if entry.file_type().is_dir() && entry.file_name() == ".git" {
107102
it.skip_current_dir();

packages/@tailwindcss-node/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
},
3939
"dependencies": {
4040
"enhanced-resolve": "^5.17.1",
41-
"jiti": "^2.4.0",
41+
"jiti": "^2.4.2",
4242
"tailwindcss": "workspace:*"
4343
}
4444
}

packages/tailwindcss/src/candidate.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,13 @@ it('should parse a utility with an arbitrary value', () => {
540540
`)
541541
})
542542

543+
it('should not parse a utility with an incomplete arbitrary value', () => {
544+
let utilities = new Utilities()
545+
utilities.functional('bg', () => [])
546+
547+
expect(run('bg-[#0088cc', { utilities })).toMatchInlineSnapshot(`[]`)
548+
})
549+
543550
it('should parse a utility with an arbitrary value with parens', () => {
544551
let utilities = new Utilities()
545552
utilities.functional('bg', () => [])

packages/tailwindcss/src/candidate.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,9 @@ export function* parseCandidate(input: string, designSystem: DesignSystem): Iter
438438
let valueIsArbitrary = startArbitraryIdx !== -1
439439

440440
if (valueIsArbitrary) {
441+
// Arbitrary values must end with a `]`.
442+
if (value[value.length - 1] !== ']') return
443+
441444
let arbitraryValue = decodeArbitraryValue(value.slice(startArbitraryIdx + 1, -1))
442445

443446
// Extract an explicit typehint if present, e.g. `bg-[color:var(--my-var)])`

playgrounds/nextjs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"dependencies": {
1212
"@tailwindcss/postcss": "workspace:^",
1313
"fast-glob": "^3.3.2",
14-
"next": "15.0.3",
14+
"next": "15.1.3",
1515
"react": "^18.3.1",
1616
"react-dom": "^18.3.1",
1717
"tailwindcss": "workspace:^"
@@ -21,7 +21,7 @@
2121
"@types/react": "^18.3.12",
2222
"@types/react-dom": "^18.3.1",
2323
"eslint": "^9.15.0",
24-
"eslint-config-next": "^15.0.3",
24+
"eslint-config-next": "^15.1.3",
2525
"typescript": "^5.5.4"
2626
}
2727
}

playgrounds/v3/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"upgrade": "node scripts/upgrade.mjs"
1010
},
1111
"dependencies": {
12-
"next": "15.0.3",
12+
"next": "15.1.3",
1313
"react": "^18.3.1",
1414
"react-dom": "^18.3.1",
1515
"tailwindcss": "^3"
@@ -20,7 +20,7 @@
2020
"@types/react-dom": "^18.3.1",
2121
"autoprefixer": "^10.4.20",
2222
"eslint": "^9.15.0",
23-
"eslint-config-next": "^15.0.3",
23+
"eslint-config-next": "^15.1.3",
2424
"typescript": "^5.5.4"
2525
}
2626
}

0 commit comments

Comments
 (0)