Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Font size is being set too large with embedded font face #83

Open
jrdn91 opened this issue Jan 25, 2016 · 0 comments
Open

Font size is being set too large with embedded font face #83

jrdn91 opened this issue Jan 25, 2016 · 0 comments

Comments

@jrdn91
Copy link

jrdn91 commented Jan 25, 2016

I have tested with the default font face and it's working but when I set the font family to my custom font face loaded in the font size is too big and breaking out of the container. I'm not loading the font face from google or typekit, it is an embedded font. I'm also trying to use this inside of a flexbox layout. Here is a picture of what I'm trying to work with...

image

The layout and CSS look like this

// HTML
<div class="item-name">
     <div class="big-text">
        <span>
          Cooper River Bridge View
        </span>
      </div>
</div>
<span class="item-price">
   $285
</span>
<span class="watch-item"><i class="heart-icon"></i></span>

// CSS
  .item-info-bar {
    display: flex;
    .item-name {
      flex-grow: 2;
      flex-shrink: 2;
      margin-right: 12px;
      min-width: 0;
      span {
        font-size: 1px;
      }
    }
    .item-price {
      flex-grow: 0;
    }
    .watch-item {
      flex-grow: 0;
    }
  }
(I've taken out a lot of css that isn't relevant to the flexbox layout or big-text setup

Basically this bit of UI is repeated over and over, each one has a different name and price (it's the name I want to have bigtext on it) so the price and icon will always stay the same size, but the price may be one or more characters longer (hundreds or thousands so one extra character at most) and the bulk of the difference in text amount is the name. Maybe it's just flexbox hurting me here and I need to do something else, but like I said, when I turn the font face off it's totally fine with the default font. Not sure if there is any direction anyone can give to try to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant