Skip to content

style(popups): silence no-duplicate-selectors on intentional re-open#302

Open
jason10lee wants to merge 1 commit into
mainfrom
style/nppm-290-popups-scss-lint
Open

style(popups): silence no-duplicate-selectors on intentional re-open#302
jason10lee wants to merge 1 commit into
mainfrom
style/nppm-290-popups-scss-lint

Conversation

@jason10lee

Copy link
Copy Markdown
Contributor

All Submissions:

Changes proposed in this Pull Request:

Annotates an intentional, documented duplicate selector in newspack-popups so it passes Stylelint's no-duplicate-selectors rule. Near the bottom of src/view/style.scss, the .newspack-lightbox / .newspack-popup__content-wrapper selectors are deliberately re-opened (with an explanatory comment) to keep the wide/full-block alignment rules together with their rationale. This wraps that block in a scoped /* stylelint-disable no-duplicate-selectors */ … /* stylelint-enable */.

Comment-only — no change to the compiled CSS.

This clears the last item in the repo-wide SCSS lint backlog, which is a prerequisite for the NPPM-290 Phase 2 CI SCSS gate (separate, follow-up PR).

Part of NPPM-290: Theme linting: PHP & CSS.

How to test the changes in this Pull Request:

  1. On this branch, run pnpm --filter newspack-popups run lint:scss → it passes (0 problems).
  2. On main, the same command reports 2 no-duplicate-selectors errors in src/view/style.scss.
  3. Confirm the change is comment-only (no compiled-CSS impact): git diff main..HEAD -- plugins/newspack-popups/src/view/style.scss shows only added comment / stylelint-disable / stylelint-enable lines.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully run tests with your changes locally?

Copilot AI review requested due to automatic review settings June 13, 2026 01:28
@jason10lee jason10lee self-assigned this Jun 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates newspack-popups SCSS to explicitly annotate an intentional selector re-open so Stylelint’s no-duplicate-selectors rule doesn’t flag it, without changing the resulting compiled CSS.

Changes:

  • Adds explanatory comments documenting why the .newspack-lightbox / .newspack-popup__content-wrapper selectors are intentionally re-opened.
  • Wraps the deliberate duplicate-selector block in /* stylelint-disable no-duplicate-selectors */ and /* stylelint-enable no-duplicate-selectors */ to keep linting strict elsewhere.

@jason10lee jason10lee marked this pull request as ready for review June 13, 2026 07:07
@jason10lee jason10lee requested a review from a team as a code owner June 13, 2026 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants