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

Improve stability tags display #58303

Merged
merged 1 commit into from
Feb 20, 2019
Merged
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions src/librustdoc/html/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2775,8 +2775,7 @@ fn item_module(w: &mut fmt::Formatter, cx: &Context,
<tr class='{stab}{add}module-item'>\
<td><a class=\"{class}\" href=\"{href}\" \
title='{title}'>{name}</a>{unsafety_flag}</td>\
<td class='docblock-short'>{stab_tags}{docs}\
</td>\
<td class='docblock-short'>{stab_tags}{docs}</td>\
</tr>",
name = *myitem.name.as_ref().unwrap(),
stab_tags = stability_tags(myitem),
Expand Down
10 changes: 5 additions & 5 deletions src/librustdoc/html/static/themes/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,15 @@ a.test-arrow {
box-shadow: 1px 0 0 1px #000, 0 0 0 2px transparent;
}

.stab.unstable { background: #FFF5D6; border-color: #FFC600; color: #404040; }
.stab.internal { background: #FFB9B3; border-color: #B71C1C; color: #404040; }
.stab.deprecated { background: #F3DFFF; border-color: #7F0087; color: #404040; }
.stab.portability { background: #C4ECFF; border-color: #7BA5DB; color: #404040; }

.module-item .stab {
color: #ddd;
}

.stab.unstable {background: #FFF5D6; border-color: #FFC600; color: #2f2f2f; }
.stab.internal { background: #FFB9B3; border-color: #B71C1C; color: #2f2f2f; }
.stab.deprecated { background: #F3DFFF; border-color: #7F0087; color: #2f2f2f; }
.stab.portability { background: #C4ECFF; border-color: #7BA5DB; color: #2f2f2f; }
Copy link
Member

Choose a reason for hiding this comment

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

I'm curious; does this affect the text color of the full-size stability banners?

Copy link
Member Author

Choose a reason for hiding this comment

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

It allows have a default color (the one in .module-item .stab {). More like strenghtening than a real change.


#help > div {
background: #4d4d4d;
border-color: #bfbfbf;
Expand Down
8 changes: 4 additions & 4 deletions src/librustdoc/html/static/themes/light.css
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,15 @@ a.test-arrow {
box-shadow: 1px 0 0 1px #e0e0e0, 0 0 0 2px transparent;
}

.module-item .stab {
color: #000;
}

.stab.unstable { background: #FFF5D6; border-color: #FFC600; }
.stab.internal { background: #FFB9B3; border-color: #B71C1C; }
.stab.deprecated { background: #F3DFFF; border-color: #7F0087; }
.stab.portability { background: #C4ECFF; border-color: #7BA5DB; }

.module-item .stab {
color: #000;
}

#help > div {
background: #e9e9e9;
border-color: #bfbfbf;
Expand Down