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

types used in Returns section of functions are shown in white instead of green / red #2546

Closed
sapphi-red opened this issue Apr 12, 2024 · 2 comments
Labels
bug Functionality does not match expectation

Comments

@sapphi-red
Copy link

Search terms

default theme, returns, function, link, css

Expected Behavior

Types with a link in "Returns" section of functions are shown in green / red (depending on whether it is a type or interface).

image

(I tweaked the CSS a bit to make this image)

Actual Behavior

Types with a link in "Returns" section of functions are shown in white.

https://typedoc.org/api/functions/JSX.createElement.html
image

It seems

h1 > a:not(.link), h2 > a:not(.link), h3 > a:not(.link), h4 > a:not(.link), h5 > a:not(.link), h6 > a:not(.link) {
    text-decoration: none;
    color: var(--color-text);
}

is overriding the color.

Steps to reproduce the bug

See the actual behavior section.

Environment

  • Typedoc version: 0.25.13
  • TypeScript version: 5.3.3
  • Node.js version: 20.11.1
  • OS: Windows
@sapphi-red sapphi-red added the bug Functionality does not match expectation label Apr 12, 2024
@nicfv
Copy link

nicfv commented Apr 13, 2024

I'm experiencing this too! But my suggestion is to color the return value to whatever the corresponding color in the theme is. For example, in the base dark theme, it seems like

  • Green = interface
  • Blue = class
  • Red = type alias
  • etc...
    So it would be great if Typedoc checked what "kind" of value it's returning, and then color it appropriately.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Apr 14, 2024

I have no idea why I decided to use that nasty css rather than just adding a class on headers... and while I'm in there, why doesn't that use the anchor icon like literally every other anchor in TypeDoc!?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality does not match expectation
Projects
None yet
Development

No branches or pull requests

3 participants