Skip to content

Commit

Permalink
Use correct values for float-start/end and clear-start/end (#15261)
Browse files Browse the repository at this point in the history
This PR fixes the `float-start/end` and `clear-start/end` utilities to
use `inline-start` and `inline-end` instead of `start` and `end`, which
aren't valid values.

Fixes #15255.

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
  • Loading branch information
adamwathan and adamwathan authored Dec 2, 2024
1 parent 9736506 commit e9426d0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
36 changes: 18 additions & 18 deletions packages/tailwindcss/src/utilities.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1360,26 +1360,26 @@ test('row-end', async () => {
test('float', async () => {
expect(await run(['float-start', 'float-end', 'float-right', 'float-left', 'float-none']))
.toMatchInlineSnapshot(`
".float-end {
float: end;
}
".float-end {
float: inline-end;
}
.float-left {
float: left;
}
.float-left {
float: left;
}
.float-none {
float: none;
}
.float-none {
float: none;
}
.float-right {
float: right;
}
.float-right {
float: right;
}
.float-start {
float: start;
}"
`)
.float-start {
float: inline-start;
}"
`)
expect(
await run([
'float',
Expand Down Expand Up @@ -1413,7 +1413,7 @@ test('clear', async () => {
}
.clear-end {
clear: end;
clear: inline-end;
}
.clear-left {
Expand All @@ -1429,7 +1429,7 @@ test('clear', async () => {
}
.clear-start {
clear: start;
clear: inline-start;
}"
`)
expect(
Expand Down
8 changes: 4 additions & 4 deletions packages/tailwindcss/src/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -719,17 +719,17 @@ export function createUtilities(theme: Theme) {
/**
* @css `float`
*/
staticUtility('float-start', [['float', 'start']])
staticUtility('float-end', [['float', 'end']])
staticUtility('float-start', [['float', 'inline-start']])
staticUtility('float-end', [['float', 'inline-end']])
staticUtility('float-right', [['float', 'right']])
staticUtility('float-left', [['float', 'left']])
staticUtility('float-none', [['float', 'none']])

/**
* @css `clear`
*/
staticUtility('clear-start', [['clear', 'start']])
staticUtility('clear-end', [['clear', 'end']])
staticUtility('clear-start', [['clear', 'inline-start']])
staticUtility('clear-end', [['clear', 'inline-end']])
staticUtility('clear-right', [['clear', 'right']])
staticUtility('clear-left', [['clear', 'left']])
staticUtility('clear-both', [['clear', 'both']])
Expand Down

0 comments on commit e9426d0

Please sign in to comment.