Skip to content

Incompatibilities with @types/react #4

Closed
@pelotom

Description

@pelotom

I was taking a look at what it would take to get @types/react to use csstype instead of its own internal definition for CSSProperties. So far I've run into the following issues:

  1. CSSProperties uses numeric literals for fontWeight:

    fontWeight?: CSSWideKeyword | "normal" | "bold" | "bolder" | "lighter" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
    

    whereas csstype uses all string literals:

    type FontWeightProperty = All | "900" | "bold" | "bolder" | "lighter" | "100" | "200" | "normal" | "400" | "500" | "600" | "700" | "800" | "300";
    

    Could this be changed to use numeric literals?

  2. SVG properties such as fillOpacity, strokeOpacity and strokeWidth appear to be missing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions