only show formatting help on focus/hover in inbox entries

This commit is contained in:
Andreas Nedbal 2023-01-10 16:05:50 +01:00
parent cb7f9179e3
commit 122935e723
2 changed files with 16 additions and 1 deletions

View File

@ -1,4 +1,6 @@
.inbox-entry { .inbox-entry {
$this: &;
&--new { &--new {
box-shadow: 0 0.125rem 0.25rem var(--primary); box-shadow: 0 0.125rem 0.25rem var(--primary);
@ -19,4 +21,17 @@
} }
} }
} }
.format-help {
opacity: .3;
#{$this}:focus-within & {
opacity: 1;
}
}
&:focus-within .format-help,
&:hover .format-help {
opacity: 1;
}
} }

View File

@ -32,7 +32,7 @@
%button.btn.btn-default.px-1{ name: "ib-options", data: { ib_id: i.id, state: :hidden } } %button.btn.btn-default.px-1{ name: "ib-options", data: { ib_id: i.id, state: :hidden } }
%i.fa.fa-chevron-down %i.fa.fa-chevron-down
%span.pe-none= t(".options") %span.pe-none= t(".options")
%p.ms-auto.align-self-center.mt-2.mt-sm-0.text-center %p.format-help.ms-auto.align-self-center.mt-2.mt-sm-0.text-center
= render "shared/format_link" = render "shared/format_link"
.card-footer.d-none{ id: "ib-options-#{i.id}" } .card-footer.d-none{ id: "ib-options-#{i.id}" }
%h4= t(".sharing.heading") %h4= t(".sharing.heading")