-
Notifications
You must be signed in to change notification settings - Fork 180
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
Use MDN data to power the CSS language server #68
Comments
This is something we had a discussion on but no progress was made. |
Actually the repo we should be using is https://github.com/mdn/data |
Some more insights:
|
An analysis on CSS properties:
When we compare our browser data with MDN data, there are 239 rules in our side and not in MDN side, here is a complete list: Properties in VSC not in MDN
Observations:
When we compare MDN data against ours, there are 87 properties not in our css (31 prefixed), and 9 at-rules not in our css: Properties in MDN data but not in VSC data
Observations:
Overall consideration:
|
@octref Great analysis, thanks! |
@octref I assume you wrote a script that extract the data from MDN. I'd suggest to put that script to this repo in the |
@aeschli Yes I did, I also tried combining its data with ours to provide better IntelliSense. Here is showing There are many things we could do with the data. What are the concrete things you suggest that we do for this month? Also, I can write a crawler that gets the short description of each page too, so we can actually ship the properties in MDN data but not in our css-schema.xml. |
Overall:
Current plan:
Issues to track:
|
This task is about syntax validation rather than a value validation. You might be interesting to look at a value validation that CSSTree does:
(there are more links in CSSTree repo) |
@octref I had previously worked a little bit with the language server. Really interested in working with MDN data and helping. Let me know how :) |
@lahmatiy I did take a look of CSSTree, but didn't know about https://csstree.github.io/docs/syntax.html. This is really cool!
Yea, the proper term should be "Syntax validation for CSS property-values". @praveenpuglia Now a lot of things is still in the air so I don't think it's a good time to jump in. After the major changes go in there should be more specific bugs/features with smaller scopes where you could contribute. Thanks! |
Related: microsoft/vscode#7008 |
[WIP] Use MDN to enhance CSS LS. Part of #68
FWIW, the CSS Indexes produced by W3C contains some properties that are neither in MDN nor in VSC (e.g., text-decoration-width, text-underline-offset, text-emphasis-skip, and corner-shape). However, it contains a few experimental properties and is not available as a JSON file. |
@xfq if MDN accept contributions on these properties then we will get them. |
You might be interested in my work on CSS features dictionaries (properties, functions, pseudo-classes, pseudo-elements etc). I used various sources (mdn/data and other packages), my own research and real sites usage stats. Currently it's just a lists of features (w/o description), but it can be used for simple tasks (e.g. suggestions or validation) and help to estimate the amount of work for fullness dictionaries you do. |
For "Use |
@connorshea I haven't looked into adopting If you do have concrete examples of non-matching identifiers, would you mind writing them down and open an issue on |
I did some research and commented in #102 with everything I could find about mapping between |
@octref Can we close this? |
Let's close this. I'll track further improvements in new issues. |
I just had a chat with the MDN team, and they have published a NPM module that enables tools to take advantage of the detailed MDN data.
We should explore using https://github.com/mdn/browser-compat-data to power this language server
The text was updated successfully, but these errors were encountered: