The reference guide's footer scrolls the page sideways at desktop width

Aperta Adatta ai principianti
#1,938 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
76/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
css, html

Direzione di ricerca

Leggi wicket.css intorno alla riga 209 (la media query da 768 px in su che applica margin-left: var(--toc-w) a #header, #content, #footnotes, #footer) e intorno alla riga 388 dove #footer riceve max-width: none. Compila wicket-user-guide con -Pguide, poi in Chromium a 1280 px conferma che document.documentElement.scrollWidth supera la larghezza della finestra di --toc-w prima di modificare qualsiasi cosa. Aggiungi una regola width: auto per body.toc2 > #footer dentro quella stessa media query e ricompila. Fatto quando scrollWidth è uguale alla larghezza della finestra a 1280 px e lo sfondo in tessuto del footer continua a estendersi dall'indice fino al bordo destro; la stessa modifica passa poi a wicket-11.x.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

From 768 px up, the reference guide scrolls sideways by the width of the table of contents. At 1280 px the page is 1584 px wide, 304 px wider than the window, and the whole extra width belongs to the footer.

Cause

The Asciidoctor default stylesheet gives #header, #content, #footnotes, #footer a width: 100%. wicket.css then shifts the four of them right with margin-left: var(--toc-w) (line 209) to make room for the table of contents. #header, #content and #footnotes keep a max-width and get margin-right: auto, so they still fit. #footer has max-width: none (line 388), so it stays as wide as the window, starts --toc-w further right, and sticks out past the right edge.

Seen in Chromium on a build of wicket-user-guide with -Pguide. It is on master since #1845, and on wicket-11.x since #1937, which brought the same stylesheet over unchanged.

Not covered by #1903

#1903 fixes the 18 px sideways scroll at phone width (#1891). That is a different overflow. #1903 does not touch #footer, and below 768 px the footer has no margin, so it does not overflow there.

Fix

Let the footer take only the width the table of contents leaves, for example width: auto on body.toc2 > #footer in the same media query. It can then still run to the right edge on the cloth background. The fix goes on master first and is cherry-picked to wicket-11.x.

Done when

  • At 1280 px, document.documentElement.scrollWidth equals the window width.
  • The footer's cloth background still runs from the edge of the table of contents to the right edge of the window.
Lingua principale
Java
Stelle
800
Fork
423
Merge medio
1g 1h
PR unite (30g)
170

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/wicket

Tutte le issue di apache/wicket

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.