Support for Quick Documentation on CSS Custom Properties (Variables)

Hello,

I am wondering if WebStorm supports displaying documentation (comments) for CSS Custom Properties via the Quick Documentation lookup (Ctrl+Q / F1).

Use Case: I am utilizing a design system where variables are defined with comments to describe their raw values or usage context.

  /* 8px */
  --layout-spacing-sm: 8px;

Usage:

.some-component {
  display: flex;
  gap: var(--layout-spacing-sm)
}

Desired Behavior: When hovering over --layout-spacing-sm or invoking Quick Documentation within .some-component, I would like the popup to display the /* 8px */ comment associated with the variable definition.

Is this functionality currently supported via a setting, or is this a feature planned for a future release?

Thank you.

1

Hello!

Unfortunately, it’s not possible at the moment. Please feel free to create a new feature request here: https://youtrack.jetbrains.com/issues/WEB. We’ll see if it can be implemented.

1

请先登录再写评论。