-
Notifications
You must be signed in to change notification settings - Fork 340
Add css color decoration support #3441
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
Conversation
|
@devoncarew ultimately I'd like to move this to the server (dart-lang/sdk#44682), but I think it's worthwhile having here meantime. Do you think it's worth adding to tools_metadata, and then using that to copy here so IntelliJ/Android Studio could use them too? |
Yeah, given that this is shipped by flutter.dev, I think it's worth updating tools_metadata for it. Also, +1 to longer term making changes so we can support the |
|
@Semvrij thanks for the PR! As eluded to above, the source of these colour mappings is https://github.com/flutter/tools_metadata, which is shared with other editors to allow us all to show the same previews. Are you interested in sending a PR there? There's a Dart script that extracts colours from the source files using a regex and builds some resource files from it. If not, I'm happy to do it and then we can update this PR to update the existing JSON file (we'll still need the regex change to find them though, until the analysis server is able to provide this info as described in the issue linked above). Thanks! |
|
Hi @DanTup, I am not quite familiar with flutter's tools_metadata. Can you give me some more information on how to implement it? Otherwise, it might be better if you could do it. |
|
@Semvrij there are two scripts in the tools_metadata repo:
I think the best way to handle this would be:
If you'd like to have a go, I'm happy to answer questions/provide pointers if you get stuck. I'm also happy to do it if that's easier for you. Once that's done, we should update this PR slightly so the JSON is in the same file as the others (and in the same format/order as whatever we commit to tools_metadata for easier updating in future). The main goal is just to have tools_metadata as the source of truth for these mappings. |
Thanks! This was exactly what I was getting stuck on. I did not know how to get the path of the file. |
|
@Semvrij thanks for the other PR! Since the output JSON is the same as we have here, we can just move it from With that done, this all looks good to me, thanks! |
|
Done! @DanTup |
|
@Semvrij super, thanks! |
Added color decoration support for CSS Colors.