11ty / 11ty/webc

Bug with webc:scoped and complex-ish CSS selector with `:host`

Open
#124 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
1.4k
Forks
46
Avg merge
10m
Merged PRs (30d)
2

Description

Broken:

@media (min-height:50em) {
	html:not(:has(:focus-visible))) :host {}
}

Workaround works fine:

@media (min-height:50em) {
	:host-context(html:not(:has(:focus-visible))) {}
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the broken and workaround snippets in webc, focusing on the nested media query and the differing :host selectors. Trace how webc processes these selectors and define done as handling the broken case consistently without requiring the workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.