Shared-chrome CSS factoring merges device-document stylesheets, so phones render the desktop width
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
Direzione di ricerca
The issue identifies shared-chrome CSS factoring and per-device capture stylesheets as the failing path, but names no source files or tests. Start by tracing where shared-chrome assets are generated and how the head selection script toggles capture stylesheets; compare the behavior before and after the change between commits 635b586240 and fc4576c9ef. Done means device-specific rules stay under the selected document, and the reported iPhone capture resolves to 320px.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
On a capture whose phone layout is nested as a device-only subtree (the #4570/#4611 shape), the head selection script picks a device by switching each per-device capture stylesheet's media between all and not all. On current trunk the shared-chrome CSS factoring breaks that switch. Device-specific rules from the desktop and mobile stylesheets are merged into shared-chrome-*.css files that no longer follow their source document's toggle. On a phone the desktop rules win and the page renders at desktop width.
Evidence
Real Wix site, 10 routes, same capture each time. SSI 1.33.361 with php-transformer/src swapped in. iPhone 13 emulation, home route:
| BE build | selected document | #site-root |
document.scrollWidth |
|---|---|---|---|
| #4611 head (before) | mobile | 0..320 | 320 (matches source) |
trunk fc4576c9ef |
mobile | 0..980 | 980 |
The page's .data-blocks-engine-capture-desktop-document wrapper resolves --site-width from :where(.blocks-engine-attribute-8b90aa5755b2-0).
Before: these rules live in per-document capture sheets that the selection script toggles:
capture-112a51c4….css media=all (mobile sheet: --site-width:320px)
capture-c8c815b9….css media=not all (desktop sheet: --site-width:980px)
Trunk:
shared-chrome-6429338ec1e7c14c.css media=all/not all (contains BOTH 320px and 980px rules, same selector — last wins)
shared-chrome-8921da39824768c6.css media=all (980px, never toggled)
Result: --site-width resolves to 980px with mobile selected, so the page and the phone header band (-330..650) overflow.
Expected
Shared-chrome factoring keeps each rule under its source document's selection. Either factor only rules that are identical across device documents, or keep device-document stylesheets as separately toggled assets. Then the phone page fits at 320px again.
Likely introduced between 635b586240 and fc4576c9ef. Candidates touching shared CSS factoring: #4647, #4656, #4690, #4776.
AI disclosure: diagnosed and filed by Franklin (Claude Opus via Pi/Roadie).
- Lingua principale
- PHP
- Stelle
- 25
- Fork
- 3
- Merge medio
- 2h 29m
- PR unite (30g)
- 931
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Automattic/blocks-engine
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Automattic/blocks-engine#4874 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
Automattic/blocks-engine#4836 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Automattic/blocks-engine#775 ·
I maintainer di solito rispondono entro 1 giorno
-
non core block: layout-shell@a[data-testid][href][target]Forse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 46/100
Automattic/blocks-engine#4888 ·
I maintainer di solito rispondono entro 1 giorno
-
non core block: layout-shell@div[data-bg-effect-name][data-has-ssr-src][data-image-info][data-motion-part]Forse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
Automattic/blocks-engine#4887 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Automattic/blocks-engine
Issue simili
-
sync-en
Difficoltà 1/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
sync-en
Difficoltà 1/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 83/100
GSA/digital-gov-drupal#569 ·
I maintainer di solito rispondono entro 2 giorni
-
feature-request-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
Codeinwp/wp-menu-icons#360 ·
-
[Type] Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 5 giorni