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

Support g tag inside svgs when creating a custom icon for a custom theme #2258

Closed
FlippieCoetser opened this issue Apr 23, 2023 · 1 comment
Labels
enhancement Improved functionality good first issue Easier issue for first time contributors help wanted Contributions are especially encouraged
Milestone

Comments

@FlippieCoetser
Copy link
Contributor

Search Terms

  • Theming
  • Icons
  • SVG

Background

When using and svg for an icon, it is not uncommon for an svg to contain a g tag to group related shapes or paths.
Below is an example of two circles grouped inside a g:

<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
  <g fill="white" stroke="black" stroke-width="1">
    <circle cx="10" cy="8" r="6" />
    <circle cx="15" cy="15" r="6" />
  </g>
</svg>

In the default TypeDoc theme, the icons are svgs with a rect and a path.
Here is an extract of a path currently used for ReflectionKind.Enum:

<path
  d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z"
  fill="var(--color-text)"
/>

Problem

It is not currently possible to switch the path segment out for a g with, for example, two circles.

image

Suggested Solution

TypeDoc IntrinsicElements properties related to svg does not include g , link

I may miss something but an extension to IntrinsicElements should provide the needed capability.

@FlippieCoetser FlippieCoetser added the enhancement Improved functionality label Apr 23, 2023
@FlippieCoetser FlippieCoetser changed the title Support g tag inside svgs when creating a custom icons for a custom theme Support g tag inside svgs when creating a custom icon for a custom theme Apr 23, 2023
@Gerrit0 Gerrit0 added help wanted Contributions are especially encouraged good first issue Easier issue for first time contributors labels Apr 23, 2023
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Apr 23, 2023

Resolved by #2259

@Gerrit0 Gerrit0 closed this as completed Apr 23, 2023
@Gerrit0 Gerrit0 added this to the v0.24.6 milestone Apr 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improved functionality good first issue Easier issue for first time contributors help wanted Contributions are especially encouraged
Projects
None yet
Development

No branches or pull requests

2 participants