Refactor styles to match new CSS nesting behavior

This commit refactors SCSS to resolve deprecation warnings related to
mixed declaration after nested rules.

Sass is changing how it processes declarations that appear after nested
rules to align with CSS standards. Previously, Sass would hoist
declarations to avoid duplicating selectors, However, this behavior will
soon change to make declarations apply in the order they appear, as per
CSS standards.
This commit is contained in:
undergroundwires
2024-07-20 11:56:31 +02:00
parent dd7239b8c1
commit abe03cef3f
10 changed files with 43 additions and 28 deletions

View File

@@ -78,15 +78,17 @@ function getOptionalDevToolkitComponent(): Component | undefined {
margin-right: auto;
margin-left: auto;
max-width: 1600px;
.app__wrapper {
display:flex;
flex-direction: column;
background-color: $color-surface;
color: $color-on-surface;
box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.06);
@include responsive-spacing;
display:flex;
flex-direction: column;
.app__row {
margin-bottom: $spacing-absolute-large;
}

View File

@@ -79,12 +79,12 @@ export default defineComponent({
box-shadow: 0 3px 9px $color-primary-darkest;
border-radius: 4px;
@include clickable;
.button__icon {
font-size: $font-size-absolute-x-large;
}
@include clickable;
@include hover-or-touch {
background: $color-surface;
box-shadow: 0px 2px 10px 5px $color-secondary;

View File

@@ -110,8 +110,9 @@ export default defineComponent({
@include apply-icon-color($color-danger);
}
.recommendation {
align-items: center;
@include horizontal-stack;
@include apply-icon-color($color-caution);
align-items: center;
}
</style>

View File

@@ -68,9 +68,11 @@ export default defineComponent({
@include horizontal-stack;
@include apply-icon-color($color-caution);
}
.description {
align-items: center;
@include horizontal-stack;
@include apply-icon-color($color-success);
align-items: center;
}
</style>

View File

@@ -58,8 +58,19 @@ $color-hover : $color-primary;
$cursor : v-bind(cursorCssValue);
.handle {
cursor: $cursor;
@include reset-button;
display: flex;
flex-direction: column;
align-items: center;
margin-right: $spacing-absolute-small;
margin-left: $spacing-absolute-small;
@include clickable($cursor: $cursor);
@include hover-or-touch {
.line {
background: $color-hover;
@@ -68,11 +79,7 @@ $cursor : v-bind(cursorCssValue);
color: $color-hover;
}
}
cursor: $cursor;
display: flex;
flex-direction: column;
align-items: center;
.line {
flex: 1;
background: $color;
@@ -81,7 +88,5 @@ $cursor : v-bind(cursorCssValue);
.icon {
color: $color;
}
margin-right: $spacing-absolute-small;
margin-left: $spacing-absolute-small;
}
</style>

View File

@@ -78,17 +78,20 @@ export default defineComponent({
}
}
.docs {
color: $color-on-primary;
background: $color-primary-darkest;
margin-left: $spacing-absolute-small;
margin-top: $spacing-relative-x-small;
color: $color-on-primary;
text-transform: none;
padding: $spacing-absolute-medium;
text-transform: none;
cursor: auto;
user-select: text;
&-collapsed {
display: none;
}
cursor: auto;
user-select: text;
}
}
</style>

View File

@@ -133,14 +133,14 @@ export default defineComponent({
.expansible-node {
display: flex;
flex-direction: row;
align-items: center;
.leaf-node {
flex: 1; // Expands the node horizontally, allowing its content to utilize full width for child item alignment, such as icons and text.
overflow: auto; // Prevents horizontal expansion of inner content (e.g., when a code block is shown)
}
flex-direction: row;
align-items: center;
.expand-collapse-caret {
$caret-size: 24px;
$padding-right: $spacing-absolute-small;

View File

@@ -220,9 +220,6 @@ $color-tooltip-background: $color-primary-darkest;
}
.tooltip__overlay {
@include set-visibility(false);
@include fixed-fullscreen;
/*
The z-index is set for both visible and invisible states to ensure it maintains its stacking order
above other elements during transitions. This approach prevents the tooltip from falling behind other
@@ -235,6 +232,9 @@ $color-tooltip-background: $color-primary-darkest;
This prevents unintentional layout issues or overflow.
*/
white-space: normal;
@include set-visibility(false);
@include fixed-fullscreen;
}
.tooltip__trigger {

View File

@@ -116,6 +116,8 @@ export default defineComponent({
}
&__section {
display: flex;
flex-wrap: wrap;
@media screen and (max-width: $media-screen-big-width) {
justify-content: space-around;
width: 100%;
@@ -124,7 +126,7 @@ export default defineComponent({
margin-top: $spacing-relative-small;
}
}
flex-wrap: wrap;
&__item:not(:first-child) {
&::before {
content: "|";