mirror of
https://github.com/ankitects/anki.git
synced 2025-11-12 07:37:11 -05:00
Set line-height = 1 on inline floating-reference (#2096)
This commit is contained in:
parent
6944210fbe
commit
de4d69454a
4 changed files with 22 additions and 32 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue