From 54b0f0b16b5e4089ee5a427b6db70e66cbecff74 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Tue, 5 Mar 2024 13:33:12 +0400 Subject: [PATCH] Fix matrix's row text show twice in modern, default theme (#7926) --- src/defaultCss/cssmodern.ts | 1 + src/defaultCss/cssstandard.ts | 1 + src/main.m600.scss | 5 +++++ src/modern.m600.scss | 5 +++++ .../markup/snapshots/martix-celltype-text-a11y.snap.html | 8 ++++---- tests/question_matrixdynamictests.ts | 6 +++--- 6 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/defaultCss/cssmodern.ts b/src/defaultCss/cssmodern.ts index 2d84618a14..2744a11d12 100644 --- a/src/defaultCss/cssmodern.ts +++ b/src/defaultCss/cssmodern.ts @@ -327,6 +327,7 @@ export var modernCss = { cell: "sv-table__cell", headerCell: "sv-table__cell sv-table__cell--header", row: "sv-table__row", + rowTextCell: "sv-table__cell--row-text", rowAdditional: "sv-table__row--additional", detailRow: "sv-table__row--detail", detailRowText: "sv-table__cell--detail-rowtext", diff --git a/src/defaultCss/cssstandard.ts b/src/defaultCss/cssstandard.ts index 0513d067c1..54ce11ffb6 100644 --- a/src/defaultCss/cssstandard.ts +++ b/src/defaultCss/cssstandard.ts @@ -208,6 +208,7 @@ export var defaultStandardCss = { headerCell: "sv_matrix_cell_header", row: "sv_matrix_row", rowAdditional: "sv-matrix__row--additional", + rowTextCell: "sv-table__cell--row-text", detailRow: "sv_matrix_detail_row", detailRowText: "sv_matrix_cell_detail_rowtext", detailCell: "sv_matrix_cell_detail", diff --git a/src/main.m600.scss b/src/main.m600.scss index 8fd09a141c..8609194675 100644 --- a/src/main.m600.scss +++ b/src/main.m600.scss @@ -46,6 +46,11 @@ content: attr(data-responsive-title); } } + .sv-table__cell--row-text { + &::before { + content: none; + } + } } table.sv_q_matrix { diff --git a/src/modern.m600.scss b/src/modern.m600.scss index 5817a9b478..993b690132 100644 --- a/src/modern.m600.scss +++ b/src/modern.m600.scss @@ -43,6 +43,11 @@ content: attr(data-responsive-title); } } + .sv-table__cell--row-text { + &:before { + content: none; + } + } } table.sv-matrix-root { diff --git a/tests/markup/snapshots/martix-celltype-text-a11y.snap.html b/tests/markup/snapshots/martix-celltype-text-a11y.snap.html index 6661206768..ed60a96cd1 100644 --- a/tests/markup/snapshots/martix-celltype-text-a11y.snap.html +++ b/tests/markup/snapshots/martix-celltype-text-a11y.snap.html @@ -11,7 +11,7 @@ - + Age 0-4 @@ -21,7 +21,7 @@ - + Age 5-11 @@ -31,7 +31,7 @@ - + Age 12-15 @@ -41,7 +41,7 @@ - + Age 16+ diff --git a/tests/question_matrixdynamictests.ts b/tests/question_matrixdynamictests.ts index 6593cd41d9..42727983b8 100644 --- a/tests/question_matrixdynamictests.ts +++ b/tests/question_matrixdynamictests.ts @@ -6897,7 +6897,7 @@ QUnit.test("Detail panel, rendered table and className", function (assert) { assert.equal( rows[1].cells[1].className, - "sv_matrix_cell sv_matrix_cell_detail_rowtext", + "sv_matrix_cell sv-table__cell--row-text sv_matrix_cell_detail_rowtext", "row text css" ); assert.equal( @@ -7211,8 +7211,8 @@ QUnit.test("Row actions, rendered table and className", function (assert) { leftActions[0] instanceof Action, "actions in cell are instances of Action" ); - assert.equal(rows[1].cells[1].className, "sv_matrix_cell", "text cell"); - assert.equal(rows[1].cells[1].className, "sv_matrix_cell", "ordinary cell"); + assert.equal(rows[1].cells[1].className, "sv_matrix_cell sv-table__cell--row-text", "text cell"); + assert.equal(rows[1].cells[2].className, "sv_matrix_cell", "ordinary cell"); assert.equal( rows[1].cells[3].className, "sv_matrix_cell sv_matrix_cell_actions",