Better trigger alignment without reactions

This commit is contained in:
Andy Smith
2025-10-27 15:05:40 -05:00
parent 5180555e30
commit ce4899d089
3 changed files with 13 additions and 6 deletions
+2 -3
View File
@@ -37,8 +37,6 @@
}
.comment__author {
margin-inline-end: calc(var(--comment-padding-inline) * -0.66);
.btn {
font-weight: inherit;
}
@@ -54,6 +52,7 @@
}
.comment__body {
padding-inline-end: var(--reaction-size);
text-align: start;
:first-child {
@@ -75,7 +74,7 @@
border-radius: 0.2em;
padding:
var(--comment-padding-block)
var(--comment-padding-inline)
calc(var(--comment-padding-inline) / 2)
calc(var(--comment-padding-block) * 1.5)
var(--comment-padding-inline);
word-wrap: break-word;
+10 -2
View File
@@ -19,14 +19,22 @@
&:not(:has(.reaction)) {
inline-size: auto;
inset-block-end: var(--comment-padding-block);
inset-inline-end: calc(var(--comment-padding-inline) / 2);
margin: 0;
inset: auto 0 var(--comment-padding-block) auto;
position: absolute;
translate: 50%;
.reactions__list {
display: none;
}
.reactions__trigger {
background-color: var(--color-ink-lightest);
&:not(:hover) {
opacity: 0.66;
}
}
}
}
@@ -6,7 +6,7 @@
<%= turbo_frame_tag comment, :new_reaction do %>
<%= link_to new_card_comment_reaction_path(comment.card, comment), role: "button",
class: "btn btn--circle", action: "soft-keyboard#open",
class: "reactions__trigger btn btn--circle borderless", action: "soft-keyboard#open",
data: { turbo_frame: dom_id(comment, :new_reaction), action: "dialog#close" } do %>
<%= icon_tag "reaction" %>
<span class="for-screen-reader">Add your own reaction</span>