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 <paul.wicking@qt.io>
This commit is contained in:
Topi Reinio 2021-10-13 22:39:34 +02:00
parent fa53c62472
commit f6bb68c548
2 changed files with 26 additions and 28 deletions

View File

@ -114,39 +114,18 @@ a[href*="https://"]::before {
NOTE styles
-------------------------------
*/
.notetitle, .tiptitle, .fastpathtitle {
font-weight: bold
.admonition {
padding: 5px 0 5px 40px;
border: #ccc 1px solid;
}
.attentiontitle, .cautiontitle, .dangertitle, .importanttitle, .remembertitle, .restrictiontitle {
font-weight: bold
.admonition.note, .admonition.important {
background: #f2f2f2 3px 6px no-repeat url(../images/ico_note.png);
}
.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.warning {
background: #f2f2f2 3px 6px no-repeat url(../images/ico_note_attention.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;
}
/*
-------------------------------
Top navigation

View File

@ -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
}