The discussion is about the issue of numbers being cut off in long lists on Discourse. Slowhand initially reported the issue, and jomaxro identified it as a Discourse issue, not specific to the user’s site.
codinghorror suggested editing the relevant CSS to fix the issue, and neil provided the SCSS code used. However, codinghorror later suggested that allocating enough space for only three digits should be sufficient.
cpradio discovered that the issue is caused by the CSS rule ul, ol, dd { margin: 0 0 9px 25px; padding: 0; }, specifically the padding: 0 part. cpradio later provided screenshots of before and after the CSS change, and submitted a PR to fix the issue.
The PR was merged, but sam noted that the indent for lists is now quite deep and inconsistent with bulleted lists. cpradio suggested removing ul from the rule to make them indented the same amount, and later submitted another PR to fix this issue.
The second PR was also merged, and cpradio provided screenshots of the changes.
I don’t know that we really need to allocate enough space for ten digit numbered lists.. I think allowing space for the digit one plus two more, should work, eg:
Except that one of the cases I’ve run into this is starting a line with a four digit year.
July 20th in History.
The first Women’s Rights Convention in Seneca Falls, New York ends.
British Columbia joins Canada.
The first International Special Olympics Summer Games are held at Soldier Field in Chicago.
Apollo 11 lands, first humans on the Moon.
In the preview, your quoted “9999.” is shown in full, but my years cut off the first digit. In your post, I just see two digits of your “9999.”. Of course, since this thinks I’ve created an <ol>, all of the years after the first are trashed anyway.
Verdict:
The browser seems to use “safe” defaults for padding/margins to prevent ridiculous rendering? (tested in latest Chrome and IE 11 – because I had access to it)
I’ve yet to pin point why the preview shows 5 digits and cooked shows 4 when both have a padding of 40…
For those wondering, I took screenshots of the menus and homepage because they utilize ol for the category/tags drop down and wanted to show they were not impacted negatively by this change.
The User Menu probably doesn’t use it, but figured, might as well screenshot it too!
I know why this occurs now, the 5 is in the “overflow” boundary and the preview content is within another div that has a padding of 7px all around, thus the overflow of the 5 is able to be seen.
K, I’ll get that done tonight. Let me go most of the endpoints of Discourse to make sure it doesn’t do anything crazy to the existing UI and I’ll get it submitted.