on master help sign in
Switch to using px to set text height instead of em.
340c2e7Evan Czaplicki
libraries/Native/Text.js+1−1
@@ -71,7 +71,7 @@ Elm.Native.Text = function(elm) {
71 }
71 }
72 function size(px, text) { return addStyle('font-size', px + 'px', text) }
72 function size(px, text) { return addStyle('font-size', px + 'px', text) }
73 var header = addTag('h1');
73 var header = addTag('h1');
74− function height(h, text) { return addStyle('font-size', h+'em', text) }
74+ function height(h, text) { return addStyle('font-size', h+'px', text) }
75 function italic(text) { return addStyle('font-style', 'italic', text) }
75 function italic(text) { return addStyle('font-style', 'italic', text) }
76 var bold = addTag('b');
76 var bold = addTag('b');
77
77
libraries/Text.elm+1−1
@@ -21,7 +21,7 @@ header : Text -> Text
21-- Create a link.
21-- Create a link.
22link : String -> Text -> Text
22link : String -> Text -> Text
23
23
24−-- Set the height of text in \"ems\". 1em is the normal height of text. 2ems is twice that height.
24+-- Set the height of text in pixels.
25height : Float -> Text -> Text
25height : Float -> Text -> Text
26
26
27-- Set the color of a string.
27-- Set the color of a string.