microsoft / vscode-custom-data

Documentation and sample for using VS Code custom data format
MIT License
196 stars 75 forks source link

CSS hover text claims 'white-space' is shorthand for 'white-space-collapsing' and 'text-wrap' #40

Closed jameshfisher closed 2 years ago

jameshfisher commented 2 years ago

Does this issue occur when all extensions are disabled?: Yes

Steps to Reproduce:

  1. Create some CSS with the white-space property
  2. Hover over it

Hover text then shows:

Shorthand property for the 'white-space-collapsing' and 'text-wrap' properties.

I can't find any information about these properties, except some old discussions that say they don't exist.

Also, the source of this hover text is pretty opaque; I can't find it on GitHub. If someone points me to a more appropriate repository, I'll open the issue there.

aeschli commented 2 years ago

We need to fix it here: https://github.com/microsoft/vscode-custom-data/blob/4d539c131ec7ed490a09fe9d0101f759b39804b6/web-data/css/css-schema.xml#L9677

yume-chan commented 2 years ago

Interesting. Little history lesson:

This sentence first appeared in CSS Text Level 3 Working Draft 6 March 2007 https://www.w3.org/TR/2007/WD-css3-text-20070306/#white-space

And last appeared in CSS Text Level 3 Working Draft 19 January 2012: https://www.w3.org/TR/2012/WD-css3-text-20120119/#white-space (the next draft is Working Draft 14 August 2012 https://www.w3.org/TR/2012/WD-css3-text-20120814/#white-space which removed white-space-collapsing)

@aeschli Would removing the whole section completely remove the suggestions for white-space? Should we replace it with modern descriptions instead?

aeschli commented 2 years ago

I changed it to Specifies how whitespace is handled in an element. Yes, also no descriptions anymore on the various values. I know that's a step back, but we only documented values for a subset of elements.

If you found the value descriptions useful, I can bring them back (or feel free to create a PR).

yume-chan commented 2 years ago

I haven't checked the code in vscode-css-languageservice, but I expect this whole suggestion list would disappear?

image

Because suggestions for line-break misses anywhere: #42.

image

when syntax has it

https://github.com/microsoft/vscode-custom-data/blob/7f8ead10d2a7f53a8def5b8ac4c55b86f3e57390/web-data/data/browsers.css-data.json#L6031

aeschli commented 2 years ago

Well, I see the confusion.

The change is so far only in vscode-custon-data and not yet in vscode-css-languageservice and vscode.