Skip to content

Commit

Permalink
#7011 Weird symbols in question titles (#7012)
Browse files Browse the repository at this point in the history
* #7011 Weird symbols in question titles
Fixes #7011

* Weird symbols in question titles #7011
  • Loading branch information
novikov82 committed Sep 25, 2023
1 parent ed99e06 commit be39f89
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/defaultCss/defaultV2Css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ export var defaultV2Css = {
titleNumInline: "sd-element__title--num-inline",
titleLeftRoot: "sd-question--left",
titleOnAnswer: "sd-question__title--answer",
titleEmpty: "sd-question__title--empty",
titleOnError: "sd-question__title--error",
title: "sd-title sd-element__title sd-question__title",
titleExpandable: "sd-element__title--expandable",
Expand Down
4 changes: 0 additions & 4 deletions src/defaultV2-theme/blocks/sd-element.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@

.sv-string-viewer {
white-space: normal;

&::before {
content: "\200B";
}
}
}

Expand Down
6 changes: 6 additions & 0 deletions src/defaultV2-theme/blocks/sd-question.scss
Original file line number Diff line number Diff line change
Expand Up @@ -184,4 +184,10 @@
width: max-content;
overflow: visible;
max-width: 100%;
}
.sd-question__title--empty {
.sv-string-viewer {
display: inline-block;
height: calcSize(3);
}
}
1 change: 1 addition & 0 deletions src/question.ts
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,7 @@ export class Question extends SurveyElement<Question>
return new CssClassBuilder()
.append(super.getCssTitle(cssClasses))
.append(cssClasses.titleOnAnswer, !this.containsErrors && this.isAnswered)
.append(cssClasses.titleEmpty, !this.title.trim())
.toString();
}
public get cssDescription(): string {
Expand Down

0 comments on commit be39f89

Please sign in to comment.