| layout | page | |
|---|---|---|
| title | Comments Pattern | |
| parent | Design Patterns | |
| nav_order | 10 | |
| redirect_from |
|
{: .no_toc }
Comments group together information about the commenter, information about the item the comment refers to, the comment itself, and actions pertaining to the comment.
The comment style is declared in 15-group-comments.css. Comment is part of the group supertype
Table of contents
{: .text-delta } * TOC {:toc}An individual comment is always a li contained within an ol. These comment lists, or threads, may be nested. Comments are given the class even or odd.
- [...]
- always included
- {...}
- sometimes included
[ol thread]
[li odd comment group]
[byline heading] {a} [span datetime] [/heading]
[div icon] {a} {img} {/a} [/div]
[blockquote userstuff]
{p datetime}
{landmark heading}
{ul actions}
[/li]
[/ol]
<li class="odd comment group user-123" id="comment_456"><h4 class="byline heading"><a><span class="posted datetime">
<div class="icon"><a><img class="icon">
<blockquote class="userstuff"><p class="edited datetime"><h5 class="landmark heading"><ul class="actions">
To illustrate the HTML for threads, we'll diagram the following example. Each li with the comment class contains the HTML diagramed in the previous section.
<ol class="thread"><li class="odd comment group"><li class="even comment group"><li><ol class="thread"><li class="even comment group"...<li class="odd comment group"...<li><ol class="thread"><li class="even comment group"...
