]> git.openstreetmap.org Git - rails.git/commitdiff
Replace .btn-wrapper with Bootstrap gutters/gaps
authorAnton Khorev <tony29@yandex.ru>
Sun, 26 May 2024 02:38:27 +0000 (05:38 +0300)
committerAnton Khorev <tony29@yandex.ru>
Sun, 26 May 2024 02:38:27 +0000 (05:38 +0300)
app/assets/stylesheets/common.scss
app/views/accounts/edit.html.erb
app/views/notes/new.html.erb
app/views/notes/show.html.erb

index c3f2b36adc361a320f7618664c5d39644cb75c36..4df8b4c2db79badb1a8b6eb37b4f41f9f1fb6836 100644 (file)
@@ -637,16 +637,6 @@ tr.turn {
   }
 }
 
   }
 }
 
-/* Bootstrap buttons don't have any vertical margin, so
-   they touch when adjacent buttons wrap onto a new line
-   e.g. wide form buttons on a narrow sidebar */
-
-.btn-wrapper {
-  > .btn {
-    margin-bottom: $spacer * 0.25;
-  }
-}
-
 /* Force LTR/RTL alignment for placeholder text */
 
 .form-control::placeholder {
 /* Force LTR/RTL alignment for placeholder text */
 
 .form-control::placeholder {
index dc649cbf491fb9a2925f1fd0303a26ff0234b8fa..f15bc195c584d7614bfe1548f08fa4a63d24d860 100644 (file)
     </span>
   </div>
 
     </span>
   </div>
 
-  <div class="row justify-content-between">
-    <div class="col-auto btn-wrapper">
+  <div class="row justify-content-between g-1">
+    <div class="col-auto">
       <%= f.primary t(".save changes button") %>
     </div>
       <%= f.primary t(".save changes button") %>
     </div>
-    <div class="col-auto btn-wrapper">
+    <div class="col-auto">
       <%= link_to t(".delete_account"), account_deletion_path, :class => "btn btn-outline-danger" %>
     </div>
   </div>
       <%= link_to t(".delete_account"), account_deletion_path, :class => "btn btn-outline-danger" %>
     </div>
   </div>
index 6728b32ffbc6a501abb252fc6941b3ec3e2cfdcd..c9b1275b9493f43c9bca1525341dd9b6910af7d2 100644 (file)
@@ -15,7 +15,7 @@
     <div class="mb-3">
       <textarea class="form-control" name="text" cols="40" rows="10" maxlength="2000" placeholder="<%= t(".advice") %>"></textarea>
     </div>
     <div class="mb-3">
       <textarea class="form-control" name="text" cols="40" rows="10" maxlength="2000" placeholder="<%= t(".advice") %>"></textarea>
     </div>
-    <div class="btn-wrapper">
+    <div>
       <input type="submit" name="add" value="<%= t(".add") %>" disabled="1" class="btn btn-primary">
     </div>
   </form>
       <input type="submit" name="add" value="<%= t(".add") %>" disabled="1" class="btn btn-primary">
     </div>
   </form>
index b3f1244338dc6ab4b704304caf73036715786194..a04cbf9d9b215dee8fa5da9578bc27a0ef398c6c 100644 (file)
@@ -51,7 +51,7 @@
         </div>
         <div id="comment-error" class="alert alert-danger p-2 mb-3" hidden>
         </div>
         </div>
         <div id="comment-error" class="alert alert-danger p-2 mb-3" hidden>
         </div>
-        <div class="btn-wrapper">
+        <div class="d-flex flex-wrap gap-1">
           <% if current_user.moderator? -%>
             <%= submit_tag t(".hide"), :name => "hide", :class => "btn btn-light",
                                        :data => { :method => "DELETE",
           <% if current_user.moderator? -%>
             <%= submit_tag t(".hide"), :name => "hide", :class => "btn btn-light",
                                        :data => { :method => "DELETE",
@@ -77,7 +77,7 @@
       <input type="hidden" name="text" value="" autocomplete="off">
       <div id="comment-error" class="alert alert-danger p-2 mb-3" hidden>
       </div>
       <input type="hidden" name="text" value="" autocomplete="off">
       <div id="comment-error" class="alert alert-danger p-2 mb-3" hidden>
       </div>
-      <div class="btn-wrapper">
+      <div class="d-flex flex-wrap gap-1">
         <% if @note.status != "hidden" and current_user and current_user.moderator? -%>
           <input type="submit" name="hide" value="<%= t(".hide") %>" class="btn btn-light" data-method="DELETE" data-url="<%= api_note_url(@note, "json") %>">
         <% end -%>
         <% if @note.status != "hidden" and current_user and current_user.moderator? -%>
           <input type="submit" name="hide" value="<%= t(".hide") %>" class="btn btn-light" data-method="DELETE" data-url="<%= api_note_url(@note, "json") %>">
         <% end -%>