Closed amercier closed 6 years ago
Hi @amercier, this is great! Thanks a lot for updating the data fetching and taking care of backward compatibility.
I'll leave one minor comment about versioning. Everything else looks good to me!
Thanks for updating!
Hi @shuhei!
TL;DR: This PR replace its own parsing by using the material-colors-object.
Description
I made material-colors-object which parses colors from the Official Material Design Documentation page. I think this package is not redundant with yours, it could actually allow separation of concerns pretty neatly:
.css
,.scss
, etc. files to coders. It wouldn't need to be updated every time the documentation format or content change.Notes
The official documentation has been updated since the release of material-colors. URL https://material.io/guidelines/style/color.html now redirects to https://material.io/design/color/.
The official documentation doesn't contain light and dark text information anymore. That is why material-colors-object doesn't expose it. This PR doesn't intent to break backward compatibility, that's these colors have been added statically in
lib/compat.json
. The only drawback is that "compatiblity" colors are positioned after Black & White (that's what this PR contain changes in.css
,.scss
, etc files. Seedist/colors.json
diff for a clear picture.Format of material-colors-object's object differs a little bit from what
fetch()
returned, so I updated thejson
grunt task in order to maintain backward compatibility.Official documentation now use
Gray
instead ofGrey
, so I updated thejson
grunt task in order to maintain backward compatibility.material-colors-object also contain light and dark variant for each colors (which are shown in https://material.io/tools/color/#!/). I will post another PR to add these variants in material-colors later. (Edit: done in #23)