fix alpha overlap during scrolled code highlight transitions

This commit is contained in:
Hakim El Hattab committed 2023-09-12 10:35:37 +02:00
1 parent c5307462b0
commit 487cc860f8
5 files changed
+10 -4

No files matched your search

+2
View File
@@ -194,6 +194,8 @@ const Plugin = {
var startTop = block.scrollTop;
var targetTop = highlightBounds.top + ( Math.min( highlightBounds.bottom - highlightBounds.top, viewportHeight ) - viewportHeight ) / 2;
console.log(startTop, targetTop)
// Account for offsets in position applied to the
// <table> that holds our lines of code
var lineTable = block.querySelector( '.hljs-ln' );