From 9bdeaddf5f7fa2b68eb5edd6688db5cd3cfc5ae7 Mon Sep 17 00:00:00 2001 From: Andrew Bonventre Date: Wed, 30 Jan 2019 19:00:40 +0000 Subject: [PATCH] godoc/static: inherit textarea color to avoid illegible text 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: 8706d7aa4e183f98144b0b958f745bab12b6ce75 GitHub-Pull-Request: golang/tools#70 Reviewed-on: https://go-review.googlesource.com/c/158137 Reviewed-by: Andrew Bonventre --- godoc/static/style.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/godoc/static/style.css b/godoc/static/style.css index 36d2eb82ac..b77d61ebf2 100644 --- a/godoc/static/style.css +++ b/godoc/static/style.css @@ -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;