mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
documentation: combining object reference and class attribute
This commit is contained in:
parent
da1b6c4a01
commit
ee00d3be36
1 changed files with 7 additions and 0 deletions
|
@ -622,6 +622,13 @@ is compiled to:
|
|||
Hello!
|
||||
</div>
|
||||
|
||||
The `:class` attribute may be used in conjunction with an object
|
||||
reference. The compiled element will have the union of all classes.
|
||||
|
||||
- user = User.find(1)
|
||||
%p[user]{:class => 'alpha bravo'}
|
||||
<p id="user_1" class="alpha bravo user"></p>
|
||||
|
||||
## Doctype: `!!!`
|
||||
|
||||
When describing HTML documents with Haml, you can have a document type or XML
|
||||
|
|
Loading…
Add table
Reference in a new issue