Today I Learned

Fixed width numbers, the easy way!

@sebdedeyne shared this neat little tidbit about the font-variant-numeric property:

`font-variant-numeric: tabular-nums` is one of my favorite CSS properties. It sets numbers as monospace, so they're prettily aligned in tables.

Another use case I came across is this little character counter. Notice how much smoother it becomes with tabular nums.

— Sebastian De Deyne (@sebdedeyne) February 18, 2020

Super neat stuff, especially if you're a nerd like me who likes their timers with milliseconds >.>

← Home