Skip to content

Add text utility for monospace font #24502

Description

@saviomd

We have utilities for weight, italic, smaller/bigger size, why not have one for monospace?
It would be useful for tables with columns showing numbers, to easily see which number is greater.
i.e. 99999 (5 numbers) gives the false impression of being greater than 111111 (6 numbers) because it has a bigger width when using the default font and size

Activity

  1. RaceProUK commented on Nov 1, 2017

    @RaceProUK

    While I can see potential use cases, isn't this already covered by the HTML <pre> and <code> elements?

  2. saviomd commented on Nov 1, 2017

    @saviomd
    Author

    @RaceProUK No... numbers in a table (my example) aren't a preformatted text (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre) or a fragment of computer code (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/code)
    Always have semantics on your mind! (https://www.wikiwand.com/en/Semantic_HTML)

  3. RaceProUK commented on Nov 1, 2017

    @RaceProUK

    Good point: <tt> would have been a better choice... if it wasn't deprecated 😊

  4. saviomd commented on Nov 1, 2017

    @saviomd
    Author

    true :)

  5. patrickhlauke commented on Nov 1, 2017

    @patrickhlauke
    Member

    i'll admit i'm not a massive fan of the huge number of utility classes we have already (as we'll soon reach a point where we reflect every possible CSS property as a class), so not too hot personally on adding more like these. at some point authors should be able/expected to just add their own things into an additional stylesheet...

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions