File tree Expand file tree Collapse file tree 2 files changed +27
-4
lines changed
assets/toolkit/styles/vendor
patterns/components/cms-content Expand file tree Collapse file tree 2 files changed +27
-4
lines changed Original file line number Diff line number Diff line change 16
16
}
17
17
18
18
.token .property ,
19
- .token .keyword {
19
+ .token .keyword ,
20
+ .token .interpolation-punctuation {
20
21
color : color-mod (var (--color-blue ) h (-15 ) s (+50% ) l (+20% ));
21
22
}
22
23
23
24
.token .constant ,
24
25
.token .attr-value ,
25
26
.token .selector ,
26
- .token .class-name {
27
- color : color-mod (var (--color-green ) l (+17% ));
27
+ .token .class-name ,
28
+ : matches (.language-js , .language-javascript ) .token .string {
29
+ color : color-mod (var (--color-green ) l (+25% ) s (-20% ));
28
30
}
29
31
30
32
.token .rule ,
Original file line number Diff line number Diff line change @@ -58,5 +58,26 @@ repos = indexedRepos.sort((a, b) => {
58
58
return a.index < b.index ? -1 : 1;
59
59
}
60
60
return a.language < b.language ? -1 : 1;
61
- });</code ></pre >
61
+ });
62
+
63
+ // Set up a resolved promise for our loop
64
+ let step = Promise.resolve();
65
+
66
+ // For every frame we need to generate…
67
+ for (let i = 0; i < = frames; i++) {
68
+ let position = duration / frames * i;
69
+ let filename = `whut-${filePrefix}${i}${fileScale}${fileExtension}`;
70
+ // Begin this step when the previous finishes
71
+ step = step.then(() => {
72
+ timeline.pause(position);
73
+ return svgAsPngUri(document.getElementById("amoeba"), { scale }).then(
74
+ uri => {
75
+ // Convert data URI to plain base64
76
+ let imgDataIndex = uri.indexOf("base64,") + "base64,".length;
77
+ let imgData = uri.substr(imgDataIndex);
78
+ zip.file(filename, imgData, { base64: true });
79
+ }
80
+ );
81
+ });
82
+ }</code ></pre >
62
83
</article >
You can’t perform that action at this time.
0 commit comments