additional scaling changes

This commit is contained in:
Reece 2025-07-03 11:15:40 +01:00
parent 037e4da5c6
commit a3962a74c3
2 changed files with 9 additions and 5 deletions

View File

@ -479,9 +479,8 @@ html[dir="rtl"] .dropdown-menu[data-bs-popper] {
display: flex;
gap: 30px;
justify-content: center;
width: 140%;
width: 100%;
position: relative;
left: -20%;
}
.feature-group {

View File

@ -24,12 +24,17 @@
<script>
window.stirlingPDF = window.stirlingPDF || {};
const systemDPR = Math.round(window.devicePixelRatio) || 1;
function scaleNav() {
const currentDPR = window.devicePixelRatio || 1;
const browserZoom = currentDPR / systemDPR;
// Always counter the scaling
const navScale = 1 / currentDPR;
const dropdownScale = 1 / Math.sqrt(currentDPR);
// Counter-scale to maintain same visual size
const navScale = 1.1 / currentDPR;
// Dropdowns are children of navbar, so they inherit the navbar scaling
// We need to counter both the browser scaling AND the navbar scaling
const dropdownScale = 1.1;
console.log('DPR:', currentDPR, 'navScale:', navScale, 'will apply scaling');