Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
31d7a6c
use pretty AST tests
RobinMalfait May 13, 2026
7606284
temp: do not optimize
RobinMalfait May 15, 2026
7b618ed
temp: re-add leading `0`
RobinMalfait May 15, 2026
2ed47c3
temp: ignore invalid variant test
RobinMalfait May 15, 2026
3af3c22
remove unnecessary AST tests
RobinMalfait May 16, 2026
f5f8eaf
check booleans before traversing strings
RobinMalfait May 27, 2026
edba6e4
expose helper functions
RobinMalfait May 27, 2026
d792ea0
expose `cloneAstNode` for Selector AST
RobinMalfait May 27, 2026
ab7142f
expose helpers
RobinMalfait May 28, 2026
b0fced9
add CSS nesting specific tests + oracle implementation
RobinMalfait May 27, 2026
4607858
cache variable extraction
RobinMalfait May 27, 2026
d628466
simplify `optimizeAst` step
RobinMalfait May 27, 2026
605b19a
handle nesting
RobinMalfait Jun 11, 2026
29a8fc2
ensure we don't drop `:is(…)` when the `&` is part of a compound sele…
RobinMalfait Jul 7, 2026
fc5ff22
validate `data-*` and `aria-*` attribute selectors
RobinMalfait May 24, 2026
174d7f7
fix applyVariant on CSS node without rules
RobinMalfait May 28, 2026
f64d56a
update integration tests
RobinMalfait May 28, 2026
34613fd
track original src/dst of rules
RobinMalfait May 29, 2026
cc39ec2
stop handling nested selectors once we reach a declaration
RobinMalfait Jul 6, 2026
00ebf43
ensure we handle `&` in `:nth-child(…)` as well
RobinMalfait Jul 6, 2026
9aacda4
revert: temp: ignore invalid variant test
RobinMalfait May 20, 2026
1d67063
revert: temp: re-add leading `0`
RobinMalfait May 20, 2026
bfb2ba7
revert: temp: do not optimize
RobinMalfait May 20, 2026
2dcfdba
fix typos
RobinMalfait Jul 6, 2026
5e439d8
`-` is a valid char in the hash
RobinMalfait Jul 6, 2026
72c134c
update cli integration tests
RobinMalfait Jul 6, 2026
dc1758a
update changelog
RobinMalfait Jul 7, 2026
9107de5
swap checks, only compute `path` when absolutely necessary
RobinMalfait Jul 7, 2026
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
Prev Previous commit
Next Next commit
fix typos
  • Loading branch information
RobinMalfait committed Jul 7, 2026
commit 2dcfdba2d7edece700f5dc137be0eb2d95710f62
2 changes: 1 addition & 1 deletion packages/tailwindcss/src/ast.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ describe('optimization', () => {
`)
})

it('shoud be possible to change the combinator', async () => {
it('should be possible to change the combinator', async () => {
expect(
optimize(css`
.a {
Expand Down
12 changes: 6 additions & 6 deletions packages/tailwindcss/src/ast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ export function handleNesting(ast: AstNode[]): AstNode[] {
if (ctx.parent.kind === 'complex') {
// `& [after]`
//
// `:is(…)` semantics are note required, because these
// `:is(…)` semantics are not required, because these
// are equivalent:
//
// - `:is(div) [after]` → `div [after]`
Expand Down Expand Up @@ -890,7 +890,7 @@ export function handleNesting(ast: AstNode[]): AstNode[] {
}

// `&*` and `&div` are invalid CSS so these should stay
// invalid. They should be written as `*&` and `&div` instead.
// invalid. They should be written as `*&` and `div&` instead.
if (
ctx.siblings
.slice(ctx.index + 1)
Expand All @@ -905,7 +905,7 @@ export function handleNesting(ast: AstNode[]): AstNode[] {

// `&[after]`
//
// `:is(…)` semantics are note required, because these
// `:is(…)` semantics are not required, because these
// are equivalent:
//
// - `:is(div)[after]` → `div[after]`
Expand Down Expand Up @@ -1063,7 +1063,7 @@ export function handleNesting(ast: AstNode[]): AstNode[] {

// `@layer` is hoistable, but when it's empty then we have to make
// sure that we still emit it because this might influence the layer
// order. We can't just get grid of it.
// order. We can't just get rid of it.
if (node.nodes.length === 0 && !DROPPABLE_IF_EMPTY_AT_RULES.has(node.name)) {
emit(node)
skipExit.add(node)
Expand Down Expand Up @@ -1165,7 +1165,7 @@ export function handleNesting(ast: AstNode[]): AstNode[] {

// Nothing available, setup a fresh node
{
// There are no parent rules or at-rules available, which means taht we
// There are no parent rules or at-rules available, which means that we
// can emit the node as-is.
if (selectorStack.length === 0 && atRuleStack.length === 0) {
let target = result
Expand Down Expand Up @@ -1316,7 +1316,7 @@ const HOISTABLE_AT_RULES = new Set([
'@view-transition',
])

// As set of at-rules that can be dropped if they don't contain any nodes. We
// A set of at-rules that can be dropped if they don't contain any nodes. We
// don't have the distinction between an at-rule with no body, or an at-rule
// with a body that is empty right now.
const DROPPABLE_IF_EMPTY_AT_RULES = new Set([
Expand Down
2 changes: 1 addition & 1 deletion packages/tailwindcss/src/selector-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ export function parse(input: string) {
let node = fun(buffer, [])
buffer = ''

// If the function is not one of the following, we combine all it's
// If the function is not one of the following, we combine all its
// contents into a single value node
if (
node.value !== ':not' &&
Expand Down