Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Types for vnode style attribute #46

Open
panoply opened this issue Sep 23, 2021 · 0 comments
Open

Types for vnode style attribute #46

panoply opened this issue Sep 23, 2021 · 0 comments

Comments

@panoply
Copy link

panoply commented Sep 23, 2021

We could leverage csstype and provide typings on the vnode inline style attribute. Mithril supports hyphen and camelCase CSS properties both of which are covered in csstype.

Basic Example

import { StandardProperties, StandardPropertiesHyphen  } from "csstype";

interface IStyle extends StandardProperties, StandardPropertiesHyphen {}

 interface Attributes extends Lifecycle<any, any> {
    // ...
    style?: IStyle;
  }

Personally feels little much for some intellisense features like completions and checks. I would hypothesize users are not readily reaching for style attributes but given developers tend to expect this type of thing nowadays, might be a discussion point at the very least.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant