Skip to content

Commit

Permalink
换成更改 --av-background 试试,大量减少 css
Browse files Browse the repository at this point in the history
  • Loading branch information
TCOTC committed Oct 4, 2024
1 parent 88393b5 commit 4b19542
Showing 1 changed file with 12 additions and 49 deletions.
61 changes: 12 additions & 49 deletions app/src/assets/scss/business/_av.scss
Original file line number Diff line number Diff line change
Expand Up @@ -556,31 +556,13 @@
$bg-variable: if($count == 1, "--b3-#{$key}", "--b3-#{$key}#{$i}");
$bg-select-variable: if($count == 1, "--b3-#{$key}-select", "--b3-#{$key}#{$i}-select");

[data-node-id][style*="background-color: var(#{$bg-variable})"] {
.av__row--header,
.av__row--footer,
.av__row--footer .av__colsticky,
.av__row--select .av__cell,
.av__colsticky.av__firstcol,
.av__colsticky > div,
.av__cell--select,
.av__cell--active,
.av__counter {
background-color: var(#{$bg-select-variable}) !important;
}
[data-node-id][style*="background-color: var(#{$bg-variable})"] .av__container {
// 删除给 .av__container 添加(更新) style="--av-background:var(xxx)" 的逻辑之后就可以删除这里的 !important
--av-background: var(#{$bg-select-variable}) !important;
}
&[data-node-id][style*="background-color: var(#{$bg-variable})"] {
.av__row--header,
.av__row--footer,
.av__row--footer .av__colsticky,
.av__row--select .av__cell,
.av__colsticky.av__firstcol,
.av__colsticky > div,
.av__cell--select,
.av__cell--active,
.av__counter {
background-color: var(#{$bg-select-variable}) !important;
}
&[data-node-id][style*="background-color: var(#{$bg-variable})"] .av__container {
// 删除给 .av__container 添加(更新) style="--av-background:var(xxx)" 的逻辑之后就可以删除这里的 !important
--av-background: var(#{$bg-select-variable}) !important;
}
}
}
Expand Down Expand Up @@ -616,32 +598,13 @@
$bg-variable: if($count == 1, "--b3-#{$key}", "--b3-#{$key}#{$i}");
$bg-select-variable: if($count == 1, "--b3-#{$key}-select", "--b3-#{$key}#{$i}-select");

[data-node-id][style*="background-color: var(#{$bg-variable})"] {
.av__row--header,
.av__row--footer,
.av__row--footer .av__colsticky,
.av__row--select .av__cell,
.av__colsticky.av__firstcol,
.av__colsticky > div,
.av__cell--select,
.av__cell--active,
.av__counter {
transition: var(--b3-background-transition);
background-color: var(#{$bg-select-variable}) !important;
}
[data-node-id][style*="background-color: var(#{$bg-variable})"] .av__container {
// 删除给 .av__container 添加(更新) style="--av-background:var(xxx)" 的逻辑之后就可以删除这里的 !important
--av-background: var(#{$bg-select-variable}) !important;
}
&[data-node-id][style*="background-color: var(#{$bg-variable})"] {
.av__row--header,
.av__row--footer,
.av__row--footer .av__colsticky,
.av__row--select .av__cell,
.av__colsticky.av__firstcol,
.av__colsticky > div,
.av__cell--select,
.av__cell--active,
.av__counter {
background-color: var(#{$bg-select-variable}) !important;
}
&[data-node-id][style*="background-color: var(#{$bg-variable})"] .av__container {
// 删除给 .av__container 添加(更新) style="--av-background:var(xxx)" 的逻辑之后就可以删除这里的 !important
--av-background: var(#{$bg-select-variable}) !important;
}
}
}
Expand Down

0 comments on commit 4b19542

Please sign in to comment.