Skip to content

Commit

Permalink
Deprecation Warning: Sass @import rules (#9294)
Browse files Browse the repository at this point in the history
Co-authored-by: OlgaLarina <[email protected]>
  • Loading branch information
OlgaLarina and OlgaLarina authored Jan 12, 2025
1 parent 88aeeb7 commit 31d37e4
Show file tree
Hide file tree
Showing 63 changed files with 209 additions and 115 deletions.
2 changes: 1 addition & 1 deletion packages/survey-core/src/boolean-checkbox.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "./modern/constants.scss";
@use "./modern/constants.scss";
.sv-boolean__decorator {
border-radius: 2px;
}
Expand Down
26 changes: 13 additions & 13 deletions packages/survey-core/src/common-styles/common-styles.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
@import "./sv-actionbar.scss";
@import "./sv-drag-drop.scss";
@import "./sv-popup.scss";
@import "./sv-buttongroup.scss";
@import "./sv-visuallyhidden.scss";
@import "./sv-hidden.scss";
@import "./sv-titleactions.scss";
@import "./window.scss";
@import "./sv-brand-info.scss";
@import "./sv-ranking.scss";
@import "./sv-list.scss";
@import "./sv-save-data.scss";
@import "./sv-string-viewer.scss";
@use "./sv-actionbar.scss";
@use "./sv-drag-drop.scss";
@use "./sv-popup.scss";
@use "./sv-buttongroup.scss";
@use "./sv-visuallyhidden.scss";
@use "./sv-hidden.scss";
@use "./sv-titleactions.scss";
@use "./window.scss";
@use "./sv-brand-info.scss";
@use "./sv-ranking.scss";
@use "./sv-list.scss";
@use "./sv-save-data.scss";
@use "./sv-string-viewer.scss";
2 changes: 1 addition & 1 deletion packages/survey-core/src/common-styles/sv-actionbar.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../defaultV2-theme/variables.scss";
@use "../defaultV2-theme/variables.scss" as *;

.sv-action-bar {
display: flex;
Expand Down
2 changes: 2 additions & 0 deletions packages/survey-core/src/common-styles/sv-brand-info.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "../defaultV2-theme/variables.scss" as *;

sv-brand-info {}

sv-brand-info,
Expand Down
2 changes: 1 addition & 1 deletion packages/survey-core/src/common-styles/sv-buttongroup.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../defaultV2-theme/variables.scss";
@use "../defaultV2-theme/variables.scss" as *;

.sv-button-group {
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion packages/survey-core/src/common-styles/sv-drag-drop.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../defaultV2-theme/variables.scss";
@use "../defaultV2-theme/variables.scss" as *;

.sv-dragged-element-shortcut {
height: calcSize(3);
Expand Down
5 changes: 3 additions & 2 deletions packages/survey-core/src/common-styles/sv-list.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import "../defaultV2-theme/variables.scss";
@use "../defaultV2-theme/variables.scss" as *;
@use "../defaultV2-theme/mixins.scss" as mixins;

.sv-list {
padding: 0;
Expand Down Expand Up @@ -68,7 +69,7 @@
outline: none;

.sv-list__item-body {
@include borderLight;
@include mixins.borderLight;
border-radius: calcCornerRadius(1);
padding-block: calcSize(0.75);
padding-inline-end: calcSize(7.75);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../defaultV2-theme/variables.scss";
@use "../defaultV2-theme/variables.scss" as *;

.sv_progress-toc {
padding: calcSize(1);
Expand Down
2 changes: 1 addition & 1 deletion packages/survey-core/src/common-styles/sv-popup.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../defaultV2-theme/variables.scss";
@use "../defaultV2-theme/variables.scss" as *;

$popup-overlay-height: var(--sv-popup-overlay-height, 100vh);
$ease-out: cubic-bezier(0, 0, 0.58, 1);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../defaultV2-theme/variables.scss";
@use "../defaultV2-theme/variables.scss" as *;

.sv_progress-buttons__container-center {
text-align: center;
Expand Down
6 changes: 3 additions & 3 deletions packages/survey-core/src/common-styles/sv-ranking.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import "../defaultV2-theme/variables.scss";
@import "../defaultV2-theme/mixins.scss";
@use "../defaultV2-theme/variables.scss" as *;
@use "../defaultV2-theme/mixins.scss" as mixins;

.sv-ranking {
outline: none;
Expand Down Expand Up @@ -413,7 +413,7 @@

.sv-ranking__container-placeholder {
color: var(--sjs-font-questiondescription-color, #{$foreground-dim-light});
@include defaultFont;
@include mixins.defaultFont;
white-space: normal;
display: flex;
justify-content: center;
Expand Down
2 changes: 1 addition & 1 deletion packages/survey-core/src/common-styles/sv-save-data.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../defaultV2-theme/variables.scss";
@use "../defaultV2-theme/variables.scss" as *;

.sv-save-data_root {
position: fixed;
Expand Down
12 changes: 6 additions & 6 deletions packages/survey-core/src/common-styles/window.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import "../defaultV2-theme/variables.scss";
@import "../defaultV2-theme/mixins.scss";
@import "../defaultV2-theme/blocks/mixins.scss";
@use "../defaultV2-theme/variables.scss" as *;
@use "../defaultV2-theme/mixins.scss" as mixins;
@use "../defaultV2-theme/blocks/mixins.scss" as blocksMixins;

.sv_window {
position: fixed;
Expand All @@ -17,7 +17,7 @@
background: $background-dim;
width: calc(100% - calcSize(4)) !important;

@include scrollRules;
@include blocksMixins.scrollRules;
}

.sv_window_root-content {
Expand Down Expand Up @@ -67,7 +67,7 @@

.sv_window_header_title_collapsed {
color: $foreground-dim;
@include defaultBold;
@include mixins.defaultBold;
flex: 1;
display: flex;
justify-content: flex-start;
Expand All @@ -77,7 +77,7 @@
.sv_window_header_description {
color: $font-questiondescription-color;
font-feature-settings: 'salt' on;
@include defaultFont;
@include mixins.defaultFont;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
Expand Down
9 changes: 6 additions & 3 deletions packages/survey-core/src/defaultV2-theme/blocks/header.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
@use "../variables.scss" as *;
@use "mixins.scss" as mixins;

.sv-header {
position: relative;
background-color: $header-backcolor;
Expand Down Expand Up @@ -126,7 +129,7 @@
}

.sv-header__title .sd-title {
@include header_title;
@include mixins.header_title;
color: $font-headertitle-color;
font-family: $font-headertitle-family;
font-weight: $font-headertitle-weight;
Expand All @@ -150,7 +153,7 @@
}

.sv-header__description .sd-description {
@include header_description;
@include mixins.header_description;
color: $font-headerdescription-color;
font-family: $font-headerdescription-family;
font-weight: $font-headerdescription-weight;
Expand Down Expand Up @@ -178,7 +181,7 @@
}

.sv-header__description .sd-description {
@include header_description;
@include mixins.header_description;
color: $font-pagedescription-color;
}
}
2 changes: 2 additions & 0 deletions packages/survey-core/src/defaultV2-theme/blocks/mixins.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "../variables.scss" as *;

@mixin page_title {
--page-title-font-size: var(--sjs-font-pagetitle-size, calc(1.5 * (var(--sjs-font-size, 16px))));
font-family: $font-pagetitle-family;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "../variables.scss" as *;

.sd-action {
appearance: none;
border: none;
Expand Down
5 changes: 3 additions & 2 deletions packages/survey-core/src/defaultV2-theme/blocks/sd-body.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import "../defaultV2-theme/mixins.scss";
@use "../defaultV2-theme/variables.scss" as *;
@use "../defaultV2-theme/mixins.scss" as mixins;

.sd-body {
width: 100%;
Expand Down Expand Up @@ -114,7 +115,7 @@

.sd-body--empty,
.sd-body--loading {
@include articleHtml;
@include mixins.articleHtml;
}

.sd-root_background-image {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "../variables.scss" as *;

.sd-boolean {
display: flex;
width: max-content;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../variables.scss";
@use "../variables.scss" as *;

.sd-btn {
appearance: none;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "../variables.scss" as *;

.sd-checkbox__decorator {
border-radius: calcCornerRadius(0.5);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "../variables.scss" as *;

.sd-element--expanded,
.sd-element--collapsed {
&>.sd-element__header {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "../variables.scss" as *;

.sd-comment {
display: block;
height: auto;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import "../defaultV2-theme/mixins.scss";
@use "../defaultV2-theme/variables.scss" as *;
@use "../defaultV2-theme/mixins.scss" as mixins;

.sd-completedpage,
.sd-completed-before-page {
Expand All @@ -8,7 +9,7 @@
box-sizing: border-box;
text-align: center;
height: auto;
@include articleHtml;
@include mixins.articleHtml;
}

.sd-completedpage:before,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "../variables.scss" as *;

.sd-element--complex.sd-element--with-frame {
padding-top: 0;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "../variables.scss" as *;

.sd-context-btn {
background-color: $background;
padding: calcSize(1.5);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "../variables.scss" as *;

.sd-description {
font-style: normal;
font-family: $font-questiondescription-family;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
@use "../variables.scss" as *;
@use "../mixins.scss" as mixins;

.sv-dropdown_select-wrapper {
position: relative;
}
Expand Down Expand Up @@ -192,7 +195,7 @@

.sv-list__item.sv-list__item--focused:not(.sv-list__item--selected) {
.sv-list__item-body {
@include borderLight;
@include mixins.borderLight;
padding-inline-end: calcSize(1.75);
padding-block: calcSize(1.25);
padding-inline-start: calcSize(1.75);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
@use "../variables.scss" as *;
@use "mixins.scss" as mixins;

.sd-element {
padding-left: var(--sv-element-add-padding-left, 0px);
padding-right: var(--sv-element-add-padding-right, 0px);
Expand Down Expand Up @@ -104,7 +107,7 @@

.sd-element__title--num-inline {
.sd-element__num {
@include num_inline();
@include mixins.num_inline();
}
}

Expand Down
2 changes: 2 additions & 0 deletions packages/survey-core/src/defaultV2-theme/blocks/sd-error.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "../variables.scss" as *;

.sd-error {
display: block;
padding: calcSize(1) calcSize(1.5);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "../variables.scss" as *;

.sd-expression {
color: $font-questiontitle-color;
font-size: calcFontSize(1);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../variables.scss";
@use "../variables.scss" as *;

.sd-file {
position: relative;
Expand Down
6 changes: 4 additions & 2 deletions packages/survey-core/src/defaultV2-theme/blocks/sd-html.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
@import "../defaultV2-theme/mixins.scss";
@use "../variables.scss" as *;
@use "../mixins.scss" as mixins;

.sd-html {
white-space: initial;
}

.sd-html {
@include articleHtml;
@include mixins.articleHtml;
}

.sd-html--nested {
Expand Down
2 changes: 2 additions & 0 deletions packages/survey-core/src/defaultV2-theme/blocks/sd-image.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "../variables.scss" as *;

.sd-image__image {
display: block;
max-width: 100%;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "../variables.scss" as *;

.sd-imagepicker {
display: flex;
flex-wrap: wrap;
Expand Down
2 changes: 2 additions & 0 deletions packages/survey-core/src/defaultV2-theme/blocks/sd-input.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "../variables.scss" as *;

.sd-input {
@include useEditorFontSize;
-webkit-appearance: none;
Expand Down
2 changes: 2 additions & 0 deletions packages/survey-core/src/defaultV2-theme/blocks/sd-item.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "../variables.scss" as *;

.sd-item {
display: flex;
padding: calcSize(1.5) 0;
Expand Down
2 changes: 2 additions & 0 deletions packages/survey-core/src/defaultV2-theme/blocks/sd-list.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "../variables.scss" as *;

.sd-list {
padding-right: calcSize(0.5);
padding-left: calcSize(0.5);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "../variables.scss" as *;

@keyframes rotationAnimation {
from {
rotate: 0deg;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "../variables.scss" as *;

.sd-matrix {
fieldset {
border: none;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "../variables.scss" as *;

.sd-matrixdynamic__btn.sd-matrixdynamic__add-btn {
position: sticky;
left: calcSize(-3);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../variables.scss";
@use "../variables.scss" as *;

.sd-multipletext {
width: 100%;
Expand Down
Loading

0 comments on commit 31d37e4

Please sign in to comment.