From 0262ab7d9e65cc89009f1a5447cae6d7dbb93784 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 31 Aug 2025 21:34:29 +0200 Subject: [PATCH] fix(editor): do not apply filter input styles to all editor instances --- .../components/input/filter/FilterInput.vue | 146 +++++++++--------- 1 file changed, 73 insertions(+), 73 deletions(-) diff --git a/frontend/src/components/input/filter/FilterInput.vue b/frontend/src/components/input/filter/FilterInput.vue index 822552dfd..4589eb651 100644 --- a/frontend/src/components/input/filter/FilterInput.vue +++ b/frontend/src/components/input/filter/FilterInput.vue @@ -227,6 +227,79 @@ defineExpose({ .filter-datepicker { position: absolute; } + + .ProseMirror { + outline: none; + white-space: pre-wrap; + padding: 0 !important; + + .field { + color: var(--code-literal); + } + + .operator { + color: var(--code-keyword); + } + + .value { + border-radius: $radius; + padding: .125rem .25rem; + background: var(--grey-100); + } + + .label-value { + border-radius: $radius; + padding: .125rem .25rem; + } + + .date-value { + background-color: var(--primary); + color: var(--white); + border-radius: $radius; + padding: 0.125em 0.25em; + cursor: pointer; + transition: background-color var(--transition); + + &:hover { + background-color: var(--primary-dark); + } + } + + .grouping, .logical { + color: var(--code-section); + } + + .user-value { + position: relative; + padding-inline-start: 1.5em; + + &::before { + content: attr(data-user); + position: absolute; + inset-inline-start: 0; + inset-block-start: 50%; + transform: translateY(-50%); + inline-size: 1.2em; + block-size: 1.2em; + background-color: #3b82f6; + color: white; + border-radius: 50%; + font-size: 0.8em; + display: flex; + align-items: center; + justify-content: center; + text-transform: uppercase; + } + } + + p.is-editor-empty:first-child::before { + color: var(--grey-500); + content: attr(data-placeholder); + float: inline-start; + block-size: 0; + pointer-events: none; + } + } } .editor-wrapper { @@ -237,77 +310,4 @@ defineExpose({ line-height: 1.5; padding: .5rem .75rem; } - -.ProseMirror { - outline: none; - white-space: pre-wrap; - padding: 0 !important; - - .field { - color: var(--code-literal); - } - - .operator { - color: var(--code-keyword); - } - - .value { - border-radius: $radius; - padding: .125rem .25rem; - background: var(--grey-100); - } - - .label-value { - border-radius: $radius; - padding: .125rem .25rem; - } - - .date-value { - background-color: var(--primary); - color: var(--white); - border-radius: $radius; - padding: 0.125em 0.25em; - cursor: pointer; - transition: background-color var(--transition); - - &:hover { - background-color: var(--primary-dark); - } - } - - .grouping, .logical { - color: var(--code-section); - } - - .user-value { - position: relative; - padding-inline-start: 1.5em; - - &::before { - content: attr(data-user); - position: absolute; - inset-inline-start: 0; - inset-block-start: 50%; - transform: translateY(-50%); - inline-size: 1.2em; - block-size: 1.2em; - background-color: #3b82f6; - color: white; - border-radius: 50%; - font-size: 0.8em; - display: flex; - align-items: center; - justify-content: center; - text-transform: uppercase; - } - } - - p.is-editor-empty:first-child::before { - color: var(--grey-500); - content: attr(data-placeholder); - float: inline-start; - block-size: 0; - pointer-events: none; - } -}