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">
@use "sass/elevation" as elevation;
span.floating-reference {
line-height: 1;
}
.floating {
position: absolute;
border-radius: 5px;

View file

@ -76,13 +76,14 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
closeOnInsideClick
inline
on:close={() => (showFloating = false)}
let:asReference
>
<span class="latex-button" use:asReference>
<IconButton {disabled} on:click={() => (showFloating = !showFloating)}>
{@html functionIcon}
</IconButton>
</span>
<IconButton
slot="reference"
{disabled}
on:click={() => (showFloating = !showFloating)}
>
{@html functionIcon}
</IconButton>
<Popover slot="floating" --popover-padding-inline="0">
{#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 {
font: Verdana;
}
.latex-button {
line-height: 1;
}
</style>

View file

@ -119,20 +119,19 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
placement="bottom"
inline
on:close={() => (showFloating = false)}
let:asReference
>
<span use:asReference class="remove-format-button">
<IconButton
tooltip={tr.editingSelectRemoveFormatting()}
{disabled}
widthMultiplier={0.5}
iconSize={120}
--border-right-radius="5px"
on:click={() => (showFloating = !showFloating)}
>
{@html chevronDown}
</IconButton>
</span>
<IconButton
slot="reference"
class="remove-format-button"
tooltip={tr.editingSelectRemoveFormatting()}
{disabled}
widthMultiplier={0.5}
iconSize={120}
--border-right-radius="5px"
on:click={() => (showFloating = !showFloating)}
>
{@html chevronDown}
</IconButton>
<Popover slot="floating" --popover-padding-inline="0">
{#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}
</Popover>
</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">
.tags-selected-button {
line-height: 1;
:global(svg) {
padding-bottom: 2px;
cursor: pointer;