Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css] :has(>child) selector not working in SCSS #111202

Closed
DrSensor opened this issue Nov 23, 2020 · 11 comments
Closed

[css] :has(>child) selector not working in SCSS #111202

DrSensor opened this issue Nov 23, 2020 · 11 comments
Assignees
Labels
css-less-scss Issues and items concerning CSS,Less,SCSS styling feature-request Request for new features or functionality
Milestone

Comments

@DrSensor
Copy link

Issue Type: Bug

a:has(>img) {

}

2020-11-24_05-47

Will give error:

red squiggle at >

) expectedscss(css-rparentexpected)

red squiggle at )

{ expectedscss(css-lcurlyexpected)

VS Code version: Code - OSS 1.51.1 (e5a624b, 2020-11-12T10:54:25.653Z)
OS version: Linux x64 5.8.18-1-MANJARO

System Info
Item Value
CPUs Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz (4 x 3086)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: unavailable_off
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 2, 2, 2
Memory (System) 7.66GB (0.24GB free)
Process Argv --no-sandbox
Screen Reader no
VM 0%
DESKTOP_SESSION bspwm
XDG_CURRENT_DESKTOP undefined
XDG_SESSION_DESKTOP bspwm
XDG_SESSION_TYPE x11
@DrSensor
Copy link
Author

@aeschli aeschli added css-less-scss Issues and items concerning CSS,Less,SCSS styling feature-request Request for new features or functionality labels Nov 24, 2020
@aeschli aeschli added this to the Backlog milestone Nov 24, 2020
@aeschli
Copy link
Contributor

aeschli commented Nov 24, 2020

Waiting a bit until this is adopted by browsers.

@aeschli aeschli changed the title :has(>child) selector not working in SCSS [css] :has(>child) selector not working in SCSS Nov 30, 2020
@Airkro
Copy link

Airkro commented Jan 27, 2021

image

same problem

@yume-chan
Copy link
Contributor

image

same problem

No, yours is another feature.

@DrSensor
Copy link
Author

Actually, all > or < symbol inside a bracket has a similiar problem.

@Airkro
Copy link

Airkro commented Jan 27, 2021

@yume-chan

Maybe not, but they have the same error message

image

@GEMI
Copy link

GEMI commented Feb 3, 2022

Anything happening with this issue?

@erictompkins
Copy link

We are having a similar issue, but with the + selector followed by a class

.Tabs-button:hover:has(+ .Tabs-button.is-active) {
        border-right: none;
        padding-right: 17px;
}

image

VS Code shows two errors

  • ) expectedcss(css-rparentexpected) for the first red squiggly
  • { expectedcss(css-lcurlyexpected) for the second red squiggly

The CSS code is valid and works in Safari.

@aeschli aeschli modified the milestones: Backlog, On Deck May 20, 2022
@controversial
Copy link

Having the same issue using :has(+ ...):

Screen Shot 2022-06-21 at 1 27 38 PM

Waiting a bit until this is adopted by browsers.

Worth noting that support for :has shipped in Safari 15.4 (on both iOS and macOS) in March, and that it will ship in Chrome 105 at the end of August (see caniuse).

@fabiospampinato
Copy link
Contributor

Can this be put in the next issue's milestone? It's an important feature which shipped in most browsers already, and it's just not supported properly by the editor.

@aeschli
Copy link
Contributor

aeschli commented Sep 19, 2022

I've already fixed the has support and it will be in the next milestone.

Duplicate of #147353

@aeschli aeschli closed this as completed Sep 19, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Nov 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
css-less-scss Issues and items concerning CSS,Less,SCSS styling feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

8 participants