Skip to content

Support equals operator in legacy IE alpha() filter syntax - #353

Merged
bartveneman merged 1 commit into
mainfrom
claude/pensive-pascal-cs9ya0
Nov 12, 2026
Merged

bartveneman merged 1 commit into
mainfrom
claude/pensive-pascal-cs9ya0

Conversation

@bartveneman

Copy link
Copy Markdown
Member

Summary

Added support for parsing the equals sign (=) as an operator node in CSS value parsing, enabling proper handling of legacy IE alpha() filter syntax.

Key Changes

  • Added CHAR_EQUALS import to the value node parser
  • Extended parse_operator_node() to recognize = as a valid operator character alongside +, -, *, and /
  • Added test case verifying that alpha(opacity=80) correctly parses with = exposed as an operator node

Implementation Details

The change allows the parser to properly tokenize legacy IE filter functions like alpha(opacity=80) by treating the equals sign as an operator node, consistent with how other mathematical operators are handled. This maintains backward compatibility with older CSS syntax while ensuring proper AST representation.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Package Size Increase

📦 Package 📏 Base Size 📏 Source Size 📈 Size Change
@projectwallace/css-parser 49.3 kB 49.3 kB +1 B

@pkg-pr-new

pkg-pr-new Bot commented Nov 12, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@projectwallace/css-parser@effa81d

commit: effa81d

@bartveneman
bartveneman merged commit 1ef976d into main Nov 12, 2026
17 checks passed
@bartveneman
bartveneman deleted the claude/pensive-pascal-cs9ya0 branch November 12, 2026 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants