From 685f5fd4f511d25ff0f9ff2afdcd0c0a5e5cfd51 Mon Sep 17 00:00:00 2001 From: fengtianze Date: Thu, 24 Feb 2022 11:40:05 +0800 Subject: [PATCH 1/2] fix: theme mixins --- src/theme/_mixin.scss | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/theme/_mixin.scss b/src/theme/_mixin.scss index 809981445..cbd80760d 100644 --- a/src/theme/_mixin.scss +++ b/src/theme/_mixin.scss @@ -1,31 +1,39 @@ @import 'base-var'; @import 'var'; +@function theme-selector($theme, $scope) { + @if ($scope) { + @return selector-nest($theme, $scope); + } @else { + @return $theme; + } +} + @mixin theme-light { - $host: &; + $scope: &; @at-root { - :root #{$host} { + #{theme-selector(':root', $scope)} { @content; } - html[aui-theme-mode='light'] #{$host} { + #{theme-selector('html[aui-theme-mode=light]', $scope)} { @content; } } } @mixin theme-dark { - $host: &; + $scope: &; @at-root { @media (prefers-color-scheme: dark) { - html[aui-theme-mode='system'] #{$host} { + #{theme-selector('html[aui-theme-mode=system]', $scope)} { @content; } } - html[aui-theme-mode='dark'] #{$host} { + #{theme-selector('html[aui-theme-mode=dark]', $scope)} { @content; } } @@ -103,6 +111,7 @@ width: 4px; height: 4px; } + &::-webkit-scrollbar-thumb { background-color: $color; } From 03251c1d918f2971e52910b899914dde6fe67f4c Mon Sep 17 00:00:00 2001 From: Tianze Feng Date: Thu, 24 Feb 2022 13:03:04 +0800 Subject: [PATCH 2/2] Create fifty-knives-raise.md --- .changeset/fifty-knives-raise.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .changeset/fifty-knives-raise.md diff --git a/.changeset/fifty-knives-raise.md b/.changeset/fifty-knives-raise.md new file mode 100644 index 000000000..a8de15e35 --- /dev/null +++ b/.changeset/fifty-knives-raise.md @@ -0,0 +1,7 @@ +--- +"@alauda/ui": patch +--- + +fix: theme mixins + +fix: color of tab active indicator