on master help sign in
sail: clarify ;class.syntax wrt spaces and special chars
c6bdd40Tinnus Napbus
content/docs/hoon/guides/sail.md+11−5
@@ -167,12 +167,18 @@ Add `.` after tag name to add a class:
167| ---------------------- | ---------------------------------------- |
167| ---------------------- | ---------------------------------------- |
168| `;h1.text-blue: Title` | `<h1 class="text-blue">Title</h1>` |
168| `;h1.text-blue: Title` | `<h1 class="text-blue">Title</h1>` |
169
169
170−If you want a class name that contains a space, you will need to use use the
170+For class values containing spaces, you can add additional `.`s like so:
171−syntax of a generic attribute:
172
171
173−| Sail | HTML |
172+| Sail | HTML |
174−| ----------------------------- | ---------------------------------------- |
173+| ------------------- | --------------------------------------- |
174+| `;div.foo.bar.baz;` | `<div class="foo bar baz"></div>` |
175+
176+Otherwise, if your class value does not conform to the allowed `@tas`
177+characters, you must use the generic attribute syntax:
178+
179+| Sail | HTML |
180+| ------------------------ | ----------------------------------- |
175−| `;div(class "logo inverse");` | `<div class="logo inverse"></div>` |
181+| `;div(class "!!! !!!");` | `<div class="!!! !!!"></div>` |
176
182
177### Images
183### Images
178
184