Microsoft/vscode

[css] Support for SVG 2 CSS Properties

Open

#85.828 aperta il 29 nov 2019

Vedi su GitHub
 (18 commenti) (23 reazioni) (1 assegnatario)TypeScript (10.221 fork)batch import
css-less-scssfeature-requesthelp wanted

Metriche repository

Star
 (74.848 star)
Metriche merge PR
 (Merge medio 11h 43m) (1000 PR mergiate in 30 g)

Descrizione

SVG 2 introduces the possibility of setting SVG properties in CSS (see CSS Tricks' post under "Element-specific properties -> "Positioning SVG elements"). This means this example should be valid:

circle {
  r: 2;
  cx: 10;
  cy: 100;
}

path {
  d: 'L0 100';
}

However, these properties trigger the s?css(unknownProperties) warning:

image

I'm not too familiar with VS Code's insides and what program checks for valid properties. If this belongs somewhere else, I'd be happy to re-issue there.

Thanks! ✨

Guida contributor