fix(zoom): use transform:scale instead of CSS zoom to kill map tile seams
CSS `zoom` re-lays-out and pixel-rounds each element, which opened ~1px seams between map tiles (a faint grid over the map when zoomed). Switch the persistent UI zoom to `transform: scale(z)` from the app root's top-left, with the root counter-sized to (100/z)vw × (100/z)vh so it reflows to fill and scales back to the window. transform scales the subtree as one composited layer, so tiles stay seamless. Removed the now-unneeded tile-overlap CSS hack.
This commit is contained in:
@@ -652,13 +652,3 @@
|
||||
border: 2px solid var(--background);
|
||||
}
|
||||
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }
|
||||
|
||||
/* When the UI is CSS-zoomed (our persistent Ctrl+wheel zoom), map tiles are
|
||||
scaled by a fractional factor, which opens ~1px seams between adjacent tiles
|
||||
(visible as a faint grid over the map). Enlarging each 256px tile by 1px makes
|
||||
neighbours overlap just enough to hide the seams. Scoped to the zoomed state so
|
||||
it never touches the crisp 100% view. */
|
||||
html[data-uizoom]:not([data-uizoom="1"]) .leaflet-tile {
|
||||
width: 257px !important;
|
||||
height: 257px !important;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user