2

In yesod, we can specify the class attribute like so:

<div .myclass> ==> <div class="myclass">

Is there an analog for id? For example, something like:

<div #id> ==> <div id="id">
Clark Gaebel
  • 17,280
  • 20
  • 66
  • 93

1 Answers1

5

Yes; it has the exact syntax you guessed.

From the Yesod book:

There are two convenience attributes: for id, you can use the hash, and for classes, the period. In other words, <p #paragraphid .class1 .class2>.

ehird
  • 40,602
  • 3
  • 180
  • 182