feat: enhance font styling in Diff Viewer and Streamdown components

This commit is contained in:
Bohdan Triapitsyn
2025-12-16 13:26:03 +02:00
parent c87815a2a6
commit 764a48018f
3 changed files with 18 additions and 0 deletions
@@ -19,12 +19,23 @@ interface PierreDiffViewerProps {
// CSS injected into Pierre's Shadow DOM for WebKit scroll optimization
// Note: avoid will-change and contain:paint as they break resize behavior
const WEBKIT_SCROLL_FIX_CSS = `
:host {
font-family: var(--font-mono);
font-size: var(--text-code);
}
:host, pre, [data-diffs], [data-code] {
transform: translateZ(0);
-webkit-transform: translateZ(0);
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
pre, [data-code] {
font-family: var(--font-mono);
font-size: var(--text-code);
}
[data-code] {
-webkit-overflow-scrolling: touch;
}