Skip to content

fix: report attribute offsets for optional and constructed fields - #371

Open
Aschenbath wants to merge 1 commit into
postcss:mainfrom
Aschenbath:fix/50-selector-attribute-offsets-20261125-42bb
Open

Aschenbath wants to merge 1 commit into
postcss:mainfrom
Aschenbath:fix/50-selector-attribute-offsets-20261125-42bb

Conversation

@Aschenbath

Copy link
Copy Markdown
Contributor

Calling offsetOf('value') on [href] currently throws because there is no operator. Offsets also omit leading node whitespace and the space inserted before an unquoted case flag. Return -1 for absent parts and count the characters that serialization actually emits.

Regression coverage includes existence-only selectors, constructed i/s flags, leading whitespace, and quoted empty values.

Validation: the new regression fails on the unmodified baseline; npm test passes (lint, declaration type checks, and full tests with coverage thresholds). Formatting checks pass for the changed files.

AI assistance: implemented and tested with OpenAI Codex.

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.

1 participant