Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Change midcol width so that 4-number votes aren't clipped #481

wants to merge 1 commit into from

3 participants


Once you reach a thousand likes, the number is ever so slightly clipped. Changing 5ex to 5.1ex fixes the issue.
The image shows the clipping happening on the first number, after the fix it looks like the second one.


To prevent clipping, personally I've added the following to my Reddit CSS:

.midcol { min-width: 5ex; width: auto; }

Which does the trick for me, because it will keep the same width that Reddit has used for a while, but it also allows it to expand if it ever needs to.


But .midcol isn't always 5ex wide. On subreddits with fewer votes, it can be 4, 3 or even 2ex. Having said that, I'm currently not seeing the problem so I'm guessing they've changed something else in the mean time.


It looks like they essentially bumped up the maximum width from 5ex to 6ex, for four-digit votes. However, 5-digit votes are still clipped. They are, admittedly, rare however, as only five submissions have had 5-digit votes in the past year.

The number is still clipped, though. Look here (change the last digit to a "6" if you don't see it):


I'm seeing 5ex for 4-digit votes? 6ex only seems to be for 5-digit votes.
Anyway, I didn't even know 5-digit votes were possible and my "solution" fails there. Yours doesn't. Want to create a pull request for it?


Nah someone else will come up with a more elegant solution than mine.


Problem still exists. My best solution so far is to use JavaScript to increase all 4-digit midcols from 5.0 ex to 5.1 ex, and all 5-digit midcols (which are very rare) from 6 ex to 6.4 ex.


Thanks for the pull request. This doesn't seem to actually fix things like the President Obama IAMA. I think we're going to need a solution that's client-side (and hopefully get rid of this horrid inline-css muck in the process).

@spladug spladug closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  r2/r2/lib/
2  r2/r2/lib/
@@ -235,7 +235,7 @@ def _replace_render(style = None, display = True):
elif mid_margin == 1:
mid_margin = "15px"
- mid_margin = "%dex" % (mid_margin+1)
+ mid_margin = "%.1fex" % (mid_margin+1.1)
replacements["midcolmargin"] = mid_margin
Something went wrong with that request. Please try again.