Expected CSS spec value type for each property in JavaScript

95 views Asked by At

Is there an npm package somewhere (or an open source JavaScript repo I can use) that maps CSS property names to their expected value data types?

I'm looking for something like the following:

import {getCssPropertyTypes} from 'some-package';

getCssPropertyTypes('background-color');
// returns ['color']

I want to use this for a stylelint plugin. I've tried digging into the internals of postcss, css-tree, stylelint itself, and the results of many an npm or google search to no avail.

Is the only solution here to personally write a web scraper for MDN docs?

0

There are 0 answers