Skip to content

Commit

Permalink
rustdoc: combine shared CSS between .*-line-numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
notriddle committed Oct 25, 2022
1 parent 85d089b commit 626d7fc
Showing 1 changed file with 19 additions and 32 deletions.
51 changes: 19 additions & 32 deletions src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -549,47 +549,38 @@ ul.block, .block li {
margin-bottom: 0px;
}

pre.example-line-numbers {
overflow: initial;
border: 1px solid;
padding: 13px 8px;
text-align: right;
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
}

.src-line-numbers {
text-align: right;
}
.rustdoc:not(.source) .example-wrap > pre:not(.example-line-numbers) {
width: 100%;
overflow-x: auto;
}

.rustdoc:not(.source) .example-wrap > pre.src-line-numbers {
width: auto;
overflow-x: visible;
}

.rustdoc .example-wrap > pre {
margin: 0;
flex-grow: 1;
overflow-x: auto;
}

.search-loading {
text-align: center;
}

.content > .example-wrap pre.src-line-numbers {
position: relative;
.rustdoc .example-wrap > pre.example-line-numbers,
.rustdoc .example-wrap > pre.src-line-numbers {
flex-grow: 0;
overflow: initial;
text-align: right;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}

.example-line-numbers {
border: 1px solid;
padding: 13px 8px;
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
}

.src-line-numbers span {
cursor: pointer;
}

.search-loading {
text-align: center;
}

.docblock-short {
overflow-wrap: break-word;
overflow-wrap: anywhere;
Expand Down Expand Up @@ -2024,10 +2015,6 @@ in storage.js
padding-bottom: 0;
}

.scraped-example:not(.expanded) .code-wrapper pre.src-line-numbers {
overflow-x: hidden;
}

.scraped-example .code-wrapper .prev {
position: absolute;
top: 0.25em;
Expand Down

0 comments on commit 626d7fc

Please sign in to comment.