How can I add additional unit token define for CSS language?


I'm trying to add a unit token "rpx" (something different from 'px', defined by weapp) for css, but I found no way.

I've search and read a lot of posts here, found that it's possible to add additional property define by extend "CssElementDescriptorProvider", but no way to define additional suffix. 

Comment actions Permalink
Official comment

Sorry for delay. Unfortunately, there's no way to add a custom unit token.

Comment actions Permalink

I have the same request.

When I press `ctrl+alt+l`(reformat code), the style file changed from "width: 5rpx" to "width: 5 rpx", which is incorrect. It's there anyway to configure that?


Please sign in to leave a comment.