Set line-height = 1 on inline floating-reference (#2096)

This commit is contained in:
Matthias Metelka 2022-09-30 03:43:08 +02:00 committed by GitHub
parent 6944210fbe
commit de4d69454a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 32 deletions

View file

@ -185,7 +185,9 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
<style lang="scss"> <style lang="scss">
@use "sass/elevation" as elevation; @use "sass/elevation" as elevation;
span.floating-reference {
line-height: 1;
}
.floating { .floating {
position: absolute; position: absolute;
border-radius: 5px; border-radius: 5px;

View file

@ -76,13 +76,14 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
closeOnInsideClick closeOnInsideClick
inline inline
on:close={() => (showFloating = false)} on:close={() => (showFloating = false)}
let:asReference
> >
<span class="latex-button" use:asReference> <IconButton
<IconButton {disabled} on:click={() => (showFloating = !showFloating)}> slot="reference"
{disabled}
on:click={() => (showFloating = !showFloating)}
>
{@html functionIcon} {@html functionIcon}
</IconButton> </IconButton>
</span>
<Popover slot="floating" --popover-padding-inline="0"> <Popover slot="floating" --popover-padding-inline="0">
{#each dropdownItems as [callback, keyCombination, label]} {#each dropdownItems as [callback, keyCombination, label]}
@ -108,8 +109,4 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
.shortcut { .shortcut {
font: Verdana; font: Verdana;
} }
.latex-button {
line-height: 1;
}
</style> </style>

View file

@ -119,10 +119,10 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
placement="bottom" placement="bottom"
inline inline
on:close={() => (showFloating = false)} on:close={() => (showFloating = false)}
let:asReference
> >
<span use:asReference class="remove-format-button">
<IconButton <IconButton
slot="reference"
class="remove-format-button"
tooltip={tr.editingSelectRemoveFormatting()} tooltip={tr.editingSelectRemoveFormatting()}
{disabled} {disabled}
widthMultiplier={0.5} widthMultiplier={0.5}
@ -132,7 +132,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
> >
{@html chevronDown} {@html chevronDown}
</IconButton> </IconButton>
</span>
<Popover slot="floating" --popover-padding-inline="0"> <Popover slot="floating" --popover-padding-inline="0">
{#each showFormats as format (format.name)} {#each showFormats as format (format.name)}
@ -143,9 +142,3 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
{/each} {/each}
</Popover> </Popover>
</WithFloating> </WithFloating>
<style lang="scss">
.remove-format-button {
line-height: 1;
}
</style>

View file

@ -56,8 +56,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
<style lang="scss"> <style lang="scss">
.tags-selected-button { .tags-selected-button {
line-height: 1;
:global(svg) { :global(svg) {
padding-bottom: 2px; padding-bottom: 2px;
cursor: pointer; cursor: pointer;