Skip to content

Cannot use 'css' method to set styles in TS projects #1337

@srnec

Description

@srnec

Bug report

Fiddle

https://jsfiddle.net/Lovnpkxa/

Explanation

Based on the docs this should set the font size on CSS/styles level:
.css('fontSize', 20)
If the above code is used it will not set the desired CSS font size styling, but this code will work:
.css('font-size', 20)

Problem is that when TS types are used, css method's first argument style is type of CSSStyleDeclaration where it only allows fontSize.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions