microsoft / vscode-css-languageservice

CSS, LESS & SCSS language service extracted from VSCode to be reused, e.g in the Monaco editor.
MIT License
312 stars 176 forks source link

Custom data property overrides? #350

Closed nobu-sh closed 5 months ago

nobu-sh commented 1 year ago

I am working with Unity's new UI Toolkit for styling they have uss which is almost 1 to 1 to CSS except it doesn't have a lot of the properties CSS has and no atDirectives, pseudoClasses, pseudoElements. I am looking to see if it is possible to override existing data.

Example:

.vscode/settings.json

{
  "files.associations": {
    "*.uss": "css"
  },
  "css.customData": [
    ".vscode/uss.css-data.json"
  ]
}

.vscode/uss.css-data.json

{
  "version": 1.1,
  "properties": [
    { "name": "border", "description": "This should show if in place of the normal border description if this works." }
  ],
  "atDirectives": [],
  "pseudoClasses": [],
  "pseudoElements": []
}

Outcome: image