Skip to content

Commit

Permalink
Merge pull request #6598 from surveyjs/bug/range-color-input
Browse files Browse the repository at this point in the history
Fix input color/range height
  • Loading branch information
dk981234 authored Jul 26, 2023
2 parents 8405ff0 + 41d68e4 commit d745188
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/defaultV2-theme/blocks/sd-input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@
width: calcSize(3);
}

.sd-input[type="color"],
.sd-input[type="range"] {
box-sizing: content-box;
width: calc(100% - 4 * #{$base-unit});
height: multiply(1.5, $font-editorfont-size);
}

.sd-input[type="range"]::-webkit-slider-runnable-track {
@include runnable-track;
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions visualRegressionTests/tests/defaultV2/question.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,25 @@ frameworks.forEach(framework => {
});
});

test("Check question color", async (t) => {
await wrapVisualTest(t, async (t, comparer) => {
await t.resizeWindow(1920, 1080);
await initSurvey(framework, {
questions: [
{
type: "text",
inputType: "color",
name: "question_color",
width: "708px",
title: "Color question"
},
]
});
const questionRoot = Selector(".sd-question");
await takeElementScreenshot("question-color.png", questionRoot, t, comparer);
});
});

test("Check question num + expand/collapse", async (t) => {
await wrapVisualTest(t, async (t, comparer) => {
await t.resizeWindow(1920, 1080);
Expand Down

0 comments on commit d745188

Please sign in to comment.