Comments Pattern
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
Rules
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
.
Quick reference
- [...]
- 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]
HTML diagrams
Single comment
<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">
Threads
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"...