I expect the following to display text  "Hello world!" in the browser:

import Html
import Element exposing (..)
import Text

main: Html.Html a
main = Text.fromString "Hello world!" |> centered |> toHtml

However, I get only a blank (white) page. In fact, it seems that using 
Text.fromString 
"Hello world! |> centered" anywhere causes a blank page to be displayed. 
For example:

import Html
import Element exposing (..)
import Text
import Color exposing (..)

main: Html.Html a
main = spacer 100 100 |> color blue |> toHtml

example = Text.fromString "Hello world!" |> centered

displays blank page, but shows a blue square (as expected) when I remove 
the example = Text.fromString "Hello world!" |> centered line.

I am using Elm 0.17 from Kubuntu 16.04

I guess this is a bug. Is there a working way to display text using  the 
elm-graphics llibrary?











-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to