UX: show image caption button on image hover (#670)

This commit is contained in:
Kris 2024-06-19 18:58:19 -04:00 committed by GitHub
parent 8849caf136
commit 59ed6d7b3e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 41 additions and 29 deletions

View File

@ -482,37 +482,49 @@
} }
// AI Image Caption Feature: // AI Image Caption Feature:
.image-wrapper .button-wrapper { .image-wrapper {
.generate-caption { .button-wrapper {
background: var(--tertiary-low); .generate-caption {
color: var(--tertiary); background: var(--tertiary-low);
box-shadow: var(--shadow-dropdown); color: var(--tertiary);
position: absolute; box-shadow: var(--shadow-dropdown);
white-space: nowrap; position: absolute;
top: -3.15rem; white-space: nowrap;
left: 0.75rem; top: -2rem;
padding: 0.5em 0.75em; left: 0.35rem;
transition: all 0.25s ease; padding: 0.33em 0.75em;
transition: all 0.25s ease;
.discourse-no-touch & {
display: none;
}
.d-icon { .d-icon {
margin-right: 0.25rem; margin-right: 0.25rem;
}
&:active {
box-shadow: none;
}
&:hover,
&:focus {
background: var(--tertiary-400);
color: var(--tertiary-hover);
cursor: pointer;
}
&.disabled {
pointer-events: none;
cursor: not-allowed;
opacity: 0.7;
}
} }
}
&:active { .discourse-no-touch & {
box-shadow: none; &:hover {
} .button-wrapper .generate-caption {
display: block;
&:hover, }
&:focus {
background: var(--tertiary-400);
color: var(--tertiary-hover);
cursor: pointer;
}
&.disabled {
pointer-events: none;
cursor: not-allowed;
opacity: 0.7;
} }
} }
} }