srcdev-nuxt-components 2.1.19 → 2.1.20

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.
@@ -23,7 +23,8 @@ watch(
23
23
  </script>
24
24
 
25
25
  <style lang="css">
26
- @keyframes textAnimation {
26
+
27
+ @keyframes animatedSvgText {
27
28
  0% {
28
29
  fill: transparent;
29
30
  stroke-dashoffset: var(--_animated-svg-text-stroke-dasharray);
@@ -34,39 +35,53 @@ watch(
34
35
  stroke-width: 0.3;
35
36
  }
36
37
  100% {
37
- fill: var(--_animated-svg-fill-color, var(--_animated-svg-text-fill-light));
38
+ fill: var(--_animated-svg-fill-color);
38
39
  stroke-dashoffset: 0;
39
40
  stroke-width: 0;
40
41
  }
41
42
  }
42
- .animated-svg-text {
43
- svg path {
44
- stroke: var(--_animated-svg-text-color, var(--_animated-svg-text-stroke-light));
45
- stroke-width: 0.3;
46
- stroke-dasharray: var(--_animated-svg-text-stroke-dasharray);
47
- stroke-dashoffset: var(--_animated-svg-text-stroke-dasharray);
48
- animation: textAnimation var(--_animated-svg-animation-duration) linear 1 forwards;
49
- }
50
43
 
51
- @media (prefers-color-scheme: light) {
52
- --_animated-svg-text-color: var(--_animated-svg-text-stroke-light);
53
- --_animated-svg-fill-color: var(--_animated-svg-text-fill-light);
44
+ html {
45
+
46
+ &[data-color-scheme='light'] {
47
+ .animated-svg-text {
48
+ --_animated-svg-text-color: var(--_animated-svg-text-stroke-light);
49
+ --_animated-svg-fill-color: var(--_animated-svg-text-fill-light);
50
+ }
51
+ }
52
+ &[data-color-scheme='dark'] {
53
+ .animated-svg-text {
54
+ --_animated-svg-text-color: var(--_animated-svg-text-stroke-dark);
55
+ --_animated-svg-fill-color: var(--_animated-svg-text-fill-dark);
56
+ }
54
57
  }
58
+ &[data-color-scheme='auto'] {
59
+ .animated-svg-text {
60
+ @media (prefers-color-scheme: light) {
61
+ --_animated-svg-text-color: var(--_animated-svg-text-stroke-light);
62
+ --_animated-svg-fill-color: var(--_animated-svg-text-fill-light);
63
+ }
55
64
 
56
- @media (prefers-color-scheme: dark) {
57
- --_animated-svg-text-color: var(--_animated-svg-text-stroke-dark);
58
- --_animated-svg-fill-color: var(--_animated-svg-text-fill-dark);
65
+ @media (prefers-color-scheme: dark) {
66
+ --_animated-svg-text-color: var(--_animated-svg-text-stroke-dark);
67
+ --_animated-svg-fill-color: var(--_animated-svg-text-fill-dark);
68
+ }
69
+ }
59
70
  }
60
- }
61
71
 
62
- /* html {
63
- &[data-color-scheme='light'] {
64
- --_animated-svg-text-color: var(--_animated-svg-text-stroke-light);
72
+ .animated-svg-text {
73
+
74
+ --_animated-svg-text-color: var(--_animated-svg-text-stroke-light):
65
75
  --_animated-svg-fill-color: var(--_animated-svg-text-fill-light);
76
+
77
+ svg path {
78
+ stroke: var(--_animated-svg-text-color);
79
+ stroke-width: 0.3;
80
+ stroke-dasharray: var(--_animated-svg-text-stroke-dasharray);
81
+ stroke-dashoffset: var(--_animated-svg-text-stroke-dasharray);
82
+ animation: animatedSvgText var(--_animated-svg-animation-duration) linear 1 forwards;
83
+ }
66
84
  }
67
- &[data-color-scheme='dark'] {
68
- --_animated-svg-text-color: var(--_animated-svg-text-stroke-dark);
69
- --_animated-svg-fill-color: var(--_animated-svg-text-fill-dark);
70
- }
71
- } */
85
+
86
+ }
72
87
  </style>
package/nuxt.config.ts CHANGED
@@ -7,6 +7,7 @@ export default defineNuxtConfig({
7
7
  head: {
8
8
  htmlAttrs: {
9
9
  lang: 'en',
10
+ 'data-color-scheme': 'auto',
10
11
  },
11
12
  titleTemplate: '%s - Nuxt Components Layer',
12
13
  meta: [{ charset: 'utf-8' }, { name: 'viewport', content: 'width=device-width, initial-scale=1' }],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "srcdev-nuxt-components",
3
3
  "type": "module",
4
- "version": "2.1.19",
4
+ "version": "2.1.20",
5
5
  "main": "nuxt.config.ts",
6
6
  "scripts": {
7
7
  "clean": "rm -rf .nuxt && rm -rf .output && rm -rf .playground/.nuxt && rm -rf .playground/.output",