on master help sign in
sail: clarify ;class.syntax wrt spaces and special chars
commitc6bdd40fa1dd8b6b4797f102d52b141db06dfc8a authorTinnus Napbus <admin@tinnus-napbus.xyz> dateSat 26 Feb 2022, 00:18 (5 years ago) parent17bebb8
1 file changed+11−5
content/docs/hoon/guides/sail.md+11−5
content/docs/hoon/guides/sail.md+11−5
@@ -167,12 +167,18 @@ Add `.` after tag name to add a class:
167167| ---------------------- | ---------------------------------------- |
168168| `;h1.text-blue: Title` | `&lt;h1 class="text-blue">Title&lt;/h1>` |
169169
170−If you want a class name that contains a space, you will need to use use the
171−syntax of a generic attribute:
170+For class values containing spaces, you can add additional `.`s like so:
172171
173−| Sail | HTML |
174−| ----------------------------- | ---------------------------------------- |
175−| `;div(class "logo inverse");` | `&lt;div class="logo inverse">&lt;/div>` |
172+| Sail | HTML |
173+| ------------------- | --------------------------------------- |
174+| `;div.foo.bar.baz;` | `&lt;div class="foo bar baz">&lt;/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+| ------------------------ | ----------------------------------- |
181+| `;div(class "!!! !!!");` | `&lt;div class="!!! !!!">&lt;/div>` |
176182
177183### Images
178184