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

Add font to index.css #284

Merged
merged 2 commits into from
Dec 4, 2023
Merged

Conversation

jtmiclat
Copy link
Contributor

@jtmiclat jtmiclat commented Dec 2, 2023

What I am changing

Add missing css to lonboard tooltip

How I did it

The problem is that when inside a jupyter notebook, the tooltip (and other html elements) inherit some css from jupyter lab/notebook compared to running it in exported form. In this cases, it was the font.

Here is the css of the tooltip when in jupyter lab. The one declaring the font is not related to the css of lonboard but the css of the body.
Screenshot 2023-12-02 at 8 25 56 PM

vs css of the tooltip when exported
Screenshot 2023-12-02 at 8 30 27 PM

To fix this I added the missing font to the lonboard css.

How you can test it

Export map

import geopandas as gpd
from lonboard import viz

gdf = gpd.read_parquet(...) # any file will do
map = viz(gdf)
map.to_html("test.html")

Before
Screenshot 2023-12-02 at 8 33 22 PM

After
Screenshot 2023-12-02 at 8 34 02 PM

Related Issues

Closes #248

@kylebarron
Copy link
Member

Thanks! Looks good; I'll do some quick manual tests on Monday and then merge

@kylebarron
Copy link
Member

Looks great! Thanks!

@kylebarron kylebarron merged commit b7876c3 into developmentseed:main Dec 4, 2023
5 checks passed
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.

Fix CSS in static HTML export
2 participants