From 1e48169bbcdefa1fdbc146e71835154d6ce7bdea Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Wed, 3 Jul 2019 07:40:25 +0200 Subject: [PATCH] Implement some custom formatting for input fields in the documentation (#11632) * Implement some custom formatting for input fields in the documentation Aside of resulting in more consistent appearance across browsers, this also fixes input form rendering when using Firefox with a dark system theme on Linux. * change the expected html in the tests (cherry picked from commit 0a1cb631a2c36574180469013425873984d82b16) --- config/nimdoc.cfg | 17 +++++++++++++++++ .../test_out_index_dot_html/expected/index.html | 17 +++++++++++++++++ .../expected/theindex.html | 17 +++++++++++++++++ .../expected/subdir/subdir_b/utils.html | 17 +++++++++++++++++ nimdoc/testproject/expected/testproject.html | 17 +++++++++++++++++ nimdoc/testproject/expected/theindex.html | 17 +++++++++++++++++ 6 files changed, 102 insertions(+) diff --git a/config/nimdoc.cfg b/config/nimdoc.cfg index a2860af142..6fca53545c 100644 --- a/config/nimdoc.cfg +++ b/config/nimdoc.cfg @@ -297,6 +297,23 @@ input#searchInput { width: 80%; } +/* + * Some custom formatting for input forms. + * This also fixes input form colors on Firefox with a dark system theme on Linux. + */ +input { + -moz-appearance: none; + color: #333; + background-color: #f8f8f8; + border: 1px solid #aaa; + font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif; + font-size: 0.9em; + padding: 6px; +} +input:focus { + border: 1px solid #1fa0eb; + box-shadow: 0 0 2px #1fa0eb; +} /* Docgen styles */ /* Links */ diff --git a/nimdoc/test_out_index_dot_html/expected/index.html b/nimdoc/test_out_index_dot_html/expected/index.html index 1dbcdd51c0..c9d582dc3b 100644 --- a/nimdoc/test_out_index_dot_html/expected/index.html +++ b/nimdoc/test_out_index_dot_html/expected/index.html @@ -99,6 +99,23 @@ input#searchInput { width: 80%; } +/* + * Some custom formatting for input forms. + * This also fixes input form colors on Firefox with a dark system theme on Linux. + */ +input { + -moz-appearance: none; + color: #333; + background-color: #f8f8f8; + border: 1px solid #aaa; + font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif; + font-size: 0.9em; + padding: 6px; +} +input:focus { + border: 1px solid #1fa0eb; + box-shadow: 0 0 2px #1fa0eb; +} /* Docgen styles */ /* Links */ diff --git a/nimdoc/test_out_index_dot_html/expected/theindex.html b/nimdoc/test_out_index_dot_html/expected/theindex.html index 9213f14590..9a04738c28 100644 --- a/nimdoc/test_out_index_dot_html/expected/theindex.html +++ b/nimdoc/test_out_index_dot_html/expected/theindex.html @@ -99,6 +99,23 @@ input#searchInput { width: 80%; } +/* + * Some custom formatting for input forms. + * This also fixes input form colors on Firefox with a dark system theme on Linux. + */ +input { + -moz-appearance: none; + color: #333; + background-color: #f8f8f8; + border: 1px solid #aaa; + font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif; + font-size: 0.9em; + padding: 6px; +} +input:focus { + border: 1px solid #1fa0eb; + box-shadow: 0 0 2px #1fa0eb; +} /* Docgen styles */ /* Links */ diff --git a/nimdoc/testproject/expected/subdir/subdir_b/utils.html b/nimdoc/testproject/expected/subdir/subdir_b/utils.html index 6f7a0c6e42..478854a1e9 100644 --- a/nimdoc/testproject/expected/subdir/subdir_b/utils.html +++ b/nimdoc/testproject/expected/subdir/subdir_b/utils.html @@ -99,6 +99,23 @@ input#searchInput { width: 80%; } +/* + * Some custom formatting for input forms. + * This also fixes input form colors on Firefox with a dark system theme on Linux. + */ +input { + -moz-appearance: none; + color: #333; + background-color: #f8f8f8; + border: 1px solid #aaa; + font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif; + font-size: 0.9em; + padding: 6px; +} +input:focus { + border: 1px solid #1fa0eb; + box-shadow: 0 0 2px #1fa0eb; +} /* Docgen styles */ /* Links */ diff --git a/nimdoc/testproject/expected/testproject.html b/nimdoc/testproject/expected/testproject.html index 1b2458a9be..273defbbfb 100644 --- a/nimdoc/testproject/expected/testproject.html +++ b/nimdoc/testproject/expected/testproject.html @@ -99,6 +99,23 @@ input#searchInput { width: 80%; } +/* + * Some custom formatting for input forms. + * This also fixes input form colors on Firefox with a dark system theme on Linux. + */ +input { + -moz-appearance: none; + color: #333; + background-color: #f8f8f8; + border: 1px solid #aaa; + font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif; + font-size: 0.9em; + padding: 6px; +} +input:focus { + border: 1px solid #1fa0eb; + box-shadow: 0 0 2px #1fa0eb; +} /* Docgen styles */ /* Links */ diff --git a/nimdoc/testproject/expected/theindex.html b/nimdoc/testproject/expected/theindex.html index 58cab3ef31..f97ea54b92 100644 --- a/nimdoc/testproject/expected/theindex.html +++ b/nimdoc/testproject/expected/theindex.html @@ -99,6 +99,23 @@ input#searchInput { width: 80%; } +/* + * Some custom formatting for input forms. + * This also fixes input form colors on Firefox with a dark system theme on Linux. + */ +input { + -moz-appearance: none; + color: #333; + background-color: #f8f8f8; + border: 1px solid #aaa; + font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif; + font-size: 0.9em; + padding: 6px; +} +input:focus { + border: 1px solid #1fa0eb; + box-shadow: 0 0 2px #1fa0eb; +} /* Docgen styles */ /* Links */