GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix Rule#selectors losing the empty selector by lazerg · Pull Request #2129 · postcss/postcss

Conversation

@lazerg

@lazerg lazerg commented Aug 6, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

8.5.25 made list.split() return [] for an empty string (#2121), so list.comma('') went from [''] to [], and with it Rule#selectors on a rule whose selector is empty.

Plugins read that getter and assume at least one entry. postcss-nested's mergeSelectors() loops over parent.selectors and joins the result back into the child, so an empty parent selector now wipes the child's:

postcss([nested]).process('{ color: red; .dark & { color: blue } }', { from: undefined }).css
// 8.5.24: '{ color: red; } .dark  { color: blue }'
// 8.5.25: '{ color: red; }  { color: blue }'

That is what the Panda CSS reproduction in #2128 hits: the selector is wiped, the block is merged away, and .dark is gone from the tokens layer.

'' is a string, and its last: true split has always been [''], same as the trailing item in list.comma('a, b,'). So this narrows the guard to non-strings, which keeps what #2121 was after (list.split(undefined) no longer throws) without changing the empty-string result.

Fixes #2128

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@lazerg
Fix Rule#selectors losing the empty selector
e57b8c7
@ai

ai commented Aug 6, 2026

Copy link
Copy Markdown
Member

cc @amir-rezaei

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ai
ai merged commit 1493a83 into postcss:main Aug 6, 2026
10 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@ai

ai commented Aug 6, 2026

Copy link
Copy Markdown
Member

Thanks. Released in 8.5.26.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@krassowski krassowski mentioned this pull request Aug 10, 2026
Bump postcss from 8.5.12 to 8.5.29 in /jupyterlab/tests/mock_packages/test-hyphens-underscore jupyterlab/jupyterlab#19239
Closed
@MahinAnowar MahinAnowar mentioned this pull request Aug 13, 2026
Keep empty values in the middle and at the start of list.comma() #2134
Merged
This was referenced Sep 1, 2026
build(deps-dev): bump postcss from 8.5.25 to 8.5.26 dimagi/open-chat-studio#4339
Merged
build(deps-dev): bump postcss from 8.5.22 to 8.5.26 in /components/chat_widget dimagi/open-chat-studio#4348
Merged
This was referenced Oct 22, 2026
[Historical PR] deps(npm): bump postcss from 8.5.25 to 8.5.26 in /web/client rennerdo30/bifrost-proxy#239
Closed
[Historical PR] deps(npm): bump postcss from 8.5.25 to 8.5.26 in /web/server rennerdo30/bifrost-proxy#247
Closed
[Historical PR] deps(npm): bump the npm-minor-patch group across 4 directories with 25 updates rennerdo30/bifrost-proxy#260
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Issue with layer generation in 8.5.25

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@lazerg @ai
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.