Show buttons depending on reaction presence

This commit is contained in:
Andy Smith
2025-05-07 15:06:40 -05:00
parent c69402a300
commit beda688d10
3 changed files with 20 additions and 2 deletions
+14
View File
@@ -81,6 +81,20 @@
}
}
.comment__reaction {
opacity: 0.66;
@media (any-hover: hover) {
.comment:not(:hover) & {
opacity: 0;
}
}
.comment--mine & {
display: none;
}
}
.comment__event {
max-inline-size: var(--comment-max);
+4
View File
@@ -108,6 +108,10 @@
--btn-size: var(--reaction-size);
font-size: 0.75em;
.reactions:not(:has(.reaction)) & {
display: none;
}
}
/* Quick reactions
+2 -2
View File
@@ -22,8 +22,8 @@
<% end %>
<%= render "cards/comments/reactions/quick_reaction", comment: comment do %>
<button class="comment__reaction btn btn--circle borderless fill-transparent translucent" data-action="click->dialog#open:stop">
<%= icon_tag "reaction" %>
<button class="comment__reaction btn btn--circle borderless fill-transparent" data-action="click->dialog#open:stop">
<%= icon_tag "menu-dots-horizontal" %>
</button>
<% end %>
</div>