posit-dev / py-faicons

An interface to Font Awesome for use in PyShiny
MIT License
5 stars 1 forks source link

An error is being thrown if `icon_svg(height="100%")` #4

Open schloerke opened 1 year ago

schloerke commented 1 year ago

Description

Describe what you were trying to get done.

Tell us what happened, what went wrong, and what you expected to happen.

What I Did

>>> import faicons
>>> faicons.icon_svg("piggy-bank", height = "100%")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/barret/Documents/git/rstudio/py-shiny/py-shiny.nosync/venv/lib/python3.11/site-packages/faicons/_core.py", line 131, in icon_svg
    h = _parse_length_unit(height)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/barret/Documents/git/rstudio/py-shiny/py-shiny.nosync/venv/lib/python3.11/site-packages/faicons/_core.py", line 190, in _parse_length_unit
    raise ValueError(
ValueError: Values provided to `height` and `width` must have a numerical value followed by a CSS length unit.
chendaniely commented 11 months ago

I put more details about where this is coming from in #7