79627511

Date: 2025-05-18 14:00:31
Score: 0.5
Natty:
Report link

Unfortunately, there is no VSCode setting or JSON configuration to append custom property values to IntelliSense for CSS. As mentioned, you can create your own custom snippet. I prefer Cochin over Cambria, so I wanted to switch the order in the default snippet, but had to do the following instead in the css.json file (File > Preferences > Configure Snippets > css):

{
    // Place your snippets for css here. Each snippet is defined under a snippet name and has a prefix, body and 
    // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
    // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the 
    // same ids are connected.
    // Example:
    // "Print to console": {
    //  "prefix": "log",
    //  "body": [
    //      "console.log('$1');",
    //      "$2"
    //  ],
    //  "description": "Log output to console"
    // }
    "Cochin First Font-Family": {
        "prefix": "cff",
        "body": ["font-family: Cochin, Cambria, Georgia, Times, 'Times New Roman', serif;"],
        "description": "Default Cambria snippet with Cochin first"
    }
}

So now when I type "cff" > Tab, I get the font-family I line I want.

Reasons:
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Matt Olenn