I'm currently working on custom mixins to work with in SASS.
What I'm trying to achieve is working out the pixel height from a font-size and the line height. For example, I know 16px font size with a line height of 1 comes out at 22px high. The font family is Open Sans.
I've tried working out formulas to see how this comes about, but I'm struggling.
Is there a simple way to work out the literal pixel height from these two inputs?
EDIT
Yeah I was completely and utterly wrong. ~ I've changed the details.
Image added to show height shown.
input {
font-size: 16px;
line-height: 1;
font-family: "Open Sans",sans-serif;
-webkit-appearance: none;
-webkit-box-shadow: none;
box-shadow: none;
border: 1px solid #7B7B7B;
border-radius: 2px;
width: 100%;
background: #fff;
font-family: "Open Sans",sans-serif;
font-weight: 300;
padding: 8px;
margin: 0 0 12px;
cursor: pointer;
text-transform: none;
font-size: 16px;
font-size: 1em;
}
*, *:before, *:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,700,900">
<input type="search" class="search_field" placeholder="Search..." id="search" name="s" title="Search for:" aria-required="true" aria-invalid="false" required="">
First time putting a chunk of code into this, so hopefully this is correct.