Skip to content
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

Fix hidden toolbar icons #245

Merged
merged 1 commit into from
Jul 15, 2020
Merged

Conversation

vtenfys
Copy link
Contributor

@vtenfys vtenfys commented Jul 11, 2020

Please read comment below and #246 before merging!

Fixes toolbar icon(s) which were not displaying correctly due to the button width being too small to fit - just 'home' for me though this might fix #238 (presumably depends on font rendering differences between browsers / OS).

  • Add the fa-fw class to ensure all icons are the same fixed width
  • Ensure padding: 0 is applied as this wasn't taking precedence over the default styles
    • Alternative approach would be to remove both the width and padding styles, which also leaves enough space to fit the icons, and doesn't appear (much?) different visually
  • Remove unnecessary overflow: hidden

Before:

Home icon is missing

After:

All icons appear correctly

@vtenfys
Copy link
Contributor Author

vtenfys commented Jul 12, 2020

It looks like the extension <style> tag is inconsistently inserted earlier or later than the JupyterLab widget library's <style> tag, which causes this bug to sometimes appear and sometimes not (padding: 0 correctly overrides the default without needing !important if it gets applied after the library styles). Maybe there's a bug with @jupyter-widgets/base causing this to happen?

@thomasaarholt
Copy link
Contributor

Nice catch! I remember being surprised by the "new" style of the home button, but didn't give it much thought!

@vtenfys vtenfys mentioned this pull request Jul 12, 2020
@martinRenou
Copy link
Member

Thanks a lot! I've been willing to look at this issue since a long time, bug CSS is definitely not my cup of tea ahah.

@martinRenou martinRenou merged commit 1064fcf into matplotlib:master Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Layout buttons not rendering correctly
3 participants