From b53e385804b87106077fb8a799cb75194fbe9f33 Mon Sep 17 00:00:00 2001 From: dmitrykurmanov Date: Thu, 15 Aug 2024 14:17:33 +0400 Subject: [PATCH] work for the https://github.com/surveyjs/survey-library/issues/8680 --- .../src/common-styles/sv-drag-drop.scss | 15 +++++++++++++++ .../survey-core/src/common-styles/sv-ranking.scss | 7 +++++-- src/default-styles.scss | 6 ++++-- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/packages/survey-core/src/common-styles/sv-drag-drop.scss b/packages/survey-core/src/common-styles/sv-drag-drop.scss index 892abc1ead..465e202ab1 100644 --- a/packages/survey-core/src/common-styles/sv-drag-drop.scss +++ b/packages/survey-core/src/common-styles/sv-drag-drop.scss @@ -45,6 +45,21 @@ position: absolute; z-index: 10000; font-family: var(--sjs-font-family, var(--font-family, var(--sjs-default-font-family))); + min-width: 100px; + max-width: 400px; + + .sv-ranking-item { + height: calcSize(6); + + .sv-ranking-item__text { + + .sv-string-viewer, + .sv-string-editor { + overflow: hidden; + white-space: nowrap; + } + } + } } .sv-drag-drop-choices-shortcut__content.sv-drag-drop-choices-shortcut__content { diff --git a/packages/survey-core/src/common-styles/sv-ranking.scss b/packages/survey-core/src/common-styles/sv-ranking.scss index fa44c75932..2db3c3be5e 100644 --- a/packages/survey-core/src/common-styles/sv-ranking.scss +++ b/packages/survey-core/src/common-styles/sv-ranking.scss @@ -179,7 +179,8 @@ .sv-ranking-item--ghost { height: calcSize(6); - .sv-ranking-item__text .sv-string-viewer { + .sv-ranking-item__text .sv-string-viewer, + .sv-ranking-item__text .sv-string-editor { white-space: unset; } } @@ -283,7 +284,9 @@ height: calcSize(6); .sv-ranking-item__text { - .sv-string-viewer { + + .sv-string-viewer, + .sv-string-editor { overflow: hidden; white-space: nowrap; } diff --git a/src/default-styles.scss b/src/default-styles.scss index 994418ecb1..fa993fbaf8 100644 --- a/src/default-styles.scss +++ b/src/default-styles.scss @@ -595,7 +595,8 @@ f-panel { word-break: break-all; margin: 0 calc(2 * var(--base-unit, 8px)); - .sv-string-viewer { + .sv-string-viewer, + .sv-string-editor { overflow: initial; white-space: pre-line; } @@ -620,7 +621,8 @@ f-panel { .sv-ranking-item--ghost { height: calcSize(6); - .sv-ranking-item__text .sv-string-viewer { + .sv-ranking-item__text .sv-string-viewer, + .sv-ranking-item__text .sv-string-editor { white-space: unset; } }