fix: disable fullscreen table token animation
This commit is contained in:
@@ -354,6 +354,13 @@ input:focus-visible {
|
||||
--sd-easing: cubic-bezier(0.16, 1, 0.3, 1);
|
||||
}
|
||||
|
||||
[data-streamdown="table-fullscreen"] [data-sd-animate] {
|
||||
animation: none;
|
||||
filter: none;
|
||||
opacity: 1;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.agent-chart-line {
|
||||
animation: agent-chart-line-in 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
|
||||
transform-origin: center;
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import { readFileSync } from "node:fs";
|
||||
import { join } from "node:path";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
describe("Streamdown fullscreen table", () => {
|
||||
it("disables inherited token animations only inside the fullscreen copy", () => {
|
||||
const styles = readFileSync(join(process.cwd(), "app/globals.css"), "utf8");
|
||||
|
||||
expect(styles).toMatch(
|
||||
/\[data-streamdown="table-fullscreen"\] \[data-sd-animate\] \{\s*animation: none;\s*filter: none;\s*opacity: 1;\s*transform: none;\s*\}/
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user