microsoft / vscode

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

[css] Support "speak" property #191285

Open ryanaltvater opened 1 year ago

ryanaltvater commented 1 year ago

VS Code version: 1.81.1

OS version: macOS Ventura 13.4.1

Steps to reproduce:

  1. Use speak attribute within scss files

Warning message: Unknown property: "speak" scss(unknownProperties)

Screenshot 2023-08-25 at 2 22 48 AM

Duplicate issues (closed): https://github.com/microsoft/vscode/issues/43022 https://github.com/microsoft/vscode/issues/61719

Resources: https://www.w3.org/TR/css-speech-1/#speaking-props-speak https://github.com/stylelint/stylelint/issues/3285#issuecomment-385459809 https://github.com/mdn/data/issues/218 https://github.com/Microsoft/vscode-css-languageservice/blob/master/src/data/browsers.ts https://github.com/mdn/data/blob/master/css/properties.json

Does this issue occur when all extensions are disabled? Yes

I realize that the specification was abandoned at one point (2018), but it appears to have been revived as of February this year. It is currently in draft, and so I'm just capturing all of this so that it doesn't get overlooked. Appears that only Chrome supports speak at the moment, and Safari supports speak-as. Firefox hasn't jumped into the game yet.

aeschli commented 1 year ago

We're getting the list of valid properties from mdn. Waiting for it to appear there (as well as most browsers to adopt it). In the meantime, if you don't want to see the warning you can manually add the property to setting css.lint.validProperties

shadow-identity commented 2 weeks ago

Hi @aeschli, I found that VSCode reports string-set property as unknown, and I wanted to make a pull request, but then I found that this property exist in css.cson, and now I'm confused, why VS Code reports it? Doesn't it use css.cson anymore?

aeschli commented 2 weeks ago

https://github.com/microsoft/vscode-css/blob/main/grammars/css.cson is only for syntax highlighing. For code completion and hover, we extract properties and at rules from MDN. This is done in in the repo https://github.com/microsoft/vscode-custom-data.