diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-12-06 15:33:01 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-12-07 10:44:55 +0100 |
| commit | bf681dcfb52c9f6a54ab4e72a8f827f702fcd1a7 (patch) | |
| tree | d9358a89dac08892b5ece0b7c5a0289c32585e4e /src/librustdoc/html/static/css/rustdoc.css | |
| parent | cf8d81213c193fc0ca9f2b99165476f8ae028295 (diff) | |
| download | rust-bf681dcfb52c9f6a54ab4e72a8f827f702fcd1a7.tar.gz rust-bf681dcfb52c9f6a54ab4e72a8f827f702fcd1a7.zip | |
Fix display of features in rustdoc
Diffstat (limited to 'src/librustdoc/html/static/css/rustdoc.css')
| -rw-r--r-- | src/librustdoc/html/static/css/rustdoc.css | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index b898eb5d381..6e61969a8c1 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -1081,15 +1081,9 @@ so that we can apply CSS-filters to change the arrow color in themes */ } .item-info .stab { - /* This min-height is needed to unify the height of the stab elements because some of them - have emojis. - */ - min-height: 36px; - display: flex; + display: block; padding: 3px; margin-bottom: 5px; - align-items: center; - vertical-align: text-bottom; } .item-name .stab { margin-left: 0.3125em; @@ -1112,17 +1106,26 @@ so that we can apply CSS-filters to change the arrow color in themes */ color: var(--stab-code-color); } -.stab .emoji { +.stab .emoji, .item-info .stab::before { font-size: 1.25rem; +} +.stab .emoji { margin-right: 0.3rem; } +.item-info .stab::before { + /* ensure badges with emoji and without it have same height */ + content: "\0"; + width: 0; + display: inline-block; + color: transparent; +} /* Black one-pixel outline around emoji shapes */ .emoji { text-shadow: 1px 0 0 black, -1px 0 0 black, - 0 1px 0 black, + 0 1px 0 black, 0 -1px 0 black; } |
