nextjs - 💡(How to fix) Fix 'target-current' is not recognized as a valid pseudo-class. Did you mean '::target-current' (pseudo-element) or is this a typo? [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#93418Fetched 2026-05-02 05:26:44
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×2closed ×1commented ×1issue_type_added ×1

Error Message

Expected to not see any warnings of error

Code Example

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 32691
  Available CPU cores: 24
Binaries:
  Node: 25.9.0
  npm: 11.12.1
  Yarn: N/A
  pnpm: 10.33.0
Relevant Packages:
  next: 16.2.4 // Latest available version is detected (16.2.4).
  eslint-config-next: N/A
  react: 19.2.4
  react-dom: 19.2.4
  typescript: 5.9.3
Next.js Config:
  output: N/A
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

in description

To Reproduce

Repo: css-target-current.zip

  1. npm run dev
  2. see errors in console

Current vs. Expected behavior

Expected to not see any warnings of error

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 32691
  Available CPU cores: 24
Binaries:
  Node: 25.9.0
  npm: 11.12.1
  Yarn: N/A
  pnpm: 10.33.0
Relevant Packages:
  next: 16.2.4 // Latest available version is detected (16.2.4).
  eslint-config-next: N/A
  react: 19.2.4
  react-dom: 19.2.4
  typescript: 5.9.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

CSS

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

This feature is newly available: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/:target-current

I think, there should be a way to configure this, to suppres such warnings or to add custom list of specific selectors, to make checks to pass.

In another way, such issues will appear for every selector, or rule, or rule value and etc.

extent analysis

TL;DR

Configure or suppress CSS warnings related to the :target-current pseudo-class to resolve the issue.

Guidance

  • Review the Next.js configuration to see if there are any options to suppress or configure CSS warnings for specific selectors.
  • Check the documentation for the :target-current pseudo-class to understand its usage and potential limitations.
  • Consider adding a custom configuration or plugin to ESLint to handle the new CSS feature and avoid warnings.
  • Verify if there are any open issues or discussions in the Next.js or ESLint communities related to supporting the :target-current pseudo-class.

Notes

The issue seems to be related to the newly introduced :target-current pseudo-class in CSS, which might not be fully supported by the current configuration or tools. Without more information about the specific warnings or errors, it's difficult to provide a more detailed solution.

Recommendation

Apply a workaround by configuring or suppressing CSS warnings related to the :target-current pseudo-class, as it seems to be the most straightforward way to resolve the issue without waiting for an official fix or update.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

nextjs - 💡(How to fix) Fix 'target-current' is not recognized as a valid pseudo-class. Did you mean '::target-current' (pseudo-element) or is this a typo? [1 comments, 2 participants]