Skip to content

Use tabular numbers for elapsed time (format=duration|elapsed) #383

Description

@yamin-oanda

When we use <relative-time format=duration ...>...</relative-time> (or elapsed), and it starts a timer to count the elapsed time, we want the changing numbers to have the same width so that the timer text doesn't visibly jump around.

Fix should be fairly simple, something like

relative-time {
  font-variant-numeric: tabular-nums;
}

Without tabular numbers:

Screen.Recording.2026-09-25.at.16.12.36.mov

With tabular numbers:

Screen.Recording.2026-09-25.at.16.13.35.mov

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions