Closed daKmoR closed 4 years ago
Great idea! :-)
I have two consideration:
/**
* This is a container looking like a card with a back and front side you can switch
*
* @cssprop {Length} --demo-wc-card-header-font-size - Header font size
* @cssprop {Color} --demo-wc-card-front-color - Font color for front
*/
export class DemoWcCard extends LitElement {}
<color># | <url> | magic
and <length>+
. Valid types include: <integer>
, <number>
, <percentage>
, <length>
, <angle>
, <time>
, <frequency>
, <resolution>
, <url>
and <string>
.fully agree on both parts 👍
PR https://github.com/runem/web-component-analyzer/pull/122 adresses this issue and has been merged. It's implemented as a "type hint", - a custom, optional string to help document css properties :tada:
awesome 🤗
hey,
it would be really nice to have types/typeHints for css properties (you will need to hand write them). These types can then be used to either link to documentation or use them to display color pickers 💪
Types I would see so far:
Stahman proposal:
output in
customElements.json
: