Skip to content

$line-height-sm/-lg is confusing #23119

Description

@ahmetb

$line-height-lg: 1.5 !default;
$line-height-sm: 1.5 !default;

These two variables $line-height-sm and $line-height-lg give the impression that they're used for body { line-height: ... }, however they're only used in scss/_buttons.scss and scss/_pagination.scss. It seems like $line-height-base is the correct one to edit.

Please consider renaming those to distinguish.

Activity

  1. added
    cssSass sources or compiled CSS
    v4v4, the frozen docs on gh-pages
    on Jul 19, 2017
  2. mdo commented on Jul 19, 2017

    @mdo
    Member

    They map to small/large components, yes, but they can also be used for other things if needed. It's difficult to deal with the grid tiers and a separate scale. Unlike margin/padding, a similar scale would need to map 1:1 to the line-height value. For example: .lh-1, .lh-15 (can't do -1.5), etc. That's a little more difficult and slightly less clear.

    Thoughts from anyone else?

  3. prateekgoel commented on Jul 19, 2017

    @prateekgoel
    Contributor

    There are similar classes for font-size, border-radius, etc.
    I think if we are to change line-height classes, then we would also need to change such other classes for consistency which would be a big change.

  4. ahmetb commented on Jul 19, 2017

    @ahmetb
    Author

    Yes, it looks like I was also fooled by $font-size-lg and $font-size-sm names (and others did, too #23047).

  5. mdo commented on Aug 4, 2017

    @mdo
    Member

    Closing as a won't fix for now—this is too big of a change. We can revisit another time.

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

    cssSass sources or compiled CSSv4v4, the frozen docs on gh-pages

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions