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 item info pos and height #99779

Merged
merged 2 commits into from
Aug 2, 2022

Conversation

GuillaumeGomez
Copy link
Member

Fixes #98266.
Fixes #98343.

You can test it here.

Here is a screenshot of the result:

Screenshot from 2022-07-26 21-55-53

r? @jsha

@GuillaumeGomez GuillaumeGomez added the A-rustdoc-ui Area: Rustdoc UI (generated HTML) label Jul 26, 2022
@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jul 26, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 26, 2022
width: fit-content;
/* This min-height is needed to unify the height of the stab elements because some of them
have emojis.
*/
Copy link
Contributor

@camsteffen camsteffen Jul 26, 2022

Choose a reason for hiding this comment

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

Idea to avoid min-height:

.stab::before {
  content: '\200b'; /* zero-width space */
  font-size: 1.25rem; /* emoji font size */
}

Maybe the content could be the actual emoji when applicable, determined by a CSS class?

Copy link
Member Author

Choose a reason for hiding this comment

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

The min-height is mostly for items which don't have an emoji actually. Unless I misunderstood what you meant?

Copy link
Contributor

Choose a reason for hiding this comment

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

Right. The zero-with space makes the element taller as if there were an emoji.

Copy link
Member Author

Choose a reason for hiding this comment

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

Exactly.

Copy link
Contributor

Choose a reason for hiding this comment

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

So you wouldn't need an arbitrary min-height.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry, I still don't get your point.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, I guess this is all moot. I thought that the actual height of the emoji is not a predictable px value. I've had experiences with some fonts not having a predictable height.

@GuillaumeGomez
Copy link
Member Author

r? @notriddle

@rust-highfive rust-highfive assigned notriddle and unassigned jsha Jul 30, 2022
@notriddle
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 1, 2022

📌 Commit 9903f41 has been approved by notriddle

It is now in the queue for this repository.

@bors bors 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 Aug 1, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 2, 2022
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#99156 (`codegen_fulfill_obligation` expect erased regions)
 - rust-lang#99293 (only run --all-targets in stage0 for Std)
 - rust-lang#99779 (Fix item info pos and height)
 - rust-lang#99994 (Remove `guess_head_span`)
 - rust-lang#100011 (Use Parser's `restrictions` instead of `let_expr_allowed`)
 - rust-lang#100017 (kmc-solid: Update `Socket::connect_timeout` to be in line with rust-lang#78802)
 - rust-lang#100037 (Update rustc man page to match `rustc --help`)
 - rust-lang#100042 (Update books)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 9690852 into rust-lang:master Aug 2, 2022
@rustbot rustbot added this to the 1.64.0 milestone Aug 2, 2022
@GuillaumeGomez GuillaumeGomez deleted the fix-item-info-pos-and-height branch August 2, 2022 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
7 participants