question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cannot set "px " in createBreakpoints

See original GitHub issue

Description

I want to set value with px in createBreakpoints, but the value is ignored.

Link to Reproduction

https://codesandbox.io/s/blissful-water-ndgd0g?file=/src/index.js:0-347

Steps to reproduce

  1. Set value with px in createBreakpoints
  2. Values with px set don’t work.

スクリーンショット 2022-02-22 17 30 52

Chakra UI Version

1.7.2

Browser

Google Chrome 95

Operating System

  • macOS
  • Windows
  • Linux

Additional Information

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
m4x3dcommented, Feb 23, 2022

You need to wrap the breakpoints in an object. See this example: https://codesandbox.io/s/adoring-engelbart-dspk42?file=/src/index.js

You can pass also other properties like colors, components and fonts on the same way. For more informations have a look on this page: https://chakra-ui.com/docs/theming/customize-theme

1reaction
smitgolcommented, Feb 22, 2022

can i pick up this issue ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

MaterialUi custom breakpoints not applied - Stack Overflow
If I console. log my theme object, it will display the correct breakpoint values but will not apply them(the default one will be...
Read more >
Building responsive components in Chakra UI - LogRocket Blog
The Chakra UI team advises we define the breakpoints as an object in a custom theme object we create: import { extendTheme }...
Read more >
Breakpoint issue - Adobe Support Community - 9237590
I'm currently designing the Master page and have breakpoints at 768 and 320. I find I can reposition text and images at 768,...
Read more >
Responsive Styles - Chakra UI
To define custom breakpoints, just pass them as an object into the theme. Note: Ensure the css unit of your breakpoints are the...
Read more >
Where And How To Set Breakpoints In Media Queries
Breakpoints Based on 'em' Instead of 'px'. Typically when setting either a min-width or max-width media query, the measurement is 'px' based. If ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found