Skip to content

Commit

Permalink
#6879 Mobile: Do not use alt-row style in matrix question
Browse files Browse the repository at this point in the history
Fixes #6879
  • Loading branch information
novikov82 committed Sep 7, 2023
1 parent 919b6eb commit f8bfc76
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 37 deletions.
76 changes: 39 additions & 37 deletions src/defaultV2-theme/blocks/sd-table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,49 +80,51 @@
}
}

.sd-table--alternate-rows {
margin-left: calcSize(1);
margin-right: calcSize(1);
width: calc(100% - 2 * #{$base-unit});

.sd-table__cell:not(.sd-table__cell--header):first-of-type {
padding-left: calcSize(2);
}

.sd-table__cell:last-of-type {
padding-right: calcSize(2);
}

.sd-table__row:nth-of-type(odd) {

&>td,
td:first-of-type {
background-color: $background-dim-light;

&.sd-matrix__text--checked {
background-color: $primary-light;
}

.sd-input {
background-color: $primary-foreground;
}

.sd-item:not(.sd-item--error) {
.sd-item__decorator {
background-color: var(--sjs-general-backcolor, var(--background, #fff));
}

&.sd-item--checked .sd-item__decorator {
background-color: $primary;
.sd-root-modern:not(.sd-root-modern--mobile) {
.sd-table--alternate-rows {
margin-left: calcSize(1);
margin-right: calcSize(1);
width: calc(100% - 2 * #{$base-unit});

.sd-table__cell:not(.sd-table__cell--header):first-of-type {
padding-left: calcSize(2);
}

.sd-table__cell:last-of-type {
padding-right: calcSize(2);
}

.sd-table__row:nth-of-type(odd) {

&>td,
td:first-of-type {
background-color: $background-dim-light;

&.sd-matrix__text--checked {
background-color: $primary-light;
}

&.sd-radio--checked .sd-radio__control:focus+.sd-radio__decorator:after {
.sd-input {
background-color: $primary-foreground;
}

.sd-item:not(.sd-item--error) {
.sd-item__decorator {
background-color: var(--sjs-general-backcolor, var(--background, #fff));
}

&.sd-item--checked .sd-item__decorator {
background-color: $primary;
}

&.sd-radio--checked .sd-radio__control:focus+.sd-radio__decorator:after {
background-color: $primary-foreground;
}
}
}
}
}
}
}

.sd-table__cell {
font-weight: normal;
Expand Down
1 change: 1 addition & 0 deletions visualRegressionTests/tests/defaultV2/responsiveness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ frameworks.forEach(framework => {
{
"type": "matrix",
"name": "Quality",
"alternateRows": true,
"title": "Please indicate if you agree or disagree with the following statements",
"columns": ["Strongly Disagree",
"Disagree",
Expand Down

0 comments on commit f8bfc76

Please sign in to comment.