Skip to content

Responsive style prop does not work with 0 as a number, but works as a string '0' in Container #8054

@romatou

Description

@romatou

Dependencies check up

  • I have verified that I use latest version of all @mantine/* packages

What version of @mantine/* packages do you have in package.json?

8.1.2

What package has an issue?

@mantine/core

What framework do you use?

Vite

In which browsers you can reproduce the issue?

Safari

Describe the bug

Setting up a number px={{ base: 0, md: 'md' }} for Responsive style prop does not work, but string works px={{ base: '0', md: 'md' }}.

// Does not work
<Container size="md" px={{ base: 0, md: 'md' }}>
  // ...
</Container>

// Works
<Container size="md" px={{ base: '0', md: 'md' }}>
  // ...
</Container>

I don't know if this is intended.

If possible, include a link to a codesandbox with a minimal reproduction

No response

Possible fix

No response

Self-service

  • I would be willing to implement a fix for this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedCompleted issues that will be published with next patch (1.0.X)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions