From 340c2e7efa583238fb0b0fa39b626343ae1ca8ab Mon Sep 17 00:00:00 2001 From: Evan Czaplicki Date: Sun, 23 Jun 2013 04:48:32 -0700 Subject: [PATCH] Switch to using px to set text height instead of em. --- libraries/Native/Text.js | 2 +- libraries/Text.elm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/Native/Text.js b/libraries/Native/Text.js index db7ad96..a56a644 100644 --- a/libraries/Native/Text.js +++ b/libraries/Native/Text.js @@ -71,7 +71,7 @@ Elm.Native.Text = function(elm) { } function size(px, text) { return addStyle('font-size', px + 'px', text) } var header = addTag('h1'); - function height(h, text) { return addStyle('font-size', h+'em', text) } + function height(h, text) { return addStyle('font-size', h+'px', text) } function italic(text) { return addStyle('font-style', 'italic', text) } var bold = addTag('b'); diff --git a/libraries/Text.elm b/libraries/Text.elm index 923a66d..b661b16 100644 --- a/libraries/Text.elm +++ b/libraries/Text.elm @@ -21,7 +21,7 @@ header : Text -> Text -- Create a link. link : String -> Text -> Text --- Set the height of text in \"ems\". 1em is the normal height of text. 2ems is twice that height. +-- Set the height of text in pixels. height : Float -> Text -> Text -- Set the color of a string.