Skip to content

Commit

Permalink
Themes issues (#6630)
Browse files Browse the repository at this point in the history
* A special state in light mode for navigatin buttons surveyjs/private-tasks#246 (comment)

* fix question description forecolor

---------

Co-authored-by: OlgaLarina <olga.larina.dev@gmail.com>
  • Loading branch information
OlgaLarina and OlgaLarina committed Aug 2, 2023
1 parent 216ba95 commit 1bdc734
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/defaultCss/defaultV2Css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export var defaultV2Css = {
root: "sd-root-modern",
rootMobile: "sd-root-modern--mobile",
rootReadOnly: "sd-root--readonly",
rootCompact: "sd-root--compact",
rootBackgroundImage: "sd-root_background-image",
container: "sd-container-modern",
header: "sd-title sd-container-modern__title",
Expand Down
10 changes: 10 additions & 0 deletions src/defaultV2-theme/blocks/sd-navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
padding: calcSize(2) calcSize(8);
}
}

.sd-root--compact .sd-body__navigation {
.sd-btn:not(.sd-btn--action) {
background-color: $background-dim-light;
}
.sd-btn:not(.sd-btn--action):hover {
background-color: $background-dim-dark;
}
}

.sd-root-modern--mobile .sd-body__navigation {
.sv-action:not(.sv-action--hidden),
.sd-btn {
Expand Down
2 changes: 1 addition & 1 deletion src/defaultV2-theme/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ $font-questiondescription-family: var(--sjs-font-questiondescription-family, var
$font-questiondescription-weight: var(--sjs-font-questiondescription-weight, 400);
$font-questiondescription-color: var(
--sjs-font-questiondescription-color,
var(--sjs-general-dim-forecolor-light, rgba(0, 0, 0, 0.45))
var(--sjs-general-forecolor-light, rgba(0, 0, 0, 0.45))
);
$font-questiondescription-size: var(--sjs-font-questiondescription-size, calc(1 * var(--sjs-font-size, $font-size)));

Expand Down
2 changes: 2 additions & 0 deletions src/survey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2524,6 +2524,7 @@ export class SurveyModel extends SurveyElementCore
for (var i = 0; i < pages.length; i++) {
pages[i].updateElementCss(reNew);
}
this.updateCss();
}
/**
* Gets or sets the error message position.
Expand Down Expand Up @@ -4473,6 +4474,7 @@ export class SurveyModel extends SurveyElementCore
.append(this.css.root)
.append(this.css.rootMobile, this.isMobile)
.append(this.css.rootReadOnly, this.mode === "display")
.append(this.css.rootCompact, this.isCompact)
.toString();
}
private resizeObserver: ResizeObserver;
Expand Down

0 comments on commit 1bdc734

Please sign in to comment.