From f0258fb3ee7e8e98cc9eda71df6808e6ffc6fd13 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Tue, 27 Dec 2016 14:26:20 +0100 Subject: [PATCH] improves html structure for comments --- app/assets/stylesheets/layout.scss | 20 ++++++---- app/views/comments/_comment.html.erb | 55 ++++++++++++++-------------- 2 files changed, 41 insertions(+), 34 deletions(-) diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index e5e6562d3..e18accc53 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -1601,7 +1601,10 @@ table { } .comment-body { - margin-left: rem-calc(42); + + img { + margin-right: $line-height/2; + } .reply { background: white; @@ -1609,15 +1612,19 @@ table { border-left: 0; border-right: 0; font-size: $small-font-size; - margin: rem-calc(6) 0; - padding: rem-calc(6); + margin: $line-height/4 0; + padding: $line-height/4; position: relative; + a.relative, [class^="icon-arrow"] { + padding-left: $line-height/2; + } + [class^="icon-arrow"] { - font-size: rem-calc(18); + font-size: $base-font-size; left: -20px; position: absolute; - top: 0; + top: -1px; } .divider { @@ -1669,8 +1676,7 @@ table { .comment-info { color: $text-medium; font-size: $small-font-size; - margin-top: $line-height/4; - vertical-align: middle; + line-height: rem-calc(32); // Same as avatar height span.user-name { color: $text; diff --git a/app/views/comments/_comment.html.erb b/app/views/comments/_comment.html.erb index 549b62862..f215068ca 100644 --- a/app/views/comments/_comment.html.erb +++ b/app/views/comments/_comment.html.erb @@ -1,29 +1,28 @@ <% cache [locale_and_user_status(comment), comment, commentable_cache_key(comment.commentable), comment.author, (@comment_flags[comment.id] if @comment_flags)] do %>
<% end %>