Skip to content

Commit

Permalink
_content/css: fix image background color in dark mode
Browse files Browse the repository at this point in the history
Transparent images on the doc pages assume there is a white background.
This change preserves the white background for images when the site is
viewed with the dark theme.

For golang/go#34601.

Change-Id: I4c0a28d173d7ecf52547da6e5a6382d84bc922e3
Reviewed-on: https://go-review.googlesource.com/c/website/+/392479
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Trust: Jamal Carvalho <jamalcarvalho@google.com>
  • Loading branch information
passionSeven committed Mar 17, 2022
1 parent 2325a51 commit 2a0ef3a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion _content/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,9 @@ h1 + h2.subtitle {
.Article pre {
margin-left: 1.5rem;
}
.Article.Doc img {
background-color: var(--white);
}
.BreadcrumbNav-inner {
display: flex;
flex-wrap: wrap;
Expand Down Expand Up @@ -3719,7 +3722,7 @@ img.PullQuote-image {
fill: var(--color-text);
}
#blog .image > img {
background-color: var(--color-text);
background-color: var(--white);
}
#blogindex p.blogtitle a {
font-weight: bold;
Expand Down

0 comments on commit 2a0ef3a

Please sign in to comment.