Skip to content

Instantly share code, notes, and snippets.

@scottcorgan
Last active July 23, 2016 14:49
Show Gist options
  • Save scottcorgan/fd8c93cccc78fc162b12063d018f1d6d to your computer and use it in GitHub Desktop.
Save scottcorgan/fd8c93cccc78fc162b12063d018f1d6d to your computer and use it in GitHub Desktop.
Sublime Text Snippet for Elm Css File
<snippet>
<content><![CDATA[
module Component.${1} exposing (CssClasses(..), css, class, classList)
import Css exposing (..)
import Css.Namespace exposing (namespace)
import Html.CssHelpers
styleNamespace : String
styleNamespace =
"${2}"
type CssClasses
= ${3}
{ class, classList } =
Html.CssHelpers.withNamespace styleNamespace
css : Css.Stylesheet
css =
(stylesheet << namespace styleNamespace)
[
]
]]></content>
<tabTrigger>styles</tabTrigger>
<scope>source.elm</scope>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment