// Previously, we used left: 100% but this caused weird behaviour where the elements would
// get "cropped" on their right side, causing them to not come far enough back into view
// when doing translateX(-100%). It only affected the wider elements in the group.
- left: 0
- // To achieve the same result as left: 100% without side-effects, we translateX 100vw:
- transform: translateX(100vw)
+ right: 0
+ // To achieve the same result as left: 100% without side-effects, we have to position the
+ // element at right: 0 and then do a translateX 100% on the element to get it off the screen.
+ // The reason for this extra convoluted positioning is that if we do translateX(100vw), the
+ // content will be placed *under* the scrollbars (with left: 100%, it respected the scrollbars)
+ transform: translateX(100%)
font-size: 1.5rem // 24px, controls sizing of other elements
+below(1024px)
top: 0;
left: 0;
height: 100%;
- width: 100%;
+ /* Using a width of 100vw instead of 100% ensures that grid isn't affected by scrollbars
+ (ie. it will extend under the scrollbars instead of scaling slightly when scrollbars are present) */
+ width: 100vw;
z-index: 9990;
}
}
}
+ {{-- In the end, this isn't needed (see above) but I'll keep it here as an example of custom scrollbars --}}
+ {{--
/* Make sure scrollbars don't cause misalignment of grid */
/* Ref: https://dev.to/jonosellier/easy-overlay-scrollbars-variable-width-1mbh */
*::-webkit-scrollbar {
border: 0px solid transparent;
box-shadow: none;
}
+ --}}
</style>
+{{--
<script>
// Hide scrollbar when no longer actively scrolling
var scrollbarTimeout;
document.body.classList.add('scrolling');
}
</script>
+--}}
<div id="debugGrid"></div>