[vim/vim] Add `:host`, `:host-context()`, `slotted()`, and `state()` CSS pseudo-classes and functions (PR #21404)

9 views
Skip to first unread message

S0AndS0

unread,
Sep 29, 2026, 8:43:10 PM (2 days ago) Sep 29
to vim/vim, Subscribed

Related documentation;

TLDR: host and host-context() are useful for shadowDom stuff, ::slotted() enables targeting elements passed/injected into a <template> and state() enables targeting custom identifiers.

For example, currently I'm (ab)using :host as a drop-in replacement for :root when defining variables that are intended to be shared across custom/template elements;

  • ./assets/css/host.css css :host { --default__margin-block: 0.25rem; }

  • ./custom-elements/example.html ```html <style> header { margin-block-start: calc(var(--default__margin-block) * 2); } </style> ```

What does this change do?

Commit message

Problem:  Problem line
Solution: Solution line (Your Name).

related: #number
fixes: #number
closes: #number

AI assistance

  • AI involvement is disclosed in the commit message, or no AI was used

Checklist

  • The commit message follows the Problem/Solution form above
  • Signed-off-by: trailer is present (git commit -s), recommended but not required
  • Tests were added, existing tests cover the change, or the change cannot be tested (say why)
  • Documentation under runtime/doc/ was updated, or no update is needed

Anything reviewers should know


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/21404

Commit Summary

  • 6cb3262 Add `:host`, `:host-context()`, and `state()` CSS pseudo-classes and functions

File Changes

(1 file)

Patch Links:

—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/21404@github.com>

Christian Brabandt

unread,
Sep 30, 2026, 3:47:24 PM (19 hours ago) Sep 30
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#21404)

Thanks. Please next base your changes on the latest master change, so we avoid those git conflicts.

—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/21404/c5918455907@github.com>

Reply all
Reply to author
Forward
0 new messages