Skip to content

Conversation

lriggle-strib
Copy link
Contributor

@lriggle-strib lriggle-strib commented Oct 3, 2024

Resolves: #2723

Description

Wraps tags in comment.tsx in a div and includes a css class of the specific tag being displayed. Doing this allows for more targeted styling of individual tags.

When generating documentation, output of tags on a page goes from:

<div class="tsd-comment tsd-typography">
  <h4 class="tsd-anchor-link">
    <a id="Todo" class="tsd-anchor"></a>
    Todo
    <a href="#Todo" aria-label="Permalink" class="tsd-anchor-icon">
      <svg viewBox="0 0 24 24">
        <use href="../assets/icons.svg#icon-anchor"></use>
      </svg>
    </a>
  </h4>
  <p>Some task to accomplish in the future</p>
</div>

to:

<div class="tsd-comment tsd-typography">
  <div class="tsd-tag-Todo">
    <h4 class="tsd-anchor-link">
      <a id="Todo" class="tsd-anchor"></a>
      Todo
      <a href="#Todo" aria-label="Permalink" class="tsd-anchor-icon">
        <svg viewBox="0 0 24 24">
          <use href="../assets/icons.svg#icon-anchor"></use>
        </svg>
      </a>
    </h4>
    <p>Some task to accomplish in the future</p>
  </div>
</div>

Note: both of the above code snippets are formatted for ease of reading.

 Changes to be committed:
	modified:   src/lib/output/themes/default/partials/comment.tsx
Copy link
Collaborator

@Gerrit0 Gerrit0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Gerrit0 Gerrit0 merged commit 40d1cec into TypeStrong:master Oct 3, 2024
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.

Add divs around individual tags and give them css classes specific to the tag used

2 participants