html - How to create Scalatags Stylesheet object -


scalatags support css stylesheets. there simple example one.

how create css styleheet following code:

<style> #div1, #div2, #div3, #div4 {     float: left;     width: 100px;     height: 35px;     margin: 10px;     padding: 10px;     border: 1px solid black; } </style> 

the inline style simple:

  val boxstyle =     """       |    float: left;       |    width: 100px;       |    height: 35px;       |    margin: 10px;       |    padding: 10px;       |    border: 1px solid black;       |     """.stripmargin      val div1 = div(id:="div1", style:=boxstyle) 

but how create corresponding stylesheet object:

object simple extends stylesheet {   initstylesheet()      ... } 


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -