Skip to content

Type 'string' is not assignable to type 'BoxSizing' after styled update from 11.11.0 to 11.11.5Β #3249

Open
@maciejwitwicki

Description

Current behavior:

React project has a compilation error when creating a div with boxSizing property using string value

 Types of property 'boxSizing' are incompatible.
              Type 'string' is not assignable to type 'BoxSizing | readonly NonNullable<BoxSizing | undefined>[] | readonly BoxSizing[] | undefined'.

To reproduce:

Create component that has boxSizing property defined with string 'content-box'

const CardInputContainer = styled.div(() => ({
  boxSizing: 'content-box',
}))

Expected behavior:

Project compiles

Environment information:

  • react version: 18.2.0
  • @emotion/react version: 11.11.3

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions