mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-12 16:52:50 +00:00
make background map tile edges opaque
Replaces the workaround of the tile rendering issues on Chrome at odd zoom levels. The svg filter `#alpha-slope5` alters the alpha channel of background tiles such that everything but (almost) transparent pixels are rendered fully opaque. closes #10747
This commit is contained in:
@@ -4373,26 +4373,15 @@ img.tile {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Workaround to remove visible grid around tile borders on Chrome
|
||||
Only works with browser zoom multiple of 25 (75%, 100%, 125%...)
|
||||
Should be removed when https://issues.chromium.org/issues/40084005 is resolved.
|
||||
See https://github.com/openstreetmap/iD/pull/10594 */
|
||||
@media (-webkit-device-pixel-ratio = 1) or (-webkit-device-pixel-ratio = 1.25) or (-webkit-device-pixel-ratio = 1.5) or (-webkit-device-pixel-ratio = 1.75)
|
||||
or (-webkit-device-pixel-ratio = 2) or (-webkit-device-pixel-ratio = 2.25) or (-webkit-device-pixel-ratio = 2.5) or (-webkit-device-pixel-ratio = 2.75)
|
||||
or (-webkit-device-pixel-ratio = 3) or (-webkit-device-pixel-ratio = 3.25) or (-webkit-device-pixel-ratio = 3.5) or (-webkit-device-pixel-ratio = 3.75)
|
||||
or (-webkit-device-pixel-ratio = 4) or (-webkit-device-pixel-ratio = 4.25) or (-webkit-device-pixel-ratio = 4.5) or (-webkit-device-pixel-ratio = 4.75)
|
||||
or (-webkit-device-pixel-ratio = 5) or (-webkit-device-pixel-ratio = 0.25) or (-webkit-device-pixel-ratio = 0.5) or (-webkit-device-pixel-ratio = 0.75) {
|
||||
.layer-background img.tile,
|
||||
.map-in-map-background img.tile {
|
||||
mix-blend-mode: plus-lighter;
|
||||
}
|
||||
.layer-background img.tile,
|
||||
.map-in-map-background img.tile {
|
||||
filter: url(#alpha-slope5);
|
||||
}
|
||||
|
||||
.layer-background img.tile-removing,
|
||||
.map-in-map-background img.tile-removing {
|
||||
opacity: 0;
|
||||
z-index: 1;
|
||||
mix-blend-mode: normal;
|
||||
}
|
||||
|
||||
.tile-label-debug {
|
||||
|
||||
Reference in New Issue
Block a user