Missing CSS variable definition (IDE can't recognize it, but it works fine in the browser). #3200
Replies: 1 comment
-
Finally I think it just an IDE issue —— it's work fine in VSCode. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dear all,
I'm using PrimeVue and following a tutorial step by step, but I encountered an issue: the CSS variable injected by PrimeVue works fine when I open the browser to check the style, but when I'm coding in WebStorm, the IDE can't recognize the CSS variables, such as
var(--p-primary-color)
. WebStorm reports "Cannot resolve '--p-primary-color' custom property."The CSS variable
(--p-primary-color)
exists on the page and works fine:But the IDE can't recognize it, even though it works fine in the browser:
Based on how the styles are loaded, I think this may be caused by injecting CSS variables in the
useStyle
function without explicitly declaring them. Maybe we can dynamically generate a CSS file that includes these CSS variables when running in dev mode, so the IDE can recognize them?However, after searching Google and forums, I found that no one else has encountered this issue. Is it possible that I missed some documentation?
Thanks a lot!
Beta Was this translation helpful? Give feedback.
All reactions