Skip to content

Document the ::search-text pseudo - #42870

Merged
chrisdavidmills merged 15 commits into
mdn:mainfrom
chrisdavidmills:search-text-pseudo
Feb 3, 2026
Merged

Document the ::search-text pseudo#42870
chrisdavidmills merged 15 commits into
mdn:mainfrom
chrisdavidmills:search-text-pseudo

Conversation

@chrisdavidmills

Copy link
Copy Markdown
Contributor

Description

Chrome 144 adds support for the ::search-text pseudo-element; see https://chromestatus.com/feature/5195073796177920.

This PR provides documentation for the new feature.

Motivation

Additional details

Related issues and pull requests

@chrisdavidmills
chrisdavidmills requested a review from a team as a code owner January 22, 2026 14:49
@chrisdavidmills
chrisdavidmills requested review from estelle and removed request for a team January 22, 2026 14:49
@github-actions github-actions Bot added Content:CSS Cascading Style Sheets docs size/m [PR only] 51-500 LoC changed labels Jan 22, 2026
@github-actions

github-actions Bot commented Jan 22, 2026

Copy link
Copy Markdown
Contributor

@schenney-chromium schenney-chromium 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.

Thanks again for getting this done.

Comment thread files/en-us/web/css/guides/pseudo-elements/index.md
Comment thread files/en-us/web/css/reference/selectors/_doublecolon_search-text/index.md Outdated
@chrisdavidmills

Copy link
Copy Markdown
Contributor Author

Thanks for the review, @schenney-chromium. Let me know if you spot anything else that needs attention, or give me an "LGTM" if it is ready for the editorial review stage.

@estelle estelle left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I can't find the spec for :current. I found it in a previous selectors working draft https://www.w3.org/TR/2022/WD-selectors-4-20220507/#time-pseudos and found :past and :future in https://w3c.github.io/webvtt/#the-past-and-future-pseudo-classes and, but not :current, so i couldn't provide feedback for the :current page.

Comment thread files/en-us/web/css/reference/selectors/_colon_current/index.md Outdated
Comment thread files/en-us/web/css/reference/selectors/_doublecolon_search-text/index.md Outdated
Comment thread files/en-us/web/css/reference/selectors/_doublecolon_search-text/index.md Outdated
Comment thread files/en-us/web/css/reference/selectors/_doublecolon_search-text/index.md Outdated
Comment thread files/en-us/web/css/reference/selectors/_doublecolon_search-text/index.md Outdated
Comment thread files/en-us/web/css/reference/selectors/pseudo-elements/index.md Outdated
Comment thread files/en-us/web/css/reference/selectors/_doublecolon_search-text/index.md Outdated

@schenney-chromium schenney-chromium 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.

LGTM for technical content, with one editorial nit. Thanks again.

Comment thread files/en-us/web/css/reference/selectors/_doublecolon_search-text/index.md Outdated

@estelle estelle left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The full example should be on the :current page. To avoid duplicating the example, we can out a basic use on the :search-text page if you want (basically, i think the current part needs to be on the current page more than on the search text page).

Comment thread files/en-us/web/css/reference/selectors/_colon_current/index.md Outdated
Comment thread files/en-us/web/css/reference/selectors/_doublecolon_search-text/index.md Outdated
Comment thread files/en-us/web/css/reference/selectors/_colon_current/index.md Outdated

@estelle estelle left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggesting adding "no support" feature via css and adding "tortor" to the list of words to seek under current because the text includes "tortor tortor". Approving b/c the PR works without these changes ;)

Comment thread files/en-us/web/css/reference/selectors/_colon_current/index.md
Comment thread files/en-us/web/css/reference/selectors/_colon_current/index.md Outdated
chrisdavidmills and others added 4 commits February 3, 2026 12:09
Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
…xt/index.md

Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
Comment thread files/en-us/web/css/reference/selectors/_colon_current/index.md Outdated
Comment thread files/en-us/web/css/reference/selectors/_doublecolon_search-text/index.md Outdated
@chrisdavidmills

Copy link
Copy Markdown
Contributor Author

Suggesting adding "no support" feature via css and adding "tortor" to the list of words to seek under current because the text includes "tortor tortor". Approving b/c the PR works without these changes ;)

Thanks, @estelle, this works nicely. I just pushed a couple more changes to make the "not supported" banner look a bit nicer.

@chrisdavidmills
chrisdavidmills merged commit 21d2342 into mdn:main Feb 3, 2026
7 checks passed
@chrisdavidmills
chrisdavidmills deleted the search-text-pseudo branch February 3, 2026 12:36
pranjal2004838 pushed a commit to pranjal2004838/content that referenced this pull request Feb 25, 2026
* Document the ::search-text pseudo

* Fixes for
schenney review comments

* Update files/en-us/web/css/reference/selectors/_doublecolon_search-text/index.md

Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>

* Update files/en-us/web/css/reference/selectors/pseudo-elements/index.md

Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>

* Fixes for estelle review comments

* Fixes for estelle comments

* Update files/en-us/web/css/reference/selectors/_colon_current/index.md

Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>

* Update files/en-us/web/css/reference/selectors/_doublecolon_search-text/index.md

Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>

* Update files/en-us/web/css/reference/selectors/_colon_current/index.md

Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>

* Improve not supported styling, duplicate text change

* fix typo

---------

Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:CSS Cascading Style Sheets docs size/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants