sveltejs / svelte

Cybernetically enhanced web apps
https://svelte.dev
MIT License
78.41k stars 4.11k forks source link

fix `::selection` in chrome #8908

Open jimmywarting opened 1 year ago

jimmywarting commented 1 year ago

Describe the bug

I'm tiered of re-writing and reporting the same issue to multiple services about the use of root variables inside of ::selection So i'm just going to link to same github issue that explains it:

https://github.com/primer/css/pull/2472 https://www.azabani.com/2022/09/01/meet-the-css-highlight-pseudos.html#accessing-global-constants

it's very annoying to not be able to select anything.

Reproduction

always in chrome with exp flag.

Logs

No response

System Info

chrome

Severity

annoyance

tanhauhau commented 1 year ago

sorry i dont get how does ::selection relates to svelte? do you have a reproduction in Svelte that explains the issue you are facing?

jimmywarting commented 1 year ago

it have not something to do with svelte but the sveltes own website. that makes use of ::selection on https://svelte.dev/

jimmywarting commented 1 year ago

eg: https://svelte.dev/_app/immutable/assets/TryTerminal.b09557f2.css

::selection {
  background: var(--sk-selection-color)
}

the variable is not found...

PuruVJ commented 1 year ago

It works for me though 🤔 Can you post a video or screenshot? Also, whats your OS

jimmywarting commented 1 year ago

Note that https://github.com/primer/css/issues/2411 is currently only reproducible with Chrome's chrome://flags/#enable-experimental-web-platform-features enabled.

Rich-Harris commented 5 months ago

I have no idea what's being reported here. I enabled that flag, and I can still select text on https://svelte.dev (including in the terminal widget) just fine.

The linked issue does not explain what your concern is. I'm sure you'd rather not repeat yourself, but maintainers would rather not reverse engineer vague bug reports from unrelated repos. Please clarify what the problem is, or we have no choice but to close this.