Phones: the engine's credit on one line, in smaller type

At the top of a phone map the credit shares the edge with the map's control
column, and at 10px it took two lines. It is now 8.5px, capped 44px short of
the column (35px wide at 390), which fits the whole MapLibre licence text on one
line (294px against about 302px of room, measured at 390). It still wraps rather
than clips, so a longer credit shows whole on two lines instead of losing terms.
This commit is contained in:
Doxa Maps 2026-09-30 07:20:49 +00:00
parent 9b9466c23f
commit 35486223bb

View file

@ -76,11 +76,14 @@ useShadowStyles(`
plain rule of the same specificity (a translateY on the corner container), and up here that lift would
push the credit off the top of the map. The corners are not at the bottom on a phone any more. */
@media (max-width:767.98px){
.mapboxgl-ctrl-bottom-left,.mapboxgl-ctrl-bottom-right,.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right{top:0 !important;bottom:auto !important;inset-inline-start:0 !important;inset-inline-end:auto !important;transform:none !important;justify-content:flex-start;max-width:calc(100% - 56px);}
/* Up here the credit shares the top edge with the map's control column (the end side): capped short of
it, in smaller type so the expanded credit stays two lines at most on a phone (measured at 390: at the
engine's own size it spanned 382px and ran under the column). Still legible; the licence text is whole. */
.maplibregl-ctrl-attrib-inner,.mapboxgl-ctrl-attrib-inner{font-size:10px;line-height:14px;}
.mapboxgl-ctrl-bottom-left,.mapboxgl-ctrl-bottom-right,.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right{top:0 !important;bottom:auto !important;inset-inline-start:0 !important;inset-inline-end:auto !important;transform:none !important;justify-content:flex-start;max-width:calc(100% - 44px);}
/* ONE LINE (mobile pass 2026-09-30, S8). Up here the credit shares the top edge with the map's control
column (the end side, 35px at 390), so it is capped short of it, in type small enough that the whole
licence text fits ONE line in the room left beside the column: measured at 390, the MapLibre credit
is 346px on one line at 10px, 312px at 9px and 294px at 8.5px, against about 302px of room (the box
keeps 36px of padding for its (i) toggle). It still wraps rather than clips, so a longer credit
(another style, another engine) shows whole on two lines instead of losing its terms. */
.maplibregl-ctrl-attrib-inner,.mapboxgl-ctrl-attrib-inner{font-size:8.5px;line-height:12px;}
.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl,.mapboxgl-ctrl-bottom-right .mapboxgl-ctrl,.maplibregl-ctrl-bottom-left .maplibregl-ctrl,.maplibregl-ctrl-bottom-right .maplibregl-ctrl{margin:8px 0 0;margin-inline:8px 0;}
}
/* In the sheet the legend's rows fill the full width: the clear "x" column does not reserve