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.

Use of hidden="hidden" breaks DjDT when used with bootstrap4 and pureCSS

See original GitHub issue

django-debug-toolbar uses hidden="hidden" attributes on its HTML elements which are left regardless of element being displayed or not. This causes django-debug-toolbar UI (both handle and main interface) to remain hidden when used together with Bootstrap 4 or PureCSS.

Both Boostrap 4 and PureCSS use:

[hidden] {
  display: none !important;
}

https://github.com/twbs/bootstrap/blob/v4.0.0-alpha/scss/_utilities.scss#L35

The problem is that jQuery .show() does not remove hidden="hidden" attribute but instead sets style="display: block", which is overriden by the above CSS block (See note about !important in http://api.jquery.com/show/)

One approach would be to follow jQuery docs and use .css('style', 'display: block !important'). A better approach would be to use style="display: none" instead of hidden="hidden" which I think is better, since style attribute is also used for setting DjDT handle position.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
maguoweicommented, May 23, 2016

please release a new fix version on pypi. @aaugustin

3reactions
ssbbcommented, Sep 7, 2015

Fixed it for me with this rule:

[hidden][style="display: block;"] { display: block !important; }

Read more comments on GitHub >

github_iconTop Results From Across the Web

Missing visible-** and hidden-** in Bootstrap
The hidden-* and visible-* classes no longer exist in Bootstrap 4. If you want to hide an element on specific tiers or breakpoints...
Read more >
Pure CSS
Pure is a ridiculously tiny CSS library you can use to start any web project.
Read more >
Django Design Patterns and Best Practices | PDF | Internet & Web ...
Django Design Patterns and Best Practices - Free ebook download as PDF File (.pdf), Text File (.txt) or read book online for free....
Read more >
https://mirror.csclub.uwaterloo.ca/ubuntu-ports/in...
... universe/games gnome-text-editor universe/misc gnome-themes-ubuntu universe/gnome gnome-tweaks universe/gnome gnome-usage universe/misc gnome-user-share ...
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