Skip to content

rohmann/css-property-meta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

css-property-meta

While working on tooling that involves introspecting large amounts of HTML and CSS I needed a way to determine if a property would inherit. I compile this reference by reading through the W3C drafts for each property. In properties.ts a dictionary of CSS properties can be found with some associated meta data. Here's an example of the color property:

'color': {
  inherited: true,
  links: {
    w3c: [ 'https://drafts.csswg.org/css-color-3/#color0', 'https://drafts.csswg.org/css-color-3/#color01' ]
  }
}

This is not published on npm, so for the time being I'd recommend simply copy/pasting the file into your project directly.

This may eventually be expanded to include:

  • Information on shorthand properties
  • Links to MDN articles
  • A "related properties" field to allow indexing property types commonly used together.

About

Check a CSS property to see if it will be inherited

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published