-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Fix item info pos and height #99779
Conversation
width: fit-content; | ||
/* This min-height is needed to unify the height of the stab elements because some of them | ||
have emojis. | ||
*/ |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
ec96d09
to
0943682
Compare
0943682
to
9903f41
Compare
r? @notriddle |
@bors r+ rollup |
…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
Fixes #98266.
Fixes #98343.
You can test it here.
Here is a screenshot of the result:
r? @jsha