Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Improve hidden code lines display by changing their background to mak…
…e them easier to spot
  • Loading branch information
GuillaumeGomez committed Sep 17, 2021
commit 78a327669e4b6f388430b26edcb10ee31235666d
2 changes: 1 addition & 1 deletion src/librustdoc/html/highlight.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ fn write_code(
)
.highlight(&mut |highlight| {
match highlight {
Highlight::Token { text, class } => string(out, Escape(text), class, context_info),
Highlight::Token { text, class } => string(out, Escape(text), class, &context_info),
Highlight::EnterSpan { class } => enter_span(out, class),
Highlight::ExitSpan => exit_span(out),
};
Expand Down
5 changes: 5 additions & 0 deletions src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -1257,6 +1257,11 @@ pre.rust {
-moz-tab-size: 4;
}

pre .data-hidden {
width: 100%;
display: block;
}

.search-failed {
text-align: center;
margin-top: 20px;
Expand Down
4 changes: 4 additions & 0 deletions src/librustdoc/html/static/css/themes/ayu.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ pre, .rustdoc.source .example-wrap {
background-color: #191f26;
}

pre .data-hidden {
background-color: #313942;
}

.sidebar {
background-color: #14191f;
}
Expand Down
4 changes: 4 additions & 0 deletions src/librustdoc/html/static/css/themes/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ pre, .rustdoc.source .example-wrap {
background-color: #2A2A2A;
}

pre .data-hidden {
background-color: #373636;
}

.sidebar {
background-color: #505050;
}
Expand Down
4 changes: 4 additions & 0 deletions src/librustdoc/html/static/css/themes/light.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ pre, .rustdoc.source .example-wrap {
background-color: #F5F5F5;
}

pre .data-hidden {
background-color: #E6E4E4;
}

.sidebar {
background-color: #F1F1F1;
}
Expand Down