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.

Container no longer uses sizes.container values

See original GitHub issue

🐛 Bug report

Since https://github.com/chakra-ui/chakra-ui/pull/2602 the Container component no longer uses size values defined in sizes.container, but instead uses sizes.largeSizes. This is not mentioned in the PR, and I couldn’t find any other uses of sizes.container in the codebase so either sizes.container is deprecated without documentation or this change is unintended.

💥 Steps to reproduce

As can be seen from the codesandbox, specifying maxW="lg" results in a max width value of 512px = (sizes.largeSizes.ls) instead of 1024px (sizes.containers.lg)

💻 Link to reproduction

https://codesandbox.io/s/white-moon-7sxnh?file=/src/App.tsx

🧐 Expected behavior

Container should use size values defined in sizes.container

🌍 System information

Software Version(s)
Chakra UI 1.0.2
Browser N/A
Operating System N/A

📝 Additional information

Screen Shot 2020-12-07 at 11 34 45 PM Offending PR https://github.com/chakra-ui/chakra-ui/pull/2602 sizes.container

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

6reactions
segunadebayocommented, Dec 11, 2020

I’d recommend this:

  • Revert the change first
  • Add support for theming containers
  • Figure out how both functionalities can co-exists without breaking.

@chakra-ui/react-team This means we need to review PRs a bit more before merging. #LessonLearned

1reaction
segunadebayocommented, Feb 9, 2021

So sorry for keeping this up for some time. We reviewed the PR and thought it was best to leave the container as is due to the TypeScript complexity involved.

Hope you can find a way to walk around this by using maxW=container.lg

Cheers

Read more comments on GitHub >

github_iconTop Results From Across the Web

About storage drivers - Docker Documentation
The total disk space used by all of the running containers on disk is some combination of each container's size and the virtual...
Read more >
CSS Container Queries - CSS: Cascading Style Sheets | MDN
To do this, use the container-type property a value of size ... This makes reusable components a lot more flexible without needing to...
Read more >
Container efficiency - Tag Manager Help
If the Size indicator value is above 70%, you should take steps to optimize your container configuration. Clean up your container. Combine multiple...
Read more >
Use the Right Container Query Syntax - OddBird
Size containers need to be defined explicitly, because they require special size containment in order to function. Normally, the size of an ...
Read more >
10 things to avoid in docker containers | Red Hat Developer
This method to create an image is not reproducible and should be completely avoided. Always use a Dockerfile or any other S2I (source-to-image) ......
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