From 802bd6fc380555f6bf7df67ae740a97a09c669e8 Mon Sep 17 00:00:00 2001 From: Carl Woodward Date: Sat, 13 Sep 2014 22:09:57 +1000 Subject: [PATCH 1/2] Fixes bounty #324 - strengthen comment li selector specificity. --- app/assets/stylesheets/protip.css.scss | 2 +- app/views/comments/_comment.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/protip.css.scss b/app/assets/stylesheets/protip.css.scss index 1dd3474a..646391de 100644 --- a/app/assets/stylesheets/protip.css.scss +++ b/app/assets/stylesheets/protip.css.scss @@ -309,7 +309,7 @@ body.protip-single { .comment-list { padding-bottom: 10px; - > li { + li.comment { //margin: 0 70px 30px 70px; margin: 5% 10%; diff --git a/app/views/comments/_comment.html.haml b/app/views/comments/_comment.html.haml index 4e575125..a604c02c 100644 --- a/app/views/comments/_comment.html.haml +++ b/app/views/comments/_comment.html.haml @@ -1,4 +1,4 @@ -%li.cf{:class => top_comment?(comment, comment_counter) ? "top-comment" : "" , :id => "comment_#{comment.id}"} +%li.cf.comment{:class => top_comment?(comment, comment_counter) ? "top-comment" : "" , :id => "comment_#{comment.id}"} %header.cf .comment-avatar =image_tag(users_image_path(comment.user), :class => 'avatar') From 55f71433c58dec9215318a477aa8e68de1bfaad2 Mon Sep 17 00:00:00 2001 From: Carl Woodward Date: Sat, 13 Sep 2014 22:12:06 +1000 Subject: [PATCH 2/2] Remove nested p tags in comments. Caused by nesting markdown inside p tag. See https://assembly.com/coderwall/wips/324#comment-3. --- app/views/comments/_comment.html.haml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/views/comments/_comment.html.haml b/app/views/comments/_comment.html.haml index a604c02c..e2756145 100644 --- a/app/views/comments/_comment.html.haml +++ b/app/views/comments/_comment.html.haml @@ -7,8 +7,7 @@ %a.like{:href =>like_protip_comment_path(comment.commentable.try(:public_id), comment.id), 'data-remote' => 'true', 'data-method' => :post, :class => comment_liked_class(comment), :rel => "nofollow"} =comment_likes(comment) .comment - %p - =raw sanitize(formatted_comment(comment.body)) + =raw sanitize(formatted_comment(comment.body)) - if can_edit_comment?(comment) .edit-comment.hidden =form_for [comment.commentable, comment] do |f|