💡 alignContent for cross-axis distribution of flex lines
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- typescript
- Ambito
- cli
Direzione di ricerca
Inizia da test/align-content.test.ts e ispeziona le strutture di layout di clay/clay.h vendorizzate e il pass di layout che gestisce le righe mandate a capo. Esamina il lavoro sull’allineamento delle stringhe letterali in #42 e la dipendenza dal wrapping su più righe in #63. Il lavoro è completato quando le varianti di alignContent richieste distribuiscono più righe flex come descritto, incluso l’esempio flex-end, senza posizionamento lato JS.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Is your feature request related to a problem?
Once a container can wrap into multiple flex lines, there's no way to distribute those lines along the cross axis—they pack to the start. With a 2-wide × 6-tall wrap container holding four single-cell children (two lines of two), the lines sit at the top (rows 0-1), with no way to push them to the end, center them, or space them out.
Describe the solution you'd like
An alignContent layout key that distributes free cross-axis space among the flex lines. For the example, alignContent: "flex-end" should push the two lines to the bottom (rows 4-5).
open("root", {
layout: {
direction: "ltr",
flexWrap: "wrap",
alignContent: "flex-end", // "flex-start" (default) | "flex-end" | "center" | "space-*" | "stretch"
},
});
alignContent should mirror the CSS align-content property. It's inert until there are multiple flex lines, so it depends on multi-line wrapping (#63).
Describe alternatives you've considered
Without renderer support, the only option is to compute line breaks and cross-axis offsets in JS and emit absolutely-positioned rows—which duplicates the layout engine's line-breaking and can't react to a resize.
Additional context
Failing test case on nm/repro/align-content (test · diff).
Clay's Clay_ChildAlignment (in the vendored clay/clay.h) offers only start/center/end on the cross axis; distributing whole flex lines—including the space-between/around/evenly/stretch variants—is a local addition to the layout pass. New string values should line up with the alignment string-literal refactor in #42 (re: #3).
- Lingua principale
- TypeScript
- Stelle
- 42
- Fork
- 2
- Merge medio
- 2g 5h
- PR unite (30g)
- 12
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
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 bombshell-dev/tty
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
bombshell-dev/tty#61 · 1 reazione ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
bombshell-dev/tty#129 ·
-
question
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
bombshell-dev/tty#112 ·
-
enhancement high priority
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
bombshell-dev/tty#83 · 2 commenti ·
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
bombshell-dev/tty#82 ·
Tutte le issue di bombshell-dev/tty
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
safetrustcr/dApp-SafeTrust#426 ·
-
area:workflow bug ready-for-agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
fil-donadoni/tolaria#4409 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Fission-AI/OpenSpec#1960 ·
-
Add dependabot Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
corsairdev/corsair#1764 ·