Compiling to .css files is deprecated, and support is planned to be removed in a
future release (likely sometime in 2018), once Html.Styled has
matured sufficiently. The design goal is for elm-css to offer One Way To Do It,
and that one way is planned to be Html.Styled!
Functions for writing CSS files from elm-css.
A stylesheet.
stylesheet
[ body
[ width (px 960)
, color (rgb 7 7 7)
]
]Compile the given stylesheets to a CSS string, or to an error message if it could not be compiled.
Create a program that compiles an elm-css stylesheet to a CSS file.
import Css.File exposing (CssCompilerProgram, CssFileStructure)
import HomepageCss as Homepage
port files : CssFileStructure -> Cmd msg
fileStructure : CssFileStructure
fileStructure =
Css.File.toFileStructure
[ ( "homepage.css", Css.File.compile [ Homepage.css ] ) ]
main : CssCompilerProgram
main =
Css.File.compiler files fileStructureTranslate a list of filenames and prettyPrint results
to a list of tuples suitable for being sent to a port in a Stylesheets.elm file.
A description of CSS files that will be created by elm-css.
A prorgam that compiles a CSS file.
See compiler.
Styles scoped under an automatically-generated class.
Create a style scoped under an automatically-generated class that is guaranteed to be unique - at least relative to other class names generated using this function!
Note: Use uniqueSvgClass for classes that will be used
with SVG elements. These will not work with them!
Styles scoped under an automatically-generated class. Use these for <svg> elements, as they use a different
Create a style scoped under an automatically-generated class that is guaranteed to be unique - at least relative to other class names generated using this function!
Note: Use uniqueClass for classes that will be used with
SVG elements. These will only work with SVGs!