Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API for CSS Properties Index #636

Closed
ideadapt opened this issue Oct 22, 2016 · 1 comment
Closed

API for CSS Properties Index #636

ideadapt opened this issue Oct 22, 2016 · 1 comment

Comments

@ideadapt
Copy link

ideadapt commented Oct 22, 2016

I have been looking for an API like access to all CSS properties and values. For example: give me all properties and their corresponding values in css 2.1.
I stumbled upon https://drafts.csswg.org/indexes/#properties and created a POC a-axton/css-properties-values#1 to crawl the data.
A few days ago I saw https://github.com/w3c/csswg-drafts/tree/master/css21/properties. This looks a lot easier to parse.
Now, I have two main questions at this point:

  1. Is there a plan to create similar index files for CSS3?
  2. Is there already a parser / generator to read / write those structured files?
@plinss
Copy link
Member

plinss commented Oct 22, 2016

Oh my, please don't parse the index spec. We already have all the raw data used to generate that available in json from our spec parser. See https://api.csswg.org/shepherd/spec?anchors=1&drafts=1

You can get some (weak, autogenerated) docs by pointing a browser at: http://api.csswg.org/shepherd/

Note the API returns data on all the anchors in the specs, the definitions of values and properties have appropriate type information associated with the anchors. The API also uses a json-home page index page to be discoverable, there's a python client at: https://github.com/plinss/apiclient as an example of how to use it (you can also look a thing the source for Bikeshed).

@plinss plinss closed this as completed Oct 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants