Open jherdman opened 2 years ago
Thanks for the suggestion. Definitely not against this idea in principle but would only be possible if somebody from the community were prepared to work on this.
Obviously this kind of API change would require a major version bump. Version 2.0 is around the corner, so if anybody wants this to happen soon, and can spare the time to work on it, please let me know.
To aid with tooling like AlpineJS the following would be nice:
Ideally any HTML attribute ought to be supported.
Let's look at the options table:
id
class
style
data
size
Can also be set using
height
and/orwidth
attributes, which take precedence oversize
Supplied as "{Width} {Height}" or "{Number}", so "30px\45px" becomes
width="30px"
andheight="45px"
, and "50%" becomeswidth="50%"
andheight="50%"
title
desc
nocomment
preserve_aspect_ratio
preserveAspectRatio
attribute to the SVGaria
aria_hidden
aria-hidden=true
attribute to the SVGfallback
I think a great many of these would benefit from a change in API that allowed for arbitrary HTML attrs.
Hypothetical future API: