Skip to content

Feature Request: Additional Font Weight Classes #23969

Closed

Description

@planetoftheweb

I think it would be great to include some more font-weight options in bootstrap. Even when you look at the documentation, you can see that the weights have been modified because current design sensibilities call for a wider range of font weights that the default. I realized that when I'm creating bootstrap projects, I end up modifying the font-weights a lot, so maybe this could be added into the classes.

screen shot 2017-09-16 at 7 22 29 pm

Although font-weight-bold and font-weight-normal exist, I feel like there needs to be a bit more broad. I'm proposing adding some font-weight classes.

font-weight-light
font-weight-medium
font-weight-normal
font-weight-bold
font-weight-heavy

These could be tied to sass variables. We could also add numbered font-weight classes.

font-weight-100
font-weight-300
...etc

Activity

  1. changed the title [-]Add Font Weight Classes[/-] [+]Feature Request: Additional Font Weight Classes[/+] on Sep 16, 2017
  2. andresgalante commented on Sep 17, 2017

    @andresgalante
    Collaborator

    Hi @planetoftheweb reading your issue I noticed that font-weight-light is defined on the code base but not surfaced on the docs. I've sent a PR to add it #23970

    As for adding more utility classes I think it's a good idea, in fact I am doing it at my own project.

    From a bootstrap perspective I'd make sure to test it in different browsers and OS. Since Bootstrap has a System Font Stack, it might be the case that some font families don't have a specific weight (in numbers).

    Using keywords is a safer bet and users can always define them on their projects.

    anyway, good idea 👍

  3. added
    css
    feature
    v4
    on Sep 17, 2017
  4. XhmikosR commented on Oct 19, 2017

    @XhmikosR
    Member

    We could add them, but we must have a note that based on the font used, the result might not be the expected one, and it's the developer's job to make sure the font weight they are using exists.

    See for example an issue with our docs, #24419.

  5. polys commented on Jun 11, 2018

    @polys

    Could you add font-weight-medium as well please?

    It would set font-weight: 500 !important; similar to how font-weight-light is defined.

    I find it very useful and keep adding it to my projects; it would be nice if it was part of bootstrap. I understand that it may not work with all fonts but at least it sets the intent. How's font-weight-light any different?

  6. mdo commented on Dec 14, 2018

    @mdo
    Member

    Closing since we had the lighter/bolder added. For any other weights and utilities, please feel free to open PRs to suggest :).

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

    cssfeaturev4

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions