Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save shaharhesse/08ab888c6aa8b3c2b94c2c48fbb1764c to your computer and use it in GitHub Desktop.
Save shaharhesse/08ab888c6aa8b3c2b94c2c48fbb1764c to your computer and use it in GitHub Desktop.
SCSS WordPress Comment Styles. Based on the WordPress threaded comments CSS over at css-tricks.com, I created this nested SCSS. It's basic, simple, and clean. Quickly copy, paste, and style away! Original CSS located at: http://css-tricks.com/snippets/wordpress/base-threaded-comments-styling/
/* =========================================================
* Comments
* ========================================================= */
ol.comment-list{
margin: 0 0 1em;
padding: 0;
list-style-type: none;
text-indent: 0;
li{}
li.alt{}
li.bypostauthor{}
li.byuser{}
li.comment-author-admin{}
li.comment{
padding: 1em;
border-bottom: 1px solid #ddd;
.comment-author{
.says{
display: none;
}
} // end .comment-author
div.vcard{
font-weight: em(14);
cite.fn{
a.url{}
} // end cite.fn
img.avatar{
float: left;
margin: 0 20px 10px 0;
border: 5px solid #ccc;
} // end .avatar
img.avatar-32{} // end .avatar-32
img.photo{} // end .photo
span.says{} // ebd .says
} // end .vcard
div.commentmetadata{} // end .commentmetadata
div.comment-meta{
font-size: em(12);
a{
color: #ccc;
} // end a
} // end div.comment-meta
p{
clear: both;
} // end p
ul{
margin: 0 0 0 20px;
list-style: none;
font-size: em(12);
} // end ul
div.reply{
font-size: em(12);
a{
font-weight: bold;
} // end a
} // end reply
ol.children{
margin: 12px;
list-style-type: none;
text-indent: 0;
li{} // end li
li.alt{}
li.bypostauthor{}
li.byuser{}
li.comment{}
li.comment-author-admin{}
li.depth-2{
margin: 0 0 10px 10px;
border-left: 5px solid #ccc;
}
li.depth-3{
margin: 0 0 10px 10px;
border-left: 5px solid #bbb;
}
li.depth-4{
margin: 0 0 10px 10px;
border-left: 5px solid #aaa;
}
li.depth-5{} // you get the idea
li.odd{} // end .odd
} // end ul.children
} // end li.comment
li.even{
background: #fff;
}
li.odd{
background: #f6f6f6;
}
li.parent{
border-left: 5px solid #ddd;
}
li.thread-alt{}
li.thread-even{}
li.thread-odd{}
} // end commentlist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment