microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.35k stars 29.31k forks source link

[scss] variables in @media parsing #144767

Open katie1348 opened 2 years ago

katie1348 commented 2 years ago

Issue Type: Bug

I have the following line of code in my SCSS file:

@media screen and  (max-width : 735px) and #{breakpoint(medium)}  {
    line-height: 120%;
}

I get the error:

( expectedscss(css-lparentexpected)

The error occurs on the # of the #{breakpoint( part of the query.

The expected behavior is no parsing errors.

VS Code version: Code 1.65.1 (8908a9ca0f221f36507231afb39d2d8d1e182702, 2022-03-08T02:20:11.670Z) OS version: Darwin x64 21.3.0 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-8500B CPU @ 3.00GHz (6 x 3000)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled| |Load (avg)|1, 2, 2| |Memory (System)|32.00GB (3.64GB free)| |Process Argv|--crash-reporter-id 4a82aa03-c351-4e29-9734-e795784ce9b9| |Screen Reader|no| |VM|0%|
Extensions (9) Extension|Author (truncated)|Version ---|---|--- vscode-eslint|dba|2.2.2 phptools-vscode|DEV|1.7.8766 vscode-test-explorer|hbe|2.21.1 test-adapter-converter|ms-|0.1.5 format-html-in-php|rif|1.7.0 vscode-scss-formatter|sib|2.3.3 vscode-hexdump|sle|1.8.1 code-spell-checker|str|2.1.7 vscode-counter|uct|3.0.3
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492cf:30256860 pythonvspyl392:30443607 pythontb:30283811 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscorecescf:30445987 pythondataviewer:30285071 vscod805:30301674 pythonvspyt200:30340761 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593:30376534 testflightcf:30433671 vsc1dst:30438360 pythonvs932:30410667 wslgetstarted:30449410 vsclayoutctrt:30448491 dsvsc008:30440022 pythonvsnew555:30450167 vsbas813:30436447 vscscmwlcmc:30438804 vscgsvid1:30447480 helix:30440343 pynewfile477cf:30450039 ```
katie1348 commented 2 years ago

Is there any update on this issue?

katie1348 commented 2 years ago

As Atom is closing on 15 December 2022, is there a mechanism for this to be fixed?

I am asking, as the Atom repository that acts as a source for the machine translation of the relevant file into VS Code is going to be sunsetted.

How can this be fixed in the future? Will there be a replacement source for Atom, which maybe has the fix already?

aeschli commented 2 years ago

The CSS language server does not depend on Atom.

katie1348 commented 2 years ago

That’s nice to hear.

Does that mean the comments in the auto-generated file are incorrect?

aeschli commented 2 years ago

Are you referring the to the comment in the grammar files? (Maybe add a pointer) So, yes, we still use Textmate grammars that were written by Atom, but these repositories are all open source and I don't expect them to be removed. Note that this issue is unrelated to the grammar files.

katie1348 commented 2 years ago

Hi,

Yes, I was referring to the grammar files and thank you for clarifying that this is not related to that.