Skip to content

Commit

Permalink
style: tweak toolbar scroll overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdehaven committed Jan 2, 2024
1 parent 788a609 commit c486f91
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions src/components/MarkdownUi.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@
>
<div
v-if="editable && currentMode !== 'read'"
class="toolbar-overlay"
:class="{ 'left': !arrivedState.left }"
class="toolbar-overlay left"
:class="{ 'overlay-visible': !arrivedState.left }"
/>
<div
v-if="editable && currentMode !== 'read'"
class="toolbar-overlay"
:class="{ 'right': !arrivedState.right }"
class="toolbar-overlay right"
:class="{ 'overlay-visible': !arrivedState.right }"
/>
<MarkdownToolbar
v-if="editable && currentMode !== 'read'"
ref="toolbar"
@change-mode="(mode: MarkdownMode) => currentMode = mode"
@format-selection="formatSelection"
Expand Down Expand Up @@ -516,6 +517,16 @@ const markdownPanesMaxHeight = computed((): string => `${props.maxHeight}px`)
display: block;
}
&.left,
&.right {
opacity: 0;
transition: opacity 0.2s ease-in-out;
}
&.overlay-visible {
opacity: 1;
}
&.left {
background: linear-gradient(to right, rgba(#000, 0.1), rgba(#000, 0));
border-top-left-radius: var(--kui-border-radius-40, $kui-border-radius-40);
Expand Down

0 comments on commit c486f91

Please sign in to comment.