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 label number display style and margin #168

Merged
merged 2 commits into from
Aug 7, 2021

Conversation

AB1908
Copy link
Contributor

@AB1908 AB1908 commented Aug 6, 2021

I am not aware of CSS practices and have only added a rudimentary fix using Stack Overflow.

Source: Margin-top not working with <label>

Feel free to request changes. This should close #167.

@daveliepmann
Copy link
Contributor

daveliepmann commented Aug 7, 2021

I agree that inline-block is called for. Not sure what the rest of the ideal solution is. How did you arrive at a -5% margin? I want to have a complete theory of the problem before moving forward.

@daveliepmann
Copy link
Contributor

I think I prefer max-height: 2rem over the margin. That seems to capture our intent best: the sidenote label should not be taller than the line-height of the paragraph it is within. That line-height is 2rem (with the same "relative" context between the two kinds of elements).

If someone knows best practice here, please chime in, otherwise let's make that change and merge, because this is an important fix.

@AB1908
Copy link
Contributor Author

AB1908 commented Aug 7, 2021

Your reasoning sounds clear enough to me. I shall add the fix.

@daveliepmann daveliepmann merged commit a66bfb2 into edwardtufte:gh-pages Aug 7, 2021
daveliepmann added a commit that referenced this pull request Aug 7, 2021
see #168 for discussion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent spacing due to inline labels as sidenote numbers
2 participants