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

[scss] Display a wrong selector preview when using sibling combinators in SCSS, Less #169900

Open
otomad opened this issue Dec 23, 2022 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug css-less-scss Issues and items concerning CSS,Less,SCSS styling help wanted Issues identified as good community contribution opportunities
Milestone

Comments

@otomad
Copy link

otomad commented Dec 23, 2022

Type: Bug

When using both style nesting and sibling combinators (+ and ~) in SCSS or Less, VSCode will display a wrong selector preview. I've determined that this error also occurs when no extensions are running.

For example, if writing a stylesheet like this:

.foo + .bar {
    .baz & {
        color: red;
    }
}

VSCode will display a wrong selector preview like this:
image

<element class="foo">
<element class="baz"><element class="bar">

Expect this:

<element class="baz"><element class="foo">
    <element class="bar">

Same when using ~:
image

Expect this:

<element class="baz"><element class="foo"><element class="bar">

VS Code version: Code 1.74.2 (e8a3071, 2022-12-20T10:29:14.590Z)
OS version: Windows_NT x64 10.0.22621
Modes:
Sandboxed: No

System Info
Item Value
CPUs Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz (8 x 2112)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) undefined
Memory (System) 11.80GB (2.37GB free)
Process Argv --crash-reporter-id 76088c10-0186-42e8-9434-fc9aba83ae2a
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593:30376534
pythonvs932:30410667
cppdebug:30492333
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
azure-dev_surveyone:30548225
vscccc:30610679
pyindex848:30577860
nodejswelcome1:30587005
2e4cg342:30602488
gswce1:30612156
3d0df643:30613357
f6dab269:30613381
fim-prod:30623723
vscsbc:30628655

@aeschli aeschli added css-less-scss Issues and items concerning CSS,Less,SCSS styling bug Issue identified by VS Code Team member as probable bug labels Dec 23, 2022
@aeschli aeschli added this to the Backlog milestone Dec 23, 2022
@aeschli aeschli added the help wanted Issues identified as good community contribution opportunities label Dec 23, 2022
@aeschli aeschli changed the title Display a wrong selector preview when using sibling combinators in SCSS, Less [scss] Display a wrong selector preview when using sibling combinators in SCSS, Less Dec 23, 2022
@mriiad
Copy link

mriiad commented Jan 1, 2023

@aeschli Can I try to fix this please ?

@mriiad
Copy link

mriiad commented Jan 12, 2023

@aeschli thanks for the reply, should I create a PR ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug css-less-scss Issues and items concerning CSS,Less,SCSS styling help wanted Issues identified as good community contribution opportunities
Projects
None yet
Development

No branches or pull requests

4 participants