diff options
| author | Antonin Godard <antonin.godard@bootlin.com> | 2026-02-02 11:47:30 +0100 |
|---|---|---|
| committer | Paul Barker <paul@pbarker.dev> | 2026-04-22 09:48:06 +0100 |
| commit | 5a3aeb80ff2df3efcf786034b93bc321d7d0562f (patch) | |
| tree | 062fbe0603a8d83d38a1233356f3860cf996d05c | |
| parent | e352389ad92264783659ab426d5549ea2c9982c3 (diff) | |
| download | poky-5a3aeb80ff2df3efcf786034b93bc321d7d0562f.tar.gz | |
sphinx-static/theme_overrides.css: switch to a fixed width documentation
Change the css rules of our theme to have a fixed-width documentation
instead of it taking the full width of the page. I believe this makes it
much more readable compared to having long lines with few line returns,
especially on high-resolution displays. Set the width to 1000px instead
of the previous 800px, which felt slightly too thin.
I think the removed comment here does not make that much sense for us.
It was added by commit 0c1e108bc6c4 ("sphinx: add CSS theme override"),
and I believe is a simply copy and paste of what was is set in the Linux
kernel, added by commit 9abaf979abb2 ("doc-rst: customize RTD theme,
table & full width") [1].
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9abaf979abb2
(From yocto-docs rev: 680edf7ffdf2286c64c32de74be5b6353294122f)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit 98234c9d3a0846d719630914bea8599da9f51374)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Paul Barker <paul@pbarker.dev>
| -rw-r--r-- | documentation/sphinx-static/theme_overrides.css | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/documentation/sphinx-static/theme_overrides.css b/documentation/sphinx-static/theme_overrides.css index d235cb826f..3cb16dbccc 100644 --- a/documentation/sphinx-static/theme_overrides.css +++ b/documentation/sphinx-static/theme_overrides.css | |||
| @@ -99,14 +99,19 @@ em { | |||
| 99 | [alt='Permalink'] { color: #eee; } | 99 | [alt='Permalink'] { color: #eee; } |
| 100 | [alt='Permalink']:hover { color: black; } | 100 | [alt='Permalink']:hover { color: black; } |
| 101 | 101 | ||
| 102 | .literal-block { | ||
| 103 | background: #f8f8f8; | ||
| 104 | } | ||
| 105 | |||
| 102 | @media screen { | 106 | @media screen { |
| 103 | /* content column | 107 | .wy-nav-content { |
| 104 | * | 108 | max-width: 1000px; |
| 105 | * RTD theme's default is 800px as max width for the content, but we have | 109 | background: #fcfcfc; |
| 106 | * tables with tons of columns, which need the full width of the view-port. | 110 | } |
| 107 | */ | ||
| 108 | 111 | ||
| 109 | .wy-nav-content{max-width: none; } | 112 | .wy-nav-content-wrap { |
| 113 | background: #efefef; | ||
| 114 | } | ||
| 110 | 115 | ||
| 111 | /* inline literal: drop the borderbox, padding and red color */ | 116 | /* inline literal: drop the borderbox, padding and red color */ |
| 112 | code, .rst-content tt, .rst-content code { | 117 | code, .rst-content tt, .rst-content code { |
