Skip to content

Commit d490ff4

Browse files
committed
rustdoc: use CSS margin/padding shorthand when all are being set
1 parent 9565dfe commit d490ff4

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 {
@@ -805,10 +803,8 @@ table,
805803
}
806804
#crate-search {
807805
min-width: 115px;
808-
padding: 0;
809806
/* keep these two in sync with "@-moz-document url-prefix()" below */
810-
padding-left: 4px;
811-
padding-right: 23px;
807+
padding: 0 23px 0 4px;
812808
/* prevents the <select> from overflowing the containing div in case it's shrunk */
813809
max-width: 100%;
814810
/* contents can overflow because of max-width limit, then show ellipsis */
@@ -1724,7 +1720,6 @@ in storage.js
17241720
/* Hide the sidebar offscreen while not in use. Doing this instead of display: none means
17251721
the sidebar stays visible for screen readers, which is useful for navigation. */
17261722
left: -1000px;
1727-
margin-left: 0;
17281723
margin: 0;
17291724
padding: 0;
17301725
z-index: 11;
@@ -1777,9 +1772,7 @@ in storage.js
17771772
.mobile-topbar .logo-container > img {
17781773
max-width: 35px;
17791774
max-height: 35px;
1780-
margin-left: 20px;
1781-
margin-top: 5px;
1782-
margin-bottom: 5px;
1775+
margin: 5px 0 5px 20px;
17831776
}
17841777

17851778
.mobile-topbar {

0 commit comments

Comments
 (0)