Support <text> element in SVGs #2726
Labels
enhancement
Improved functionality
good first issue
Easier issue for first time contributors
help wanted
Contributions are especially encouraged
Search Terms
svg, icons, text vs path
Problem
The icons used to represent the various types have very small letters and are harder to identify for those with poor eyesight.
Suggested Solution
Support the
<text>
element inside SVGs, allowing theme builders to replace thepartials/icon.tsx
file within their theme to use an actual text letter. Doing this allows the font/color/size to be set to something more accessible and easier to identify for those needing support.Doing this would require updating
utils/jsx.elements.ts
with the following:text: JsxTextElementProps;
in theIntrinsicElements
interface.Doing this will allow theme builders to update the icon paths with text elements in an included
partials/icon.tsx
file making the icons easier to read.A side-by-side comparison of updated icons, manually updated in the generated javascript file.
OPTIONAL addition
Update the
partials/icon.tsx
file within the default theme to use<text>
elements by default.The icon for Module would go from:
to something like this:
Adding in additional properties on the text element for font size, color (independent of the base text color of the page), etc would allow users are able to make the icons as readable and useful as possible without having to rebuild their own icons. Likely doing that would also require the x/y values on the text elements to be configurable, so there's stuff to think about in there.
The text was updated successfully, but these errors were encountered: