Skip to content

Code inside hint illegible in Dark Mode #278

@Seanny123

Description

@Seanny123

Code inside of a hint fails to render visibly when viewing the document in Dark Mode.

Example

Given the following markdown:

## Using `code`

{{< hint danger >}}
Using `code` while dark.
{{< /hint >}}

The rendering is illegible while viewing it in dark mode:
image

But legible in light mode:
image

Possible cause

I think the hint styling over-rides the body font, which also overrides the code's font?

Specifically, in src/sass/_shortcodes.scss:

// {{< hint >}}
.gdoc-hint {
  @each $name, $color in $hint-colors {
    &.#{$name} {
      border-left-color: $color;
      background-color: scale-color($color, $lightness: 95%, $saturation: -30%);
      color: $body-font-color;
    }
  }

  .gdoc-page__anchor {
    display: none;
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions