8000 A way to have documentation on hover · Issue #298 · ecmel/vscode-html-css · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
A way to have documentation on hover #298
Open
@fcrozatier

Description

@fcrozatier

Hey! It would be great to be able to have a small tooltip when hovering over classes used in templates, displaying their documentation similar to jsdoc.

What do you think of having a syntax similar to jsdoc with an additionnal @cssprop directive to document css custom variables used in a class? For types we could use CSS bracket notation <type> for example

Example (I'm using the to be implement exented attr() function but it's just for demo):

/*
  Displays elements in a grid with each column taking the same amount of space 
  
  @cssprop <length> --gutter — Space between items

  @attr <number> data-cols — The number of columns, set on the parent element
*/
.my-grid {
  display: grid;
  gap: var(--gutter);
  grid-template-columns: repeat(attr(data-cols number, 1), 1fr);
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0