[PATCH 2/5] docs: tweak some Alabaster style parameters

Jonathan Corbet posted 5 patches 3 years, 6 months ago
There is a newer version of this series
[PATCH 2/5] docs: tweak some Alabaster style parameters
Posted by Jonathan Corbet 3 years, 6 months ago
This is just the beginning: tighten up the layout a bit to improve the
information density in the browser.  To that end, add a custom.css file to
tweak Alabaster CSS settings.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
---
 Documentation/conf.py                  |  1 +
 Documentation/sphinx-static/custom.css | 12 ++++++++++++
 2 files changed, 13 insertions(+)
 create mode 100644 Documentation/sphinx-static/custom.css

diff --git a/Documentation/conf.py b/Documentation/conf.py
index 629f4afeb0eb..b924b266a70f 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -345,6 +345,7 @@ if  html_theme == 'classic':
 else:
     html_theme_options = {
         'description': get_cline_version(),
+        'font_size': '14px',
     }
 
 sys.stderr.write("Using %s theme\n" % html_theme)
diff --git a/Documentation/sphinx-static/custom.css b/Documentation/sphinx-static/custom.css
new file mode 100644
index 000000000000..c465251e840a
--- /dev/null
+++ b/Documentation/sphinx-static/custom.css
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * CSS tweaks for the Alabaster theme
+ */
+
+/* Shrink the headers a bit */
+div.body h1 { font-size: 180%; }
+div.body h2 { font-size: 150%; }
+div.body h3 { font-size: 130%; }
+
+/* Tighten up the layout slightly */
+div.body { padding: 0 15px 0 10px; }
-- 
2.37.2
Re: [PATCH 2/5] docs: tweak some Alabaster style parameters
Posted by Jani Nikula 3 years, 6 months ago
On Tue, 04 Oct 2022, Jonathan Corbet <corbet@lwn.net> wrote:
> This is just the beginning: tighten up the layout a bit to improve the
> information density in the browser.  To that end, add a custom.css file to
> tweak Alabaster CSS settings.

Maybe it's just me, but on the wide 4K screen I have the page_width =
940px default is silly narrow.

BR,
Jani.



>
> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
> ---
>  Documentation/conf.py                  |  1 +
>  Documentation/sphinx-static/custom.css | 12 ++++++++++++
>  2 files changed, 13 insertions(+)
>  create mode 100644 Documentation/sphinx-static/custom.css
>
> diff --git a/Documentation/conf.py b/Documentation/conf.py
> index 629f4afeb0eb..b924b266a70f 100644
> --- a/Documentation/conf.py
> +++ b/Documentation/conf.py
> @@ -345,6 +345,7 @@ if  html_theme == 'classic':
>  else:
>      html_theme_options = {
>          'description': get_cline_version(),
> +        'font_size': '14px',
>      }
>  
>  sys.stderr.write("Using %s theme\n" % html_theme)
> diff --git a/Documentation/sphinx-static/custom.css b/Documentation/sphinx-static/custom.css
> new file mode 100644
> index 000000000000..c465251e840a
> --- /dev/null
> +++ b/Documentation/sphinx-static/custom.css
> @@ -0,0 +1,12 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * CSS tweaks for the Alabaster theme
> + */
> +
> +/* Shrink the headers a bit */
> +div.body h1 { font-size: 180%; }
> +div.body h2 { font-size: 150%; }
> +div.body h3 { font-size: 130%; }
> +
> +/* Tighten up the layout slightly */
> +div.body { padding: 0 15px 0 10px; }

-- 
Jani Nikula, Intel Open Source Graphics Center
Re: [PATCH 2/5] docs: tweak some Alabaster style parameters
Posted by Jonathan Corbet 3 years, 6 months ago
Jani Nikula <jani.nikula@linux.intel.com> writes:

> On Tue, 04 Oct 2022, Jonathan Corbet <corbet@lwn.net> wrote:
>> This is just the beginning: tighten up the layout a bit to improve the
>> information density in the browser.  To that end, add a custom.css file to
>> tweak Alabaster CSS settings.
>
> Maybe it's just me, but on the wide 4K screen I have the page_width =
> 940px default is silly narrow.

The real problem, of course, is defining things in terms of pixels to
begin with.  Redefining those things in resolution-independent units
(em, for example) would be an improvement.

When we get our CSS person to show up they can certainly fix that up for
us :)

Thanks,

jon