Changeset 21326
- Timestamp:
- 07/25/2012 04:46:21 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentytwelve/style.css
r21325 r21326 14 14 Use it to make something cool, have fun, and share what you've learned with others. 15 15 */ 16 17 /* =Notes 18 -------------------------------------------------------------- 19 This stylesheet uses rem values with a pixel fallback. The rem 20 values (and line heights) are calculated using two variables: 21 22 $rembase: 14; 23 $line-height: 24; 24 25 ---------- Examples 26 27 * Use a pixel value with a rem fallback for font-size, padding, margins, etc. 28 padding: 5px 0; 29 padding: 0.357142857rem 0; (5 / $rembase) 30 31 * Set a font-size and then set a line-height based on the font-size 32 font-size: 16px 33 font-size: 1.142857143rem; (16 / $rembase) 34 line-height: 1.846153846; ($line-height / 16) 35 36 ---------- Vertical spacing 37 38 Vertical spacing between most elements should use 24px or 48px 39 to maintain vertical rhythm: 40 41 .my-new-div { 42 margin: 24px 0; 43 margin: 1.714285714rem 0; ( 24 / $rembase ) 44 } 45 46 ---------- Further reading 47 48 http://snook.ca/archives/html_and_css/font-size-with-rem 49 http://blog.typekit.com/2011/11/09/type-study-sizing-the-legible-letter/ 50 16 51 17 52 /* =Reset
Note: See TracChangeset
for help on using the changeset viewer.