Skip to content
Closed
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
8 changes: 8 additions & 0 deletions src/doc/rust.css
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,14 @@ a.test-arrow {
margin-bottom: 1em;
}

.structfield {
Copy link
Member

Choose a reason for hiding this comment

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

Just realized but you didn't modify the correct css file.

Copy link
Contributor

Choose a reason for hiding this comment

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

If it is wrong, how did you get those screenshots?

Copy link
Member

Choose a reason for hiding this comment

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

By modifying the CSS in the web page directly.

padding-bottom: 0.2rem;
margin-block-start: 1.33em;
margin-block-end: 1.33em;
margin-inline-start: 0px;
margin-inline-end: 0px;
}

.error-described {
position: relative;
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/html/templates/item_union.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h2 id="fields" class="fields section-header"> {# #}
{% for (field, ty) in self.fields_iter() %}
{% let name = field.name.expect("union field name") %}
<span id="structfield.{{ name }}" {#+ #}
class="{{ ItemType::StructField +}} section-header"> {# #}
class="structfield {{ ItemType::StructField +}} section-header"> {# #}
Copy link
Member

Choose a reason for hiding this comment

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

I believe the structfield class is already applied using ItemType::StructField.

Suggested change
class="structfield {{ ItemType::StructField +}} section-header"> {# #}
class="{{ ItemType::StructField +}} section-header"> {# #}

<a href="#structfield.{{ name }}" class="anchor field">§</a> {# #}
<code>{{ name }}: {{+ self.print_ty(ty)|safe }}</code> {# #}
</span>
Expand Down
Loading