Closed fancellu closed 3 years ago
Ok, to answer my own question
def css = Action {
val css: TxtFormat.Appendable =views.txt.css()
Ok(css).as("text/css")
}
inside HTML
<link rel="stylesheet" href="@routes.HomeController.css()"/>
inside css.scala.txt, the css. with @ escaped to @@ (twirl likes @)
This sounds solved. I'll close it.
Thanks, @fancellu for coming back and take the time to leave an answer. :-)
e.g.
blah.scala.css
so we can use the power of twirl/scala to generate our css
Like a suped up SASS
I see the docs say it only supports js/html/txt/xml