@alauda/ui 6.3.1-beta.0 → 6.3.1-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alauda/ui",
3
- "version": "6.3.1-beta.0",
3
+ "version": "6.3.1-beta.3",
4
4
  "description": "Angular UI components by Alauda Frontend Team.",
5
5
  "repository": "git+https://github.com/alauda/alauda-ui.git",
6
6
  "author": "Alauda Frontend",
package/theme/_mixin.scss CHANGED
@@ -1,31 +1,39 @@
1
1
  @import 'base-var';
2
2
  @import 'var';
3
3
 
4
+ @function theme-selector($theme, $scope) {
5
+ @if ($scope) {
6
+ @return selector-nest($theme, $scope);
7
+ } @else {
8
+ @return $theme;
9
+ }
10
+ }
11
+
4
12
  @mixin theme-light {
5
- $host: &;
13
+ $scope: &;
6
14
 
7
15
  @at-root {
8
- :root #{$host} {
16
+ #{theme-selector(':root', $scope)} {
9
17
  @content;
10
18
  }
11
19
 
12
- html[aui-theme-mode='light'] #{$host} {
20
+ #{theme-selector('html[aui-theme-mode=light]', $scope)} {
13
21
  @content;
14
22
  }
15
23
  }
16
24
  }
17
25
 
18
26
  @mixin theme-dark {
19
- $host: &;
27
+ $scope: &;
20
28
 
21
29
  @at-root {
22
30
  @media (prefers-color-scheme: dark) {
23
- html[aui-theme-mode='system'] #{$host} {
31
+ #{theme-selector('html[aui-theme-mode=system]', $scope)} {
24
32
  @content;
25
33
  }
26
34
  }
27
35
 
28
- html[aui-theme-mode='dark'] #{$host} {
36
+ #{theme-selector('html[aui-theme-mode=dark]', $scope)} {
29
37
  @content;
30
38
  }
31
39
  }
@@ -103,6 +111,7 @@
103
111
  width: 4px;
104
112
  height: 4px;
105
113
  }
114
+
106
115
  &::-webkit-scrollbar-thumb {
107
116
  background-color: $color;
108
117
  }