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.

Box is not accepting percentages as sizes

See original GitHub issue

In the examples/API is written:

<Box width="50%">X</Box>

but when trying it, I get this error:

Warning: Failed prop type: Invalid prop `width` of type `string` supplied to `Box`, expected `number`.

Is it not supported anymore?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
vadimdemedescommented, Mar 26, 2019

It is supported, I just didn’t publish a new release. I’m planning to publish one tomorrow.

1reaction
vadimdemedescommented, Mar 31, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

Why do percentage-width-sized flex box items not properly ...
I am looking into this at the moment, but your first mistake is . flex { flex: 1 } . This attribute is...
Read more >
box-sizing - CSS: Cascading Style Sheets - MDN Web Docs
The box-sizing CSS property sets how the total width and height of an element is calculated.
Read more >
CSS Box Sizing Module Level 3 - W3C
Sizes specified on sizing properties as <length-percentage> represent the box's visually-apparent sizes, including the borders/padding (but not ...
Read more >
Changes on CSS Grid Layout in percentages and indefinite ...
The simple answer is that a definite size is a size that you can calculate without taking into account the contents of the...
Read more >
Percentages: Height & Width - Learn CSS: Responsive Design
Percentages are often used to size box-model values, like width and height, padding, border, and margins. They can also be used to set...
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