Skip to content

<details>/<summary> UI fixes - #97249

Merged
bors merged 3 commits into
rust-lang:masterfrom
GuillaumeGomez:details-summary-fixes
Jul 2, 2022
Merged

<details>/<summary> UI fixes#97249
bors merged 3 commits into
rust-lang:masterfrom
GuillaumeGomez:details-summary-fixes

Conversation

@GuillaumeGomez

Copy link
Copy Markdown
Member

With images it's easier to understand:

Screenshot from 2022-05-21 14-10-42
Screenshot from 2022-05-21 14-08-49

The headings in <summary> should not have bottom border so I removed it as well alongside the other fixes.

r? @jsha

@GuillaumeGomezGuillaumeGomez added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-rustdoc-ui Area: Rustdoc UI (generated HTML) labels May 21, 2022
@rust-highfive

Copy link
Copy Markdown
Contributor

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez,@Folyd,@jsha

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 21, 2022
@bors

bors commented May 26, 2022

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #97409) made this pull request unmergeable. Please resolve the merge conflicts.

@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

Fixed merge conflicts.

@jsha

jsha commented May 29, 2022

Copy link
Copy Markdown
Contributor

Can you explain this bug more? It sounds like the problem is: doc authors sometimes write <details><summary> in their docs, and when they do, the rustdoc styles are inappropriately applying to those. Is that right?

If so, I think the solution is to make the rustdoc styles more selective rather than to re-override them with other styles. In particular the content: "▶"; and content: "▼"; properties are suspicious. We should allow the browser styles to come through in those cases rather than try to imitate the browser styles with our own ad-hoc icons.

@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

Can you explain this bug more? It sounds like the problem is: doc authors sometimes write <details><summary> in their docs, and when they do, the rustdoc styles are inappropriately applying to those. Is that right?

Yes, it's exactly that! Sorry, should have explained more alongside the picture.

If so, I think the solution is to make the rustdoc styles more selective rather than to re-override them with other styles. In particular the content: "▶"; and content: "▼"; properties are suspicious. We should allow the browser styles to come through in those cases rather than try to imitate the browser styles with our own ad-hoc icons.

Good point. For some reason the toggle was hidden but I'll investigate a bit more and try to remove the need for this CSS.

@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

I now know why I needed the create the marker with the CSS: if the display isn't list-items, then it hides the marker on firefox. So instead, I change the display property of summary children.

@notriddle

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@bors

bors commented Jul 1, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit b8db8cc has been approved by notriddle

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 1, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 1, 2022
…laumeGomez
Rollup of 5 pull requests
Successful merges:
- rust-lang#97249 (`<details>`/`<summary>` UI fixes)
- rust-lang#98418 (Allow macOS to build LLVM as shared library)
- rust-lang#98460 (Use CSS variables to handle theming)
- rust-lang#98497 (Improve some inference diagnostics)
- rust-lang#98708 (rustdoc: fix 98690 Panic if invalid path for -Z persist-doctests)
Failed merges:
- rust-lang#98761 (more `need_type_info` improvements)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit 194764f into rust-lang:masterJul 2, 2022
@rustbotrustbot added this to the 1.64.0 milestone Jul 2, 2022
@GuillaumeGomez
GuillaumeGomez deleted the details-summary-fixes branch July 2, 2022 09:32
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-rustdoc-uiArea: Rustdoc UI (generated HTML)S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@GuillaumeGomez@rust-highfive@bors@jsha@notriddle@rustbot