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.

<Button hidden>Should be Hidden</Button> is not hidden

See original GitHub issue

Reproduction link

Edit on CodeSandbox

Steps to reproduce

<Button hidden>Should be Hidden</Button>

What is expected?

<Button hidden>Should be Hidden</Button> should not be visible.

What is actually happening?

<Button hidden>Should be Hidden</Button> is visible.

Environment Info
antd 5.0.0
React 17.x 18.x
System windows
Browser Chrome Version 107.0.5304.107 (Official Build) (64-bit)

Notice that when // import "antd/dist/reset.css" is uncommented Button is hidden as expected.

The example from the original documentation template also does not work: codesandbox (Here, reset.css is not included)

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
afc163commented, Nov 27, 2022

Try import ‘antd/dist/reset.css’ mannually.

1reaction
TrickyPicommented, Nov 22, 2022

Bug here. image the css-in-js style override hidden style, and antd v5 doesn’t import reset.css by default.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML button hidden Attribute - Dofactory
A hidden attribute on a <button> tag hides the button. Although the button is not visible, its position on the page is maintained....
Read more >
Hidden property of a button in HTML - Stack Overflow
I am trying to show three buttons on one button click. Before a button click all three buttons are hidden. I set the...
Read more >
Hidden HTML Buttons - Small Business - Chron.com
Most Web form buttons are visible, but developers sometimes need to include hidden elements.
Read more >
Differences between display: none - W3Schools Tryit Editor
Difference between display:none and visiblity: hidden​​ visibility:hidden hides the element, but it still takes up space in the layout. display:none removes the ...
Read more >
How to Hide Button in JavaScript - Linux Hint
To hide the button in JavaScript, you can set the “style.visibility” property value as “hidden” or the “style.display” property value as “none”.
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