Skip to content

Commit

Permalink
fix: improve layout of htmlLabels with helptext
Browse files Browse the repository at this point in the history
Use inline-flex for the checkbox/radio `<label>` so that even if the label includes something like a div with bottom margin, the helptext popup still appears beside the label rather than underneath it
  • Loading branch information
ianroberts committed Nov 3, 2024
1 parent 88ba89f commit 29ef3ca
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions frontend/src/components/annotation/CheckboxInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,12 @@ name: "CheckboxInput",
</script>

<style scoped>
div.custom-checkbox >>> label {
display: inline-flex;
}
div.custom-checkbox >>> svg.annotation-help-prompt {
margin-top: 0.3em;
margin-inline-start: 0.25em;
}
</style>
8 changes: 8 additions & 0 deletions frontend/src/components/annotation/RadioInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,12 @@ export default {
</script>

<style scoped>
div.custom-radio >>> label {
display: inline-flex;
}
div.custom-radio >>> svg.annotation-help-prompt {
margin-top: 0.3em;
margin-inline-start: 0.25em;
}
</style>

0 comments on commit 29ef3ca

Please sign in to comment.