From f10a033619171421d24e6f067bfddc69ff1f0134 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 21 Apr 2015 10:29:40 +0200 Subject: [PATCH] [FIX] double underlining of some document titles h2/second-level sections are overlined to separate them from one another. However if the document has no introductory paragraph (text between the h1/document title and the first subsection) the h1 has an underline and the section's overline, which isn't great. Fix CSS so a 2nd-level section which immediately follows an h1 does not get the overline. --- _themes/odoodoc/static/style.css | 5 ++++- _themes/odoodoc/static/style.less | 11 +++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/_themes/odoodoc/static/style.css b/_themes/odoodoc/static/style.css index 079d7a3b4..36b50ffa2 100644 --- a/_themes/odoodoc/static/style.css +++ b/_themes/odoodoc/static/style.css @@ -7226,9 +7226,12 @@ td.field-body > ul { .stripe .section:not(.force-right) > [class*=highlight-] .highlight .il { color: #2aa198; } - .stripe .body > .section > .section { + .stripe .body > .section .section { border-top: 1px solid #eeeeee; } + .stripe .body > .section h1 + .section { + border-top: none; + } .stripe .section:not(.force-right) > h1, .stripe .section:not(.force-right) > h2, .stripe .section:not(.force-right) > h3, diff --git a/_themes/odoodoc/static/style.less b/_themes/odoodoc/static/style.less index 376b42200..9d693d562 100644 --- a/_themes/odoodoc/static/style.less +++ b/_themes/odoodoc/static/style.less @@ -738,8 +738,15 @@ td.field-body { } } // separator above H2 - .body > .section > .section { - border-top: 1px solid @color-right; + .body > .section > { + .section { + border-top: 1px solid @color-right; + } + // but not if subsection directly follows an h1 (no introductory + // document paragraph) + h1 + .section { + border-top: none; + } } .section:not(.force-right) > h1, .section:not(.force-right) > h2, .section:not(.force-right) > h3, .section:not(.force-right) > h4,