Skip to content

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 GuillaumeGomez force-pushed the fix-item-info-pos-and-height branch from ec96d09 to 0943682 Compare July 27, 2022 12:47
@GuillaumeGomez GuillaumeGomez force-pushed the fix-item-info-pos-and-height branch from 0943682 to 9903f41 Compare July 27, 2022 12:48
@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
Collaborator

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
Development

Successfully merging this pull request may close these issues.

Deprecation note and doc(cfg) don't look good in combination rustdoc: item-infos have different vertical size
7 participants