From 45d422f6582ac2ebf455a8c8168738db54a76582 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Fri, 14 Aug 2026 00:30:45 +0200 Subject: Consolidate .action_button styling from visual nudging Let containers space their own action buttons: Remove a superfluous margin-bottom from .action_button, their containers already properly arranged them. Align action rows on the text baseline: .aligned_action_row aligns its children on the baseline, so a control sits level with the text beside it without a per-element offset. --- app/views/nodes/chapters.html.erb | 2 +- app/views/nodes/show.html.erb | 2 +- public/stylesheets/admin.css | 21 +-------------------- 3 files changed, 3 insertions(+), 22 deletions(-) diff --git a/app/views/nodes/chapters.html.erb b/app/views/nodes/chapters.html.erb index def56659..bbaf0b8a 100644 --- a/app/views/nodes/chapters.html.erb +++ b/app/views/nodes/chapters.html.erb @@ -1,6 +1,6 @@

<%= t(".title") %>

-<%= form_tag chapters_nodes_path, method: :get, class: "node_search_form" do %> +<%= form_tag chapters_nodes_path, method: :get, class: "search_form" do %> <%= button_tag type: "submit", class: "action_button" do %> diff --git a/app/views/nodes/show.html.erb b/app/views/nodes/show.html.erb index c9558ed0..af55d699 100644 --- a/app/views/nodes/show.html.erb +++ b/app/views/nodes/show.html.erb @@ -122,7 +122,7 @@
<%= hidden_field_tag :parent_id, suggestion&.id %> - <%= submit_tag t(".restore_here"), :class => "action_button action_button_no_margin_top" %> + <%= submit_tag t(".restore_here"), :class => "action_button action_button" %> <% end %> <%= t(".restore_hint") %> diff --git a/public/stylesheets/admin.css b/public/stylesheets/admin.css index 94e6c546..1d504464 100644 --- a/public/stylesheets/admin.css +++ b/public/stylesheets/admin.css @@ -565,11 +565,6 @@ form.button_to svg { align-items: center; } -.button_row .action_button, -.search_form .action_button { - margin-bottom: 0; -} - #dashboard_signposts { margin-bottom: 2rem; } @@ -1431,19 +1426,10 @@ form.button_to svg { .aligned_action_row { display: flex; flex-wrap: wrap; - align-items: start; + align-items: baseline; gap: 0.5rem; } -.aligned_action_row .action_button, -.aligned_action_row form.button_to { - margin-top: -5px; -} - -.aligned_action_row .action_button.action_button_no_margin_top { - margin-top: 0; -} - /* ============================================================ Page editor / metadata forms ============================================================ */ @@ -1490,7 +1476,6 @@ div#admin_layout { font-weight: bold; text-decoration: none; color: var(--text); - margin-bottom: 1rem; background: none; cursor: pointer; font-family: inherit; @@ -2244,10 +2229,6 @@ input#menu_item_title { margin: 0.5rem 0; } -.asset_attach_form .action_button { - margin-bottom: 0; -} - .asset_attach_form .action_button + .field_hint { display: block; margin-left: 0; -- cgit v1.3