-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dump CSS extracts as JSON files (#116)
Following discussions in #113, this update dumps the extracted CSS definitions as JSON files (as opposed to `.cvds` files) in the `css` folder. The JSON file is a JSON object with `properties`, `descriptors` and `valuespaces` properties that list the definitions extracted. A typical example: ```json { "properties": { "animation-timeline": { "name": "animation-timeline", "value": "<single-animation-timeline>#", "initial": "auto", "appliesTo": "all elements, ::before and ::after pseudo-elements", "inherited": "none", "percentages": "N/A", "media": "interactive", "computedValue": "As specified", "canonicalOrder": "per grammar", "animatable": "no" } }, "descriptors": {}, "valuespaces": { "<single-animation-timeline>": { "value": "auto | scroll([element(<id-selector>)[, <scroll-direction>[, <scroll-offset>[, <scroll-offset>[, <time>[, <single-animation-fill-mode>]]]]]])" }, "<scroll-direction>": { "value": "auto | block | inline | horizontal | vertical" }, "<scroll-offset>": { "value": "<length> | <percentage> | auto" } } } ``` The update also makes sure that all properties extracted from CSS specs use a lower camel case convention. When multiple levels of a spec exists, only the contents of the latest level are dumped for now. There was a bug in the code that made it miss some cases (where the URL of the different levels did not follow the same pattern) and that could create file writing conflicts. This should now have been fixed. Also, the logic that creates CSS and IDL dumps has been separated to dump the latest level that actually has some related definitions (for instance CSS Animations Level 2 is currently a delta spec and does not define any IDL, whereas the first level does). Whether we'll want to keep that behavior later on for such delta specs is an open question.
- Loading branch information
Showing
2 changed files
with
101 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters