@@ -1156,42 +1156,100 @@ pre.rust .question-mark {
1156
1156
font-weight : bold;
1157
1157
}
1158
1158
1159
- pre .compile_fail ,
1160
- pre .should_panic {
1159
+ . example-wrap .compile_fail ,
1160
+ . example-wrap .should_panic {
1161
1161
border-left : 2px solid var (--codeblock-error-color );
1162
1162
}
1163
1163
1164
- pre .ignore {
1164
+ .ignore . example-wrap {
1165
1165
border-left : 2px solid var (--codeblock-ignore-color );
1166
1166
}
1167
1167
1168
- .example-wrap : hover pre .compile_fail ,
1169
- .example-wrap : hover pre .should_panic {
1168
+ .example-wrap .compile_fail : hover ,
1169
+ .example-wrap .should_panic : hover {
1170
1170
border-left : 2px solid var (--codeblock-error-hover-color );
1171
1171
}
1172
1172
1173
- .example-wrap : hover pre .ignore {
1173
+ .example-wrap .ignore : hover {
1174
1174
border-left : 2px solid var (--codeblock-ignore-hover-color );
1175
1175
}
1176
1176
1177
- .tooltip .compile_fail ,
1178
- .tooltip .should_panic {
1177
+ .example-wrap .compile_fail . tooltip ,
1178
+ .example-wrap .should_panic . tooltip {
1179
1179
color : var (--codeblock-error-color );
1180
1180
}
1181
1181
1182
- .tooltip .ignore {
1182
+ .example-wrap .ignore . tooltip {
1183
1183
color : var (--codeblock-ignore-color );
1184
1184
}
1185
1185
1186
- .example-wrap : hover .tooltip . compile_fail ,
1187
- .example-wrap : hover .tooltip . should_panic {
1186
+ .example-wrap . compile_fail : hover .tooltip ,
1187
+ .example-wrap . should_panic : hover .tooltip {
1188
1188
color : var (--codeblock-error-hover-color );
1189
1189
}
1190
1190
1191
- .example-wrap : hover .tooltip . ignore {
1191
+ .example-wrap . ignore : hover .tooltip {
1192
1192
color : var (--codeblock-ignore-hover-color );
1193
1193
}
1194
1194
1195
+ .example-wrap .tooltip {
1196
+ position : absolute;
1197
+ display : block;
1198
+ cursor : pointer;
1199
+ left : -25px ;
1200
+ top : 5px ;
1201
+ }
1202
+
1203
+ .example-wrap .tooltip ::after {
1204
+ display : none;
1205
+ text-align : center;
1206
+ padding : 5px 3px 3px 3px ;
1207
+ border-radius : 6px ;
1208
+ margin-left : 5px ;
1209
+ font-size : 1rem ;
1210
+ border : 1px solid var (--border-color );
1211
+ position : absolute;
1212
+ width : max-content;
1213
+ top : -2px ;
1214
+ z-index : 1 ;
1215
+ }
1216
+
1217
+ .example-wrap .tooltip ::before {
1218
+ content : " " ;
1219
+ position : absolute;
1220
+ top : 50% ;
1221
+ left : 16px ;
1222
+ margin-top : -5px ;
1223
+ border-width : 5px ;
1224
+ border-style : solid;
1225
+ display : none;
1226
+ z-index : 1 ;
1227
+ }
1228
+
1229
+ .example-wrap .ignore .tooltip ::after {
1230
+ content : "This example is not tested" ;
1231
+ }
1232
+ .example-wrap .compile_fail .tooltip ::after {
1233
+ content : "This example deliberately fails to compile" ;
1234
+ }
1235
+ .example-wrap .should_panic .tooltip ::after {
1236
+ content : "This example panics" ;
1237
+ }
1238
+ .example-wrap .edition .tooltip ::after {
1239
+ content : "This code runs with edition " attr (data-edition);
1240
+ }
1241
+
1242
+ .example-wrap .tooltip : hover ::before , .example-wrap .tooltip : hover ::after {
1243
+ display : inline;
1244
+ }
1245
+
1246
+ .example-wrap .compile_fail .tooltip ,
1247
+ .example-wrap .should_panic .tooltip ,
1248
+ .example-wrap .ignore .tooltip {
1249
+ font-weight : bold;
1250
+ font-size : 1.25rem ;
1251
+ }
1252
+
1195
1253
a .test-arrow {
1196
1254
display : inline-block;
1197
1255
visibility : hidden;
@@ -1257,62 +1315,6 @@ h3.variant {
1257
1315
padding-right : 3px ;
1258
1316
}
1259
1317
1260
- .information {
1261
- position : absolute;
1262
- left : -25px ;
1263
- margin-top : 7px ;
1264
- z-index : 1 ;
1265
- }
1266
-
1267
- .tooltip {
1268
- position : relative;
1269
- display : inline-block;
1270
- cursor : pointer;
1271
- }
1272
-
1273
- .tooltip ::after {
1274
- display : none;
1275
- text-align : center;
1276
- padding : 5px 3px 3px 3px ;
1277
- border-radius : 6px ;
1278
- margin-left : 5px ;
1279
- font-size : 1rem ;
1280
- border : 1px solid var (--border-color );
1281
- }
1282
-
1283
- .tooltip .ignore ::after {
1284
- content : "This example is not tested" ;
1285
- }
1286
- .tooltip .compile_fail ::after {
1287
- content : "This example deliberately fails to compile" ;
1288
- }
1289
- .tooltip .should_panic ::after {
1290
- content : "This example panics" ;
1291
- }
1292
- .tooltip .edition ::after {
1293
- content : "This code runs with edition " attr (data-edition);
1294
- }
1295
-
1296
- .tooltip ::before {
1297
- content : " " ;
1298
- position : absolute;
1299
- top : 50% ;
1300
- left : 16px ;
1301
- margin-top : -5px ;
1302
- border-width : 5px ;
1303
- border-style : solid;
1304
- display : none;
1305
- }
1306
-
1307
- .tooltip : hover ::before , .tooltip : hover ::after {
1308
- display : inline;
1309
- }
1310
-
1311
- .tooltip .compile_fail , .tooltip .should_panic , .tooltip .ignore {
1312
- font-weight : bold;
1313
- font-size : 1.25rem ;
1314
- }
1315
-
1316
1318
.notable-traits-tooltip {
1317
1319
display : inline-block;
1318
1320
cursor : pointer;
@@ -1354,7 +1356,7 @@ h3.variant {
1354
1356
display : block;
1355
1357
}
1356
1358
1357
- .notable-traits .docblock code .content {
1359
+ .notable-traits .docblock code .content {
1358
1360
margin : 0 ;
1359
1361
padding : 0 ;
1360
1362
font-size : 1.25rem ;
@@ -1723,7 +1725,7 @@ in storage.js plus the media query with (max-width: 700px)
1723
1725
to prevent an overlay between the "collapse toggle" and the information tooltip.
1724
1726
However, it's not needed with smaller screen width because the doc/code block is always put
1725
1727
"one line" below. */
1726
- .docblock > .example-wrap : first-child > . information > .tooltip {
1728
+ .docblock > .example-wrap : first-child .tooltip {
1727
1729
margin-top : 16px ;
1728
1730
}
1729
1731
0 commit comments