diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-12-05 17:31:31 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-12-05 17:31:31 +0100 |
| commit | db8ddbf570fa7d8df5d71b19b44a771c80c689ba (patch) | |
| tree | 3d198a0000c0c751e2e02558fc0d209cc229494e /src/librustdoc/html/static/rustdoc.css | |
| parent | c7cff213e937c1bb301be807ce04fcf6092b9163 (diff) | |
| download | rust-db8ddbf570fa7d8df5d71b19b44a771c80c689ba.tar.gz rust-db8ddbf570fa7d8df5d71b19b44a771c80c689ba.zip | |
Move tooltips messages to CSS instead of inside HTML
Diffstat (limited to 'src/librustdoc/html/static/rustdoc.css')
| -rw-r--r-- | src/librustdoc/html/static/rustdoc.css | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index 8eef65a231d..afc4308b68f 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -1079,20 +1079,29 @@ h3 > .collapse-toggle, h4 > .collapse-toggle { cursor: pointer; } -.tooltip .tooltiptext { - width: 120px; +.tooltip::after { display: none; text-align: center; padding: 5px 3px 3px 3px; border-radius: 6px; margin-left: 5px; - top: -5px; - left: 105%; - z-index: 10; font-size: 16px; } -.tooltip .tooltiptext::after { +.tooltip.ignore::after { + content: "This example is not tested"; +} +.tooltip.compile_fail::after { + content: "This example deliberately fails to compile"; +} +.tooltip.should_panic::after { + content: "This example panics"; +} +.tooltip.edition::after { + content: "This code runs with edition " attr(edition); +} + +.tooltip::before { content: " "; position: absolute; top: 50%; @@ -1100,9 +1109,10 @@ h3 > .collapse-toggle, h4 > .collapse-toggle { margin-top: -5px; border-width: 5px; border-style: solid; + display: none; } -.tooltip:hover .tooltiptext { +.tooltip:hover::before, .tooltip:hover::after { display: inline; } |
