microsoft / vscode

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

[css] CSS intellisense for @starting-style #231960

Open iownbey opened 2 weeks ago

iownbey commented 2 weeks ago

Type: Bug

.example {
    @starting-style {
        opacity: 0;
    }
}

This css should not throw a syntax error, but @starting-style is not recognized, giving me the error Unknown at rule @starting-stylecss(unknownAtRules)

Let me know if you need any more info

VS Code version: Code 1.94.2 (384ff7382de624fb94dbaf6da11977bba1ecd427, 2024-10-09T16:08:44.566Z) OS version: Windows_NT x64 10.0.22631 Modes: Remote OS version: Linux x64 5.15.153.1-microsoft-standard-WSL2

Extensions (13) Extension|Author (truncated)|Version ---|---|--- remote-containers|ms-|0.388.0 remote-ssh|ms-|0.115.0 remote-ssh-edit|ms-|0.87.0 remote-wsl|ms-|0.88.4 vscode-remote-extensionpack|ms-|0.25.0 remote-explorer|ms-|0.4.3 remote-server|ms-|1.5.2 vscode-eslint|dba|3.0.10 gitlens|eam|15.6.2 prettier-vscode|esb|11.0.0 vscode-docker|ms-|1.29.3 psi-header|psi|1.23.1 code-spell-checker|str|3.0.1 (1 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492cf:30256860 vscod805:30301674 binariesv615:30325510 vsaa593:30376534 py29gd2263:31024239 vscaac:30438847 c4g48928:30535728 azure-dev_surveyone:30548225 962ge761:30959799 pythongtdpath:30769146 pythonnoceb:30805159 asynctok:30898717 pythonmypyd1:30879173 h48ei257:31000450 pythontbext0:30879054 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 dsvsc021:30996838 da93g388:31013173 dvdeprecation:31068756 dwnewjupyter:31046869 impr_priority:31102340 nativerepl2:31139839 refactort:31108082 pythonrstrctxt:31112756 wkspc-onlycs-t:31132770 nativeloc1:31134641 wkspc-ranged-t:31151552 cf971741:31144450 defaultse:31146405 iacca2:31156134 notype1:31157159 5fd0e150:31155592 dwcopilotcf:31162479 iconenabled:31158251 ```
iownbey commented 1 day ago

For the record, this is something I would be willing to try making a PR for

aeschli commented 1 day ago

@iownbey That would be great. The changes need to be made in https://github.com/microsoft/vscode-css-languageservice.

https://github.com/microsoft/vscode-css-languageservice/blob/main/src/parser/cssParser.ts

Let me know if you need help. Add a new tests to develop this: https://github.com/microsoft/vscode-css-languageservice/blob/2326c0cb8c245a148d0f5c0ac0f2c335c6c2fb10/src/test/css/parser.test.ts

Once fixed there I'll bring the node module to VS Code.