Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Creative, not sure if it's useful. Is it easy to change the font size?


    <div style="transform: scale(1.6);">
      <div class="A"></div>
      <div class="B"></div>
    </div>


You can use the font-size property as usual, if you convert the font definition from px units to em units.

EDIT: Demo with font-size: https://jsfiddle.net/6cg8dLnz/


Baseline is broken with display: inline-block but works with float: left: https://jsfiddle.net/eywwmL2o/

Haven't figured out how to fix kerning if it's even supposed to work.


Like this: https://jsfiddle.net/95v642n6/

  .font div {
    display: inline-block;
    vertical-align: top;
  }
  .H + .U { margin-left: 2px; }
  .U + .G { margin-left: 1px; }
  .G + .E { margin-left: -5px; }


Yeah, that really surprised me: for a font in particular, why wouldn't you use em? (Is there a benefit to using pixels that I'm overlooking?)


Probably not, but it's an interesting concept.


You could probably write a script to have it scale down by a factor of whatever you wanted - you can see the CSS required for it on the page there.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: