-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hidden in v4 no longer overrides all display classes #16586
Comments
See #15884 (comment) |
Thanks, I've commented there #15884 (comment), even with it being closed, since Philipp mentioned the breaking change was made "for now", seems like it's still up for discussion. I expect I won't be the last to run into this. I'll summarize the arguments for keeping
<span class="block hidden">hidden in v3 and v4</span>
<span class="inline-flex hidden">hidden in v3, visible in v4</span>
// renders as `inline-flex hidden`, without IntelliSense warning
<Component className={'hidden'} />
function Component({ className }) {
return <div className={classNames('inline-flex', classname)} />;
}
const ImportedFromNpm = ({ className }) => <div className={className}>hi from npm!</div>;
// can't assign hidden attribute
<ImportedFromNpm hidden />
|
@staaky Thanks for sharing your points on this, it's always great to hear more opinions and we invite everyone else who feels strongly about this to join our discussions. That said, let's keep the discussion around this topic in the existing (for now closed) issue so it's easier for us to keep track of everything. |
@philipp-spiess no problem, hope you reconsider. If you’d like more feedback I suggest mentioning the breaking change in the upgrade guide. |
Combining
hidden
withinline-flex
,inline-block
etc. no longer hides an element in v4.In v3
hidden
was the bottom display class in css, so it would override the others when combined.In v4.0.6 the order seems alphabetical, so that breaks things.
The text was updated successfully, but these errors were encountered: