diff --git a/src/defaultV2-theme/blocks/sd-question.scss b/src/defaultV2-theme/blocks/sd-question.scss index f44a44a504..d10e8b3275 100644 --- a/src/defaultV2-theme/blocks/sd-question.scss +++ b/src/defaultV2-theme/blocks/sd-question.scss @@ -157,6 +157,6 @@ .sd-question__title--empty { .sv-string-viewer { display: inline-block; - height: calcSize(3); + height: multiply(1.5, $font-questiontitle-size); } } \ No newline at end of file diff --git a/visualRegressionTests/tests/defaultV2/etalons/question-empty-title-height.png b/visualRegressionTests/tests/defaultV2/etalons/question-empty-title-height.png new file mode 100644 index 0000000000..936d68da17 Binary files /dev/null and b/visualRegressionTests/tests/defaultV2/etalons/question-empty-title-height.png differ diff --git a/visualRegressionTests/tests/defaultV2/question.ts b/visualRegressionTests/tests/defaultV2/question.ts index 6f2ed3fa69..167aea53c8 100644 --- a/visualRegressionTests/tests/defaultV2/question.ts +++ b/visualRegressionTests/tests/defaultV2/question.ts @@ -830,4 +830,37 @@ frameworks.forEach(framework => { await takeElementScreenshot("question-descriptionLocation-underInput.png", questionRows.nth(3), t, comparer); }); }); + + test("Question empty title height", async (t) => { + await wrapVisualTest(t, async (t, comparer) => { + await t.resizeWindow(1920, 1080); + await initSurvey(framework, { + "pages": [ + { + "name": "page1", + "elements": [ + { + "type": "text", + "name": "question1" + }, + { + "type": "text", + "name": "question2", + "startWithNewLine": false, + "title": " " + } + ] + } + ], + "showQuestionNumbers": "off", + "widthMode": "static", + "width": "800" + }); + await ClientFunction(() => { + document.documentElement.style.setProperty("--sjs-font-size", "8px"); + })(); + const questionRows = Selector(".sd-row"); + await takeElementScreenshot("question-empty-title-height.png", questionRows.nth(0), t, comparer); + }); + }); }); \ No newline at end of file