You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can use snippet markers within your HTML template code in order to generate *-prefixed selectors that you can later use within Enlive template.
For example, if you say:
<divsnippet="content-main"></div>
You can later reference it with *content-main selector, which will be automatically generated for you.
One of the hidden benefist is that if your application code relies on some element in HTML, here it will be validated, and if there's anything referenced that's not present in HTML, you'll get an exception during compilation, which is good, I think.
Where *content-main, *simple-list, *simple-list-item are symbols generated from HTML markup.
These symbols will throw an exception during compile time if they're gone from HTML markup.
They're unobtrusive (you can use different HTML ids and all other attributes without breaking application code).
You don't have to write complex (potentially nested) CSS selectors
The text was updated successfully, but these errors were encountered:
You can use id attributes suffixed by # within your HTML template code in order to generate :#id# selectors that you can later use within Enlive template.
For example, if you say:
<divid="content-main#"></div>
You can later reference it with :#content-main# selector, which will be automatically generated for you.
One of the hidden benefits is that if your application code relies on some element in HTML, here it will be validated, and if there's anything referenced that's not present in HTML, you'll get a warning during compilation.
Such ids are automatically removed so duplicate ids won't show up in the output.
You can use snippet markers within your HTML template code in order to generate *-prefixed selectors that you can later use within Enlive template.
For example, if you say:
You can later reference it with *content-main selector, which will be automatically generated for you.
One of the hidden benefist is that if your application code relies on some element in HTML, here it will be validated, and if there's anything referenced that's not present in HTML, you'll get an exception during compilation, which is good, I think.
For example, having an html template such as:
You can do:
Where
*content-main
,*simple-list
,*simple-list-item
are symbols generated from HTML markup.These symbols will throw an exception during compile time if they're gone from HTML markup.
They're unobtrusive (you can use different HTML ids and all other attributes without breaking application code).
You don't have to write complex (potentially nested) CSS selectors
The text was updated successfully, but these errors were encountered: