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

CSS font-family to new FontAwesome version incorrect #3000

Closed
scimax opened this issue Oct 26, 2020 · 1 comment
Closed

CSS font-family to new FontAwesome version incorrect #3000

scimax opened this issue Oct 26, 2020 · 1 comment
Labels
resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.

Comments

@scimax
Copy link

scimax commented Oct 26, 2020

Describe the issue

Hello,
I'm facing a problem with the FontAwesome icons, as I first mentioned at matplotlib/ipympl#274. But the issue is not related to ipympl but rather to ipywidgets. So, first of all, this is what the problem looks like when using the fontawesome icons:

import ipywidgets.widgets as widgets
widgets.Button(description="Hello", icon='check')

Output:
image

After reading through past issues and the history of the developement I learned that there was a change in the FontAwesome version a few month ago, e.g. mentioned here #2848 by @martinRenou , but I couldn't track down the origin by myself. With the help from @Chaoste, we found the origin in the CSS class .fa. In the browser inspector it reads as follows:

.fa {
    display: inline-block;
    font: normal normal normal 14px/1 FontAwesome;
    font-size: inherit;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}

but three style sections below (superseded by the one above) the font-family had a different name:

.fa, .far, .fas {
    font-family: "Font Awesome 5 Free";
}

When we changed it in the top class it didn't immediately change, but with font: 900 normal normal 14px/1 "Font Awesome 5 Free"; the icon appeared:
image

According to this stack post it should be "Font Awesome 5 Free" isn't it? Or is a reference from "FontAwesome" to "Font Awesome 5 Free" somehow missing? I'm a little bit confused as I still don't know where to fix it permanently. Any help would be appreciated.

Versions

Output of

PS > python -c "import sys; print('\n',sys.version); import ipympl; print('ipympl version:', ipympl.__version__)" ; jupyter --version ; jupyter nbextension list ; jupyter labextension list
 3.6.10 (default, Mar  5 2020, 10:17:47) [MSC v.1900 64 bit (AMD64)]
ipympl version: 0.5.8
jupyter core     : 4.6.3
jupyter-notebook : 6.1.4
qtconsole        : not installed
ipython          : 7.16.1
ipykernel        : 5.3.4
jupyter client   : 6.1.7
jupyter lab      : 2.2.2
nbconvert        : 6.0.7
ipywidgets       : 7.5.1
nbformat         : 5.0.8
traitlets        : 4.3.3
Known nbextensions:
  config dir: C:\Users\maxke\.jupyter\nbconfig
    notebook section
      jupyter-js-widgets/extension enabled
      - Validating: ok
  config dir: C:\Users\maxke\.conda\envs\jlab\etc\jupyter\nbconfig
    notebook section
      jupyter-matplotlib/extension enabled
      - Validating: ok
      nbdime/index disabled
      jupyter-js-widgets/extension enabled
      - Validating: ok
JupyterLab v2.2.2
Known labextensions:
   app dir: C:\Users\maxke\.conda\envs\jlab\share\jupyter\lab
        @jupyter-widgets/jupyterlab-manager v2.0.0 enabled  ok
        @jupyterlab/debugger v0.2.0 enabled  ok
        @jupyterlab/toc v4.0.0 enabled  ok
        @krassowski/jupyterlab_go_to_definition v1.0.0 enabled  ok
        @lckr/jupyterlab_variableinspector v0.5.1 enabled  ok
        jupyter-matplotlib v0.7.4 enabled  ok
        nbdime-jupyterlab v2.0.0 enabled  ok
        spreadsheet-editor v0.4.0 enabled  ok
@scimax
Copy link
Author

scimax commented Jan 17, 2021

I have no clue where it came from. But after creating a completely new conda environment it works (still the same packages as before).

@scimax scimax closed this as completed Jan 17, 2021
@github-actions github-actions bot added the resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Apr 18, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

No branches or pull requests

1 participant