]> git.openstreetmap.org Git - rails.git/commitdiff
Remove unusual margins and line-height from comments
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 13 Sep 2023 12:18:30 +0000 (13:18 +0100)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 13 Sep 2023 12:18:30 +0000 (13:18 +0100)
This allows them to follow normal conventions used elsewhere, as
well as removing some custom css.

app/assets/stylesheets/common.scss
app/views/browse/changeset.html.erb
app/views/notes/show.html.erb

index bc971de2b7bdb7371e828237d7c67c0f895a75fc..395e449a1b92494bef856f9e0c6f8f0327a516ad 100644 (file)
@@ -804,15 +804,6 @@ tr.turn:hover {
     }
   }
 
-  .note-comments li, .changeset-comments li {
-    margin: $lineheight/2 0;
-
-    p {
-      margin: 10px 6px 0 6px;
-      line-height: 1.5;
-    }
-  }
-
   .subscribe-buttons input {
     font-size: 90%;
     line-height: 15px;
index b5c360a03db4c15fa80cc1db03fd176a40d856c7..9acbd05ae03992fc923f82f03420cf8c7b4ce8d1 100644 (file)
@@ -46,7 +46,9 @@
                     — <span class="action-button" data-comment-id="<%= comment.id %>" data-method="POST" data-url="<%= changeset_comment_hide_url(comment.id) %>"><%= t("javascripts.changesets.show.hide_comment") %></span>
                   <% end %>
                 </small>
-                <%= comment.body.to_html %>
+                <div class="mx-2">
+                  <%= comment.body.to_html %>
+                </div>
               </li>
             <% elsif current_user and current_user.moderator? %>
               <li id="c<%= comment.id %>">
@@ -57,7 +59,9 @@
                         :user => link_to(comment.author.display_name, user_path(comment.author))) %>
                   — <span class="action-button text-muted" data-comment-id="<%= comment.id %>" data-method="POST" data-url="<%= changeset_comment_unhide_url(comment.id) %>"><%= t("javascripts.changesets.show.unhide_comment") %></span>
                  </small>
-                <%= comment.body.to_html %>
+                <div class="mx-2">
+                  <%= comment.body.to_html %>
+                </div>
               </li>
             <% end %>
           <% end %>
index 2378d8c2ec973fcab1bc8ed6ea48c62a56b5e9ea..3bb97b484289396ffeec14167cff936401c52ad0 100644 (file)
@@ -34,7 +34,9 @@
         <% @note_comments.drop(1).each do |comment| %>
           <li id="c<%= comment.id %>">
             <small class='text-muted'><%= note_event(comment.event, comment.created_at, comment.author) %></small>
-            <%= comment.body.to_html %>
+            <div class="mx-2">
+              <%= comment.body.to_html %>
+            </div>
           </li>
         <% end %>
       </ul>