git.iko.soy/typeable/elm-ui
on fac4cd6 help sign in
57 lines 1.3 kB history raw
1module Tests.Transparency exposing (..)
3import Html
4import Testable
5import Testable.Element exposing (..)
6import Testable.Element.Background as Background
7import Testable.Element.Font as Font
8import Testable.Runner
9import Tests.Palette as Palette exposing (..)
12box attrs =
13 el
14 ([ width (px 50)
15 , height (px 50)
16 , Background.color blue
17 ]
18 ++ attrs
19 )
20 none
23{-| -}
24main : Html.Html msg
25main =
26 Testable.Runner.show view
29view =
30 column [ paddingXY 0 100, spacing 16 ]
31 [ text "transparency"
32 , row [ spacing 16 ]
33 [ box [ transparent True ]
34 , box [ transparent False ]
35 ]
36 , text "transparency with hover"
37 , row [ spacing 16 ]
38 [ box
39 [ transparent True
41 -- , mouseOver [ Background.color green ]
42 ]
43 , box
44 [ transparent False
46 -- , mouseOver [ Background.color green ]
47 ]
48 ]
49 , text "all opacities"
50 , row [ spacing 16 ]
51 [ box [ alpha 0 ]
52 , box [ alpha 0.25 ]
53 , box [ alpha 0.5 ]
54 , box [ alpha 0.75 ]
55 , box [ alpha 1.0 ]
56 ]
57 ]