From f6bb68c54810cc877ede4d5d3dcb155cc5ea2b4e Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Wed, 13 Oct 2021 22:39:34 +0200 Subject: Doc: Add styling for note/warning/important admonitions The offline CSS already had some related rules, but at some point QDoc lost the ability to produce the required markup. It has now been reintroduced. Pick-to: 6.2 5.15 Task-number: QTBUG-97448 Change-Id: I5165cd01f3653dfb35854ca6b8040e8daa434347 Reviewed-by: Paul Wicking --- doc/global/template/style/offline.css | 35 +++++++---------------------------- doc/global/template/style/online.css | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+), 28 deletions(-) (limited to 'doc') diff --git a/doc/global/template/style/offline.css b/doc/global/template/style/offline.css index acfae7eb10..4075845549 100644 --- a/doc/global/template/style/offline.css +++ b/doc/global/template/style/offline.css @@ -114,39 +114,18 @@ a[href*="https://"]::before { NOTE styles ------------------------------- */ - -.notetitle, .tiptitle, .fastpathtitle { - font-weight: bold -} - -.attentiontitle, .cautiontitle, .dangertitle, .importanttitle, .remembertitle, .restrictiontitle { - font-weight: bold +.admonition { + padding: 5px 0 5px 40px; + border: #ccc 1px solid; } -.note, .tip, .fastpath { - background: #F2F2F2 url(../images/ico_note.png); - background-repeat: no-repeat; - background-position: top left; - padding: 5px; - padding-left: 40px; - padding-bottom: 10px; - border: #999 1px dotted; - color: #666666; - margin: 5px; +.admonition.note, .admonition.important { + background: #f2f2f2 3px 6px no-repeat url(../images/ico_note.png); } -.attention, .caution, .danger, .important, .remember, .restriction { - background: #F2F2F2 url(../images/ico_note_attention.png); - background-repeat: no-repeat; - background-position: top left; - padding: 5px; - padding-left: 40px; - padding-bottom: 10px; - border: #999 1px dotted; - color: #666666; - margin: 5px; +.admonition.warning { + background: #f2f2f2 3px 6px no-repeat url(../images/ico_note_attention.png); } - /* ------------------------------- Top navigation diff --git a/doc/global/template/style/online.css b/doc/global/template/style/online.css index 7ad121d51f..23d387430e 100644 --- a/doc/global/template/style/online.css +++ b/doc/global/template/style/online.css @@ -987,6 +987,25 @@ pre, .LegaleseLeft { color:#fff; white-space: pre-wrap } +div.admonition { + margin:1.5em 0 1.5em; + padding:12px; +} +div.admonition.note { + background-color:#c5d3f4; + border-left:5px solid #7a9ae5; +} +div.admonition.warning { + background-color:#ffe4e4; + border-left:5px solid #ff8383; +} +div.admonition.important { + background-color:#fef9f3; + border-left:5px solid #f6cb97; +} +.mainContent .admonition p { + margin:0; +} pre .str,code .str { color:#aaaaaa } -- cgit v1.2.3