wix / stylable

Stylable - CSS for components
https://stylable.io
MIT License
1.27k stars 62 forks source link

Native DOM Typings #1985

Open tomrav opened 3 years ago

tomrav commented 3 years ago

Ability to extend the native DOM elements

barak007 commented 2 years ago

(WIP)

Why?

There are multiple propositions behind this feature:

  1. Add ability to define native DOM elements types in .st.css files
  2. Add ability to extends classes (and attributes?) with native DOM elements
  3. Provide all the native DOM elements type definitions
  4. Use the type definitions to provide completions

Idea for how to type:

Create a base DOM Element type definition that will expose:

For each DOM element that have specific states/attributes/pseudo-elements (like input, video, form) create a type that extends the Element base type

Untouched topics

Nice to have:

Possible issues:

Tasks