Skip to content

Conversation

@chrisdavidmills
Copy link
Contributor

@chrisdavidmills chrisdavidmills commented Jan 21, 2026

Summary

Chrome 144 supports the ::search-text pseudo-element, which allows custom styling to be applied to browser search results; see https://chromestatus.com/feature/5195073796177920.

We already have BCD for ::search-text, however, you can combine ::search-text with the :current pseudo-class to style the currently-highlighted search term on the page. This currently doesn't have any BCD, so I am using this PR to add :current BCD.

I'm assuming it makes sense to put Chrome 144 down for this as well, as previously, there was no context in which :current was supported. However, you might have other opinions on this.

I also thought about putting "partial_implementation": "true" for this, but then again, :current is fully supported in the context it is supported in. It just isn't supported in other contexts.

Test results and supporting details

Related issues

@github-actions github-actions bot added data:css Compat data for CSS features. https://developer.mozilla.org/docs/Web/CSS size:m [PR only] 25-100 LoC changed labels Jan 21, 2026
@github-actions
Copy link
Contributor

Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs).

@caugner
Copy link
Contributor

caugner commented Jan 22, 2026

I'm wondering if we need to add an entry here in order for the collector to test this. @Elchi3 Do you know more?

PS: The collecto has a test for ::search-text, without it being mentioned explicitly in the repo.

@caugner
Copy link
Contributor

caugner commented Jan 23, 2026

I'm wondering if we need to add an entry here in order for the collector to test this. @Elchi3 Do you know more?

PS: The collecto has a test for ::search-text, without it being mentioned explicitly in the repo.

It turns out there is a collector test for :current, but it fails in Chrome 144:

image

Either the feature isn't actually available in Chrome 144, or it is finched, or the collector test is insufficient.

In Chrome 144:

  • CSS.supports("selector(:current())") returns false
  • CSS.supports("selector(::search-text)") returns true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data:css Compat data for CSS features. https://developer.mozilla.org/docs/Web/CSS size:m [PR only] 25-100 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants