styled-components / webstorm-styled-components

styled-components highlighting support in IntelliJ editors
https://plugins.jetbrains.com/plugin/9997-styled-components
MIT License
375 stars 19 forks source link

Add support for 'css' prop #67

Closed undeadcat closed 5 years ago

undeadcat commented 5 years ago

Adds support for 'css' prop. Fixes #69. Enables highlighting, completion for CSS values in strings passed to the 'css' prop - just like css, styled.div.

image

By default, the IDE doesn't know about 'css' prop, so CssPropAttributeDescriptorProvider is needed to include it in completion and avoid highlighting it as unknown.

To determine if css prop is available in project it currently checks that:

(It would be great if someone could confirm if these are the correct conditions for using 'css' prop? @mxstbr?)

(I'll update this with change notes and updated plugin.xml after #66 is merged. I'd like to release this separately since this updates the minimum IDE version to 2018.3 while #66 doesn't).

thetruechar commented 5 years ago

Definitely need this! Hope this coming soon!

undeadcat commented 5 years ago

@daedlock, Please have a look at this again. I'd like to merge this and release a new version. It seems css-prop is definitely a v4 feature since it has a v4 mark in the API description.

I've had to update some Gradle stuff (this affects plugin developers only) and updated the version and Changelog.