Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign up`Text.style` supersedes `Text.color` #166
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
rubytree
commented
Nov 21, 2015
|
@kasbah I think it works with 0.15 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
kasbah
Nov 21, 2015
Contributor
Yes, looks good in 0.15
http://share-elm.com/sprout/5650560be4b05f0d6cc4a0ee
import Graphics.Element exposing (..)
import Graphics.Collage exposing (..)
import Text exposing (..)
import Text
import Color exposing (..)
redText : String -> Text
redText str =
Text.color red (fromString str)
redText' : String -> Text
redText' str =
Text.color red (style defaultStyle (fromString str))
main : Element
main = flow down
[ leftAligned <| redText "Hello, World!"
, leftAligned <| redText' "Hello, World!"
]|
Yes, looks good in 0.15 http://share-elm.com/sprout/5650560be4b05f0d6cc4a0ee import Graphics.Element exposing (..)
import Graphics.Collage exposing (..)
import Text exposing (..)
import Text
import Color exposing (..)
redText : String -> Text
redText str =
Text.color red (fromString str)
redText' : String -> Text
redText' str =
Text.color red (style defaultStyle (fromString str))
main : Element
main = flow down
[ leftAligned <| redText "Hello, World!"
, leftAligned <| redText' "Hello, World!"
] |
kasbah
closed this
Nov 21, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
kasbah commentedFeb 10, 2015
First applying a style seems to make it impossible to then use
Text.color.http://share-elm.com/sprout/56506538e4b05f0d6cc4a102