Skip to content

Conversation

dhroovsrivastava11
Copy link

@dhroovsrivastava11 dhroovsrivastava11 commented Oct 4, 2024

ISSUE

#2437 Footnote reference adding some extra vertical space to the line

FIX

Changed general.css file to include custom styling for footnote reference, removing inheritance of line height from parent class.
Tested for various different browsers. (Chrome, Firefox, mobile chrome, mobile firefox)

Before

before

After

after

…ence, removing inheritance of line height from parent class
@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label Oct 4, 2024
}

.footnote-reference{
line-height: 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

As far as I understand the standard, this does what you want because a line box's final height is the maximum of the required line-height of all the inline fragment boxes within it. This means, if you set the line-height of something to 0, that element will have no effect on the height of the line.

It's fine, as long as the footnote-reference is never alone on a line. That would be bad typography anyway.

GitHub and rustdoc's CSS both do the exact same thing. You might want to apply this style to all superscripts, not just footnote references.

https://github.com/necolas/normalize.css/blob/master/normalize.css#L128

@dhroovsrivastava11 dhroovsrivastava11 deleted the branch rust-lang:master October 24, 2024 11:31
@dhroovsrivastava11 dhroovsrivastava11 deleted the master branch October 24, 2024 11:31
@notriddle
Copy link
Contributor

What just happened?

This didn't get merged, did it?

@ehuss
Copy link
Contributor

ehuss commented Nov 2, 2024

I'm not sure. I reposted this at #2465.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: waiting on a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants