summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-02 00:11:23 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-02 00:11:23 +0200
commitbf68c8fed6776cd40d859e6e968a251b4b934c8b (patch)
tree24e417ed846d5bb2d0311844220bcf4bf521220b
parent95955abaa339098755a214cfcadf87c90211fe64 (diff)
Fix button_to styling for Rails 8.1, add destructive variant
- Extend all selectors to cover button[type="submit"] alongside input[type="submit"] — Rails 8.1 generates <button> not <input> - Add appearance: none / -webkit-appearance: none to kill browser native button chrome - Default hover now matches plain link hover (color: #ff9600) - Add form.button_to.destructive variant: #cc0000 at rest, white-on-red pill on hover - Usage: form: { class: 'button_to destructive' } in button_to calls
-rw-r--r--public/stylesheets/admin.css24
1 files changed, 20 insertions, 4 deletions
diff --git a/public/stylesheets/admin.css b/public/stylesheets/admin.css
index c9ef173..a02bd61 100644
--- a/public/stylesheets/admin.css
+++ b/public/stylesheets/admin.css
@@ -123,7 +123,10 @@ form.button_to {
123 padding: 0; 123 padding: 0;
124} 124}
125 125
126form.button_to input[type="submit"] { 126form.button_to input[type="submit"],
127form.button_to button[type="submit"] {
128 -webkit-appearance: none;
129 appearance: none;
127 background: none; 130 background: none;
128 border: none; 131 border: none;
129 padding: 0; 132 padding: 0;
@@ -131,12 +134,25 @@ form.button_to input[type="submit"] {
131 font: inherit; 134 font: inherit;
132 color: inherit; 135 color: inherit;
133 cursor: pointer; 136 cursor: pointer;
134 text-decoration: none 137 text-decoration: none;
138}
139
140form.button_to input[type="submit"]:hover,
141form.button_to button[type="submit"]:hover {
142 color: #ff9600;
135} 143}
136 144
137form.button_to input[type="submit"]:hover { 145form.button_to.destructive input[type="submit"],
146form.button_to.destructive button[type="submit"] {
147 color: #cc0000;
148}
149
150form.button_to.destructive input[type="submit"]:hover,
151form.button_to.destructive button[type="submit"]:hover {
138 color: #ffffff; 152 color: #ffffff;
139 background-color: #ff9600; 153 background-color: #cc0000;
154 border-radius: 2px;
155 padding: 0 3px;
140} 156}
141 157
142#admin_wizard { 158#admin_wizard {