Skip to content

Add divs around individual tags #2724

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

Merged
merged 1 commit into from
Oct 3, 2024
Merged

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