Skip to content

Code snippets on devblogs.microsoft.com for Typescript 4.5 in dark mode are broken #62497

@spanishpear

Description

@spanishpear

Acknowledgement

  • I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion.

Comment

This is definitely the wrong place to raise it - but I thought I'd at least open an issue! Not sure that it is https://github.com/microsoft/TypeScript-Website either.

It seems that the dark mode code snippet preview is a bit broken for the 4.5 release announcement:

  • someFunc is white and unreadable
  • { and } as well
  • the copy button seems disjoint from the snippet (minor, it still works)
Image

On the light theme of the post, the contents are fine. It seems that the font color is set to color: var(--clr-body); which flips between black and white on light/dark mode. Removing this from the code blocks makes things a bit better!

Interestingly the 4.6 beta/next post does not have this issue (though, the blue is hard to read 😛)

Image

And, neither does the 4.4 release announcement

Image

I acknowledge that this Issue is likely outside the scope of the TS repo itself, and may be closed, but will report it anyways so that it is on someones radar :D

There are a few more bugs as well, (e.g. code escaping code blocks on smaller widths) - if this is the best place to raise it :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Won't FixThe severity and priority of this issue do not warrant the time or complexity needed to fix it

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions