Skip to content

fix: fullscreen width + docs for single creative format#70

Open
NicolayKjarnet wants to merge 2 commits intoget-advantage:mainfrom
NicolayKjarnet:fix/single-creative-fullscreen
Open

fix: fullscreen width + docs for single creative format#70
NicolayKjarnet wants to merge 2 commits intoget-advantage:mainfrom
NicolayKjarnet:fix/single-creative-fullscreen

Conversation

@NicolayKjarnet
Copy link
Copy Markdown
Contributor

Description

Fixes an issue where DOUBLE_MIDSCROLL_SINGLE_CREATIVE didn't fill the full viewport width on publishers that apply max-width constraints to the iframe (e.g. tv2.no's max-width: 1920px).

Changes:

  • Override publisher max-width with inline style so the creative always goes full-width
  • Fix :host positioning in padded ad containers with margin-left: calc((100% - 100vw) / 2)
  • Add the format to the docs sidebar and format overview page (was missing from navigation)

Why this is needed:
The standard DOUBLE_MIDSCROLL avoids this because its background iframe lives inside Shadow DOM, unreachable by page CSS. The single creative variant only has a foreground iframe, so it's subject to publisher constraints. The inline style override fixes this cleanly.

Issues Resolved

N/A

By submitting this pull request, I confirm that my contribution is made under the terms of the AGPL-3.0 license.

Fixes fullscreen width on publishers that apply max-width to the iframe
(e.g. tv2.no's max-width: 1920px). Also fixes :host positioning in
padded ad containers.
@NicolayKjarnet
Copy link
Copy Markdown
Contributor Author

Hey @pattan, noticed that the single creative format doesn't go full-width on publishers that set max-width on the iframe. The standard DoubleMidscroll avoids this since its background iframe sits inside Shadow DOM, but the single creative variant only has a slotted iframe that's exposed to page CSS. This fixes it with an inline style override. Also added the format to the docs sidebar and overview page since it was missing from navigation. Could you have a quick look? Thanks!

@pattan
Copy link
Copy Markdown
Contributor

pattan commented Apr 15, 2026

Thanks for the report @NicolayKjarnet

My spontaneous thoughts are that this should lives into publishers integration (tv2), rather than in the format.
What are your thoughts @sannheim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants