Last active
November 12, 2018 21:30
-
-
Save roovo/c016a4b3c4a1cc375ddc040ceced7a59 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main exposing (main) | |
import Browser | |
import Element exposing (Element) | |
import Html exposing (Html) | |
import Html.Attributes | |
main : Program () () msg | |
main = | |
Browser.sandbox { init = (), view = view, update = \_ m -> m } | |
view : () -> Html msg | |
view _ = | |
Html.div [] | |
[ Html.node "style" | |
[] | |
[ Html.text "@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {#ie-flex-fix { flex-basis: 0% !important; }}" ] | |
, Element.layout [] | |
(Element.column [] | |
[ okay | |
, overfloweth | |
, withFlexBasisFix | |
, withFlexBasisFixNoRowFill | |
] | |
) | |
] | |
okay : Element msg | |
okay = | |
Element.el | |
[ Element.width <| Element.px 90 ] | |
(Element.paragraph | |
[ Element.explain Debug.todo | |
] | |
[ Element.text "foo bar baz" ] | |
) | |
overfloweth : Element msg | |
overfloweth = | |
Element.el | |
[ Element.width <| Element.px 90 ] | |
(Element.row | |
[ Element.width Element.fill ] | |
[ Element.paragraph | |
[ Element.explain Debug.todo | |
] | |
[ Element.text "foo bar baz" ] | |
] | |
) | |
withFlexBasisFix : Element msg | |
withFlexBasisFix = | |
Element.el | |
[ Element.width <| Element.px 90 ] | |
(Element.row | |
[ Element.width Element.fill ] | |
[ Element.paragraph | |
[ Element.explain Debug.todo | |
, Element.htmlAttribute <| Html.Attributes.attribute "id" "ie-flex-fix" | |
] | |
[ Element.text "foo bar baz" ] | |
] | |
) | |
withFlexBasisFixNoRowFill : Element msg | |
withFlexBasisFixNoRowFill = | |
Element.el | |
[ Element.width <| Element.px 90 ] | |
(Element.row | |
[] | |
[ Element.paragraph | |
[ Element.explain Debug.todo | |
, Element.htmlAttribute <| Html.Attributes.attribute "id" "ie-flex-fix" | |
] | |
[ Element.text "foo bar baz" ] | |
] | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment