Skip to content

backgrounds: keep both axes in a keyword+length bg-position bracket#171

Merged
samoht merged 1 commit into
mainfrom
bg-position-keyword-length
Jul 26, 2026
Merged

backgrounds: keep both axes in a keyword+length bg-position bracket#171
samoht merged 1 commit into
mainfrom
bg-position-keyword-length

Conversation

@samoht

@samoht samoht commented Jul 26, 2026

Copy link
Copy Markdown
Owner

A two-axis bg-position-[…] value that mixed a keyword edge with a length (e.g. bg-position-[center_-100px]) fell back to a bare center, silently dropping the length. parse_bracket_position now parses each axis as a keyword edge (left/right/top/bottom/center, normalised to its percentage) or a length, so bg-position-[center_-100px] emits background-position: 50% -100px.

parse_bracket_position accepted a two-axis value only when both axes were a
length or percentage, so bg-position-[center_-100px] fell back to a bare
"center", dropping the -100px. Parse each axis as a keyword edge
(left/right/top/bottom/center, normalised to its percentage) or a length.
@samoht
samoht merged commit e060ab6 into main Jul 26, 2026
2 checks passed
@samoht
samoht deleted the bg-position-keyword-length branch July 26, 2026 20:46
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