From 8faa369791c9e0e040b1ea7f64269ffcf2a05cf7 Mon Sep 17 00:00:00 2001 From: Rosen Stoyanov Date: Tue, 20 Aug 2024 15:56:37 +0300 Subject: docs(gen_help_html): wrap headings for narrow viewport #29903 Problem: The headings and help tags overlap when browsing the docs in neovim.io/doc/user/ from a mobile phone. Solution: Apply the correct CSS rules so that the headings and help tags wrap nicely below one another. --- scripts/gen_help_html.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/gen_help_html.lua b/scripts/gen_help_html.lua index 003f3efa03..117e6c27d5 100644 --- a/scripts/gen_help_html.lua +++ b/scripts/gen_help_html.lua @@ -1146,10 +1146,11 @@ local function gen_css(fname) font-size: smaller; } .help-heading { - overflow: hidden; - white-space: nowrap; + white-space: normal; display: flex; + flex-flow: row wrap; justify-content: space-between; + gap: 0 15px; } /* The (right-aligned) "tags" part of a section heading. */ .help-heading-tags { @@ -1184,8 +1185,7 @@ local function gen_css(fname) pre:last-child { margin-bottom: 0; } - pre:hover, - .help-heading:hover { + pre:hover { overflow: visible; } .generator-stats { -- cgit