No Suggestions for Inline styles - Bug? Missing files?

I am working with Angular, and when I create a div and use the style attribute, I will get a list of properties but no suggestions for the parameters for those properties. For example:

<div style="background-color: ">

In this example, background-color is shown in an auto-complete list, however, if I shift-space to bring up the available colors, it will say "no suggestions". It has always worked just fine, and I am using the latest version of IntelliJ for Windows. I do not know if I am missing something, or if I have to include a package... not sure what has changed. I get no suggestions for ANY CSS property. 

 

Here is a video of what is happening: https://youtu.be/712B0AmHyWY

 

Ronnie

9 comments
Comment actions Permalink

Can't reproduce.

Do you have any third-party plugins installed? The NativeScript plugin, for example, is known for causing issues with CSS completion

0
Comment actions Permalink

我也遇到了同样的问题,不过我使用的是react native ,使用内联样式的时候,只能提示属性的名称,例如可以提示flexDirection,但当我在flexDirection后输入:以后,不再像以前一样会出现,“row,column”这样的列表了,之前的版本还是可以的,即使我在flexDirection:后面输入ro(不带引号),webstorm也能给出“row”的建议,现在没有了,我的版本是

WebStorm 2022.1.3
Build #WS-221.5921.27, built on June 22, 2022
Licensed to Debug Code
您有此版本的永久回退许可证。
订阅有效期至 2023年7月3日。
Runtime version: 11.0.15+10-b2043.56 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.4
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 16
Non-Bundled Plugins:
    io.github.maddouri.intellij.OnlineSearch2 (1.1.4)
    github.cweijan.test-theme (1.6)
    com.intellij.zh (221.224)
    com.herokuapp.vuesion (1.9.2)
    cn.olange.rule (1.0.4)
    jones.restarteslintaction.restart-eslint-action (0.0.1)
    com.mallowigi (64.0.0)
    Dart (221.5921.27)
    izhangzhihao.rainbow.brackets (6.25)

0
Comment actions Permalink

Works for me in 2022.1.3:

Please could you share a file/code snippet the issue can be repeated with?

0
Comment actions Permalink

感谢您的回复

使用StyleSheet是没有问题的,如图所示能够正确提示

但是在内联样式中,代码提示会有问题,在输入alignItems后无论是否加引号,都不能正确提示,使用ctr+space也不行,如图所示:

如果我没有记错的话,在2021.2.2的版本上,无论是使用内联样式还是使用styleSheet都是一致的编码体验

0
Comment actions Permalink

另外我使用的是js,不是tsx

0
Comment actions Permalink

completion within quotes looks OK for me when using similar code:

 

0
Comment actions Permalink

是的,使用.tsx文件在引号内是可以正确提示,但是用.js文件不行;即使使用.tsx文件,在内联样式与使用StyleSheet的体验也不一致,styleSheet不用输入引号

0
Comment actions Permalink

Works for me when using js:

0
Comment actions Permalink

我的确实是不行,我试过很多次了,而且我认为你截图的也是不对的,按正常来说你的提示列表应该只有flex-end和flex-start两个选项

0

Please sign in to leave a comment.