A profile with no print rules is not neutral in print, it is unspecified

DRV1650-SR-POSTER-EXPORT, the second half: clicking print "breaks the CSS" and the map
controls + legend jump upward.

.rm-map-area is flex:1 1 0 — it has no height of its own, it fills a viewport-height
ancestor. Print layout has no viewport height, so the box collapses toward its content
height, and the toolbar and legend, which are position:absolute against it, move UP with
its top edge. Nothing in the research-map render path declares an @media print rule at
all, so the browser's DEFAULT print stylesheet is what lays the page out — which is the
whole mechanism. Not having print rules is not the same as being unaffected by printing.

A definite height in print restores the anchor. This changes nothing about what the
POSTER prints: that is a separate document in its own frame (printInPlace), and it is
already correct. This stops the LIVE page deforming while the dialog is over it.

NEEDS EYES, and I want the limit stated rather than implied. I can show from the source
that the box has no height in print and that everything positioned against it must follow
its top edge. What I cannot see headlessly is whether the browser lays the HOST out for
print at all when the dialog belongs to an iframe — engines differ. If rega opens
Export → poster on Simple Research and the controls no longer move, the mechanism was
this. If they still move, the cause is in the frame or the focus call, and I want to know
before this is called done.
This commit is contained in:
Doxa Maps 2026-09-28 17:27:34 +00:00
parent e4b4768df8
commit 84fa2ba3a4

View file

@ -415,6 +415,20 @@ useShadowStyles(`
transforms and the map renders grey, so the rounding stops one level above it. */
.rm-map-area { clip-path: inset(0 round var(--map-radius-corners, var(--map-radius, 0px))); }
.rm-map-canvas { position:absolute;inset:0; }
/* ★ PRINT: GIVE THE MAP AREA A HEIGHT, OR EVERYTHING ANCHORED TO IT RISES.
.rm-map-area is flex:1 1 0 — it has no height of its own and fills a viewport-height ancestor.
Print layout has no viewport height, so that box collapses toward its content height, and the
toolbar and legend (position:absolute against it) move UP with its top edge. That is the Driver's
"clicking print breaks the CSS: the map controls + legend jump upward", and it needs no print
stylesheet to cause — the browser's DEFAULT print styles are enough, because nothing here declared
one. A profile with no @media print rules is not neutral in print; it is unspecified.
A definite height restores the anchor. This does not change what the poster prints — that is a
separate document in its own frame (printInPlace) — it stops the LIVE page deforming while the
dialog is open. */
@media print {
.rm-map-area { flex: 0 0 auto; height: 100vh; min-height: 0; }
}
/* MATERIAL LIGHT (2026-09-21). Was background #0f1216 / color #7c8cf8 — same unconditional
loading overlay as .dsm-loading, .apg-loading and countries-map's .rm-loading. Rendered on
every load via v-if="!appReady", so it was the first surface a visitor saw.