Skip to content

Commit

Permalink
Rollup merge of #105665 - notriddle:notriddle/popover-css-merge, r=Gu…
Browse files Browse the repository at this point in the history
…illaumeGomez

rustdoc: simplify popover CSS

* Merge the color-changing block into the regular rules, which was probably written that way because it used to be in the theme files, but has no reason to be written this way now that it's in rustdoc.css

* Get rid of redundant `display: block`, since `position: absolute` blockifies the layout anyway.
  • Loading branch information
matthiaskrgr authored Dec 14, 2022
2 parents bc84c0d + 8135849 commit 138c632
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -902,10 +902,11 @@ so that we can apply CSS-filters to change the arrow color in themes */
top: 100%;
right: 0;
z-index: 2;
display: block;
margin-top: 7px;
border-radius: 3px;
border: 1px solid var(--border-color);
background-color: var(--main-background-color);
color: var(--main-color);
--popover-arrow-offset: 11px;
}

Expand All @@ -916,16 +917,12 @@ so that we can apply CSS-filters to change the arrow color in themes */
right: var(--popover-arrow-offset);
border: solid var(--border-color);
border-width: 1px 1px 0 0;
background-color: var(--main-background-color);
padding: 4px;
transform: rotate(-45deg);
top: -5px;
}

.popover, .popover::before {
background-color: var(--main-background-color);
color: var(--main-color);
}

/* use larger max-width for help popover, but not for help.html */
#help.popover {
max-width: 600px;
Expand Down

0 comments on commit 138c632

Please sign in to comment.