Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some CSS warnings and errors from VS Code #93444

Merged
merged 1 commit into from
Jan 31, 2022
Merged
Changes from all commits
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
1 change: 0 additions & 1 deletion src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
@@ -1502,7 +1502,6 @@ kbd {
vertical-align: middle;
border: solid 1px;
border-radius: 3px;
box-shadow: inset 0 -1px 0;
cursor: default;
}

4 changes: 2 additions & 2 deletions src/librustdoc/html/static/css/themes/ayu.css
Original file line number Diff line number Diff line change
@@ -531,7 +531,7 @@ kbd {
background-color: #314559;
border-color: #5c6773;
border-bottom-color: #5c6773;
box-shadow-color: #c6cbd1;
box-shadow: inset 0 -1px 0 #5c6773;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that I intentionally changed it from #c6cbd1 to #5c6773 because the old color was the one used in the dark theme and seemed inconsistent with Ayu.

}

#theme-picker, #settings-menu, #help-button {
@@ -630,5 +630,5 @@ input:checked + .slider {
background: #616161;
}
.toggle-line:hover .toggle-line-inner {
background: ##898989;
background: #898989;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @willcrichton – this will change the display of scrape-examples

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yeah this is fixed in my PR.

}
4 changes: 2 additions & 2 deletions src/librustdoc/html/static/css/themes/dark.css
Original file line number Diff line number Diff line change
@@ -407,7 +407,7 @@ kbd {
background-color: #fafbfc;
border-color: #d1d5da;
border-bottom-color: #c6cbd1;
box-shadow-color: #c6cbd1;
box-shadow: inset 0 -1px 0 #c6cbd1;
}

#theme-picker, #settings-menu, #help-button {
@@ -496,5 +496,5 @@ div.files > .selected {
background: #616161;
}
.toggle-line:hover .toggle-line-inner {
background: ##898989;
background: #898989;
}
6 changes: 4 additions & 2 deletions src/librustdoc/html/static/css/themes/light.css
Original file line number Diff line number Diff line change
@@ -44,7 +44,9 @@ pre, .rustdoc.source .example-wrap {
}

.rust-logo {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, it's to force other themes to have this rule.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean by "force"?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the CSS rules in light.css must be present in the other themes, otherwise rustdoc will throw an error.

/* No need for a border in here! */
/* This rule exists to force other themes to explicitly style the logo.
* Rustdoc has a custom linter for this purpose.
*/
}

/* Improve the scrollbar display on webkit-based browsers */
@@ -391,7 +393,7 @@ kbd {
background-color: #fafbfc;
border-color: #d1d5da;
border-bottom-color: #c6cbd1;
box-shadow-color: #c6cbd1;
box-shadow: inset 0 -1px 0 #c6cbd1;
}

#theme-picker, #settings-menu, #help-button {