@@ -270,15 +270,15 @@ ul ul, ol ul, ul ol, ol ol {
270
270
margin-bottom : .625em ;
271
271
}
272
272
273
- p {
273
+ p , . docblock > . warning {
274
274
/* Paragraph spacing at least 1.5 times line spacing per Web Content Accessibility Guidelines.
275
275
Line-height is 1.5rem, so line spacing is .5rem; .75em is 1.5 times that.
276
276
https://www.w3.org/WAI/WCAG21/Understanding/visual-presentation.html */
277
277
margin : 0 0 .75em 0 ;
278
278
}
279
279
/* For the last child of a div, the margin will be taken care of
280
280
by the margin-top of the next item. */
281
- p : last-child {
281
+ p : last-child , . docblock > . warning : last-child {
282
282
margin : 0 ;
283
283
}
284
284
@@ -1096,7 +1096,7 @@ pre.rust .doccomment {
1096
1096
}
1097
1097
1098
1098
.example-wrap .ignore .tooltip {
1099
- color : var (--codeblock-ignore-color );
1099
+ color : var (--codeblock-ignore-color );
1100
1100
}
1101
1101
1102
1102
.example-wrap .compile_fail : hover .tooltip ,
@@ -1124,6 +1124,26 @@ pre.rust .doccomment {
1124
1124
font-size : 1.25rem ;
1125
1125
}
1126
1126
1127
+ /* This class only exists for users who want to draw attention to a particular element in their
1128
+ documentation. */
1129
+ .content .docblock .warning {
1130
+ border-left : 2px solid var (--warning-border-color );
1131
+ padding : 14px ;
1132
+ position : relative;
1133
+ /* The "!important" part is required because the rule is otherwise overruled in this CSS
1134
+ selector: ".docblock > :not(.more-examples-toggle):not(.example-wrap)" */
1135
+ overflow-x : visible !important ;
1136
+ }
1137
+ .content .docblock .warning ::before {
1138
+ color : var (--warning-border-color );
1139
+ content : "ⓘ" ;
1140
+ position : absolute;
1141
+ left : -25px ;
1142
+ top : 5px ;
1143
+ font-weight : bold;
1144
+ font-size : 1.25rem ;
1145
+ }
1146
+
1127
1147
a .test-arrow {
1128
1148
visibility : hidden;
1129
1149
position : absolute;
0 commit comments