-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
.hide and .show classes with !important breaks $(elem).show(); #9881
Comments
We had a decently long discussion about this and opted for it for simplicity sake when quickly and easily toggling content. If you're using jQuery, just toggle the classes instead of using show/hide. |
It is a lot of work—you'll need to include all the things and then you'll have a super non-performant selector that the browsers need to handle. Not an ideal solution I'm afraid. |
why not make an 'internal-only' class then ? this .hide is unusable, I don't think anyone will be using class hide on their markup or will use it and will probably will have a really bad headache. Since .hide is a way too generic, would you mind using another 'internal-name' class like bootstrap-hide class or something ? There's no mentioning of it in the docs, not even as a helper class, so I don't think you are using it for end-user (like pull-right and pull-left). |
Can't rename it now, not until v4. And it is in the docs—see helper utilities. On Monday, August 19, 2013, Bartmax wrote:
|
Ok would be great if you consider for v4. BTW, I don't see it on helper classes nor responsive utilities. maybe it's not published in http://getbootstrap.com/ atm |
I really mean it, this kind of thing makes it really hard to extend bootstrap. Please remove or document |
I can agree. |
+1 |
I did some test. If the important flag would be removed some stuff is not working anymore with the |
yes, that 'some stuff' should add a rule like navbar.hide {display:none}. On Mon, Sep 23, 2013 at 1:55 PM, phaidon [email protected] wrote:
|
👍 |
+1 for removing |
+1 for removing !important |
It's on the v4 list to revisit. |
I think this is lazy implementation and it breaks when using
$(elem).show()
or$(elem).hide()
using jQuery since the hide class get more importance since the badly (IMO) use of!important
.I think BT should not declare this so generics classes with !important, it makes difficult to customize. I don't like the idea of having another class for doing display: none because BT uses !important.
In my opinion, having a rule like :
.hide { btn&, ul li&, etc.. { display:none; }}
isn't much work and won't break anything. also footprint shouldn't increase a lot since the .hide pattern will be greatly gzipped.right now, having a
<div id="someId" class="hide"></div>
will break$('#someId').show()
function of jQuery.The text was updated successfully, but these errors were encountered: