Example
For any elm-css project, you will need a minimum of:
- An
elm-htmlview - An
elm-cssfile with the style rules within
If you are using the CLI tool to generate pure CSS from the elm-css files, then you will also need an entry point file. This file will contain a port files : CssFileStructure which will tell the CLI tool which files to create.
It is advisible to use a union type for your style classes, so that they can be typechecked.
Inside here you’ll find 4 files.
SharedStylescontains the union type for your style classes. This union type needs to be accessed by the CSS file to apply the styles to the tag name. The view file will also use it for giving the divs the correct class, aided by the namespace creator.HomepageCsscontains theelm-cssHomepageViewcontains the viewsStylesheets.elmis only the entry point, for use with theelm-csscli tool! It contains no styling, but instead links the Css files with their expected output filenames.
