Skip to content

Instantly share code, notes, and snippets.

@debois
Created April 14, 2016 13:00
Show Gist options
  • Save debois/b3309113140053854519883a8106d5bd to your computer and use it in GitHub Desktop.
Save debois/b3309113140053854519883a8106d5bd to your computer and use it in GitHub Desktop.
Additional CSS to make MDL (elm-mdl) hide address-bar in mobile on scroll. May have adverse side-effects.
import Material.Style as Style
import Html exposing (Html)
-- Put this somewhere in your main contents.
additionalCSS : Html
additionalCSS =
Style.stylesheet """
html, body {
overflow-y: auto;
min-height: 100%;
}
mdl-layout {
min-height: 100%;
}
.mdl-layout {
overflow: visible;
}
.mdl-layout__drawer {
position: fixed;
}
.mdl-layout__content {
display: block;
overflow: visible;
margin-top: 64px;
}
.is-small-screen .mdl-layout__content {
margin-top: 56px;
}
.mdl-layout__header {
position: fixed;
}
.mdl-layout__obfuscator {
position: fixed;
}
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment