I am currently trying to delve into the CSS calculation process behind the styling in the code snippet provided. This code snippet is from a responsive WordPress theme, and I am struggling to decipher how the em values for the line-height of the <h>
elements were determined by the author. I have already gone through a tutorial available at this link.
The tutorial was informative, but I am unable to grasp the rationale behind the numerical values chosen by the code's creator. It seems that 14px serves as the base font size and 22px functions as the base margin, resulting in a baseline leading value of 1.57142857 (calculated by dividing 22 by 14). However, I cannot discern the logic behind the author's line-height values for the different heading elements.
body { font:normal 14px/1.57142857 Arial,"Helvetica Neue",Helvetica,sans-serif; }
h1, h2, h3, h4, h5, h6,
p, blockquote, pre, address,
dl, ol, ul, table,
legend, hr, figure {
margin-bottom:22px;
}
li > ul,
li > ol {
margin-bottom:0;
}
/* Headings */
h1, .h1 { font-size:60px; line-height:1.10000000; font-weight:normal; }
h2, .h2 { font-size:36px; line-height:1.16666667; font-weight:normal; }
h3, .h3 { font-size:24px; line-height:1.25000000; font-weight:normal; }
h4, .h4 { font-size:18px; line-height:1.33333333; font-weight:normal; }
h5, .h5 { font-size:14px; line-height:1.57142857; font-weight:normal; }
h6, .h6 { font-size:12px; line-height:1.57142857; font-weight:normal; }