edwardtufte / tufte-css

Style your webpage like Edward Tufte’s handouts.
https://edwardtufte.github.io/tufte-css/
MIT License
5.98k stars 458 forks source link

Fix label number display style and margin #168

Closed AB1908 closed 3 years ago

AB1908 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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