Skip to content

Commit 9c5e61c

Browse files
authored
Rollup merge of #103737 - notriddle:notriddle/margin, r=GuillaumeGomez
rustdoc: use CSS margin/padding shorthand when all are being set
2 parents 2bff9e2 + d490ff4 commit 9c5e61c

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/librustdoc/html/static/css/rustdoc.css

+3-10
Original file line numberDiff line numberDiff line change
@@ -493,9 +493,7 @@ ul.block, .block li {
493493
.sidebar h2 {
494494
overflow-wrap: anywhere;
495495
padding: 0;
496-
margin: 0;
497-
margin-top: 0.7rem;
498-
margin-bottom: 0.7rem;
496+
margin: 0.7rem 0;
499497
}
500498

501499
.sidebar h3 {
@@ -803,10 +801,8 @@ table,
803801
}
804802
#crate-search {
805803
min-width: 115px;
806-
padding: 0;
807804
/* keep these two in sync with "@-moz-document url-prefix()" below */
808-
padding-left: 4px;
809-
padding-right: 23px;
805+
padding: 0 23px 0 4px;
810806
/* prevents the <select> from overflowing the containing div in case it's shrunk */
811807
max-width: 100%;
812808
/* contents can overflow because of max-width limit, then show ellipsis */
@@ -1719,7 +1715,6 @@ in storage.js
17191715
/* Hide the sidebar offscreen while not in use. Doing this instead of display: none means
17201716
the sidebar stays visible for screen readers, which is useful for navigation. */
17211717
left: -1000px;
1722-
margin-left: 0;
17231718
margin: 0;
17241719
padding: 0;
17251720
z-index: 11;
@@ -1772,9 +1767,7 @@ in storage.js
17721767
.mobile-topbar .logo-container > img {
17731768
max-width: 35px;
17741769
max-height: 35px;
1775-
margin-left: 20px;
1776-
margin-top: 5px;
1777-
margin-bottom: 5px;
1770+
margin: 5px 0 5px 20px;
17781771
}
17791772

17801773
.mobile-topbar {

0 commit comments

Comments
 (0)