Skip to content

Commit

Permalink
godoc/static: inherit textarea color to avoid illegible text
Browse files Browse the repository at this point in the history
The cascading sylesheet from the users UI can be inverted.
If the background color is altered in the textarea and the text
style is left unchanged the text may become illegible.
The default value of the textarea color is that of the users UI
styling and is not the same as that of the document body.
Setting color: inherit; resolves this.

Fixes golang/go#29482

Change-Id: Iaa6780154e0bd01d2a8219d813468dab25331b46
GitHub-Last-Rev: 8706d7a
GitHub-Pull-Request: #70
Reviewed-on: https://go-review.googlesource.com/c/158137
Reviewed-by: Andrew Bonventre <andybons@golang.org>
  • Loading branch information
andybons committed Jan 30, 2019
1 parent cb89afa commit 9bdeadd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions godoc/static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ body {
text-align: center;
color: #222;
}
textarea {
/* Inherit text color from body avoiding illegible text in the case where the
* user has inverted the browsers custom text and background colors. */
color: inherit;
}
pre,
code {
font-family: Menlo, monospace;
Expand Down

0 comments on commit 9bdeadd

Please sign in to comment.