Frontmatter
| id | 8041 |
| title | Update Flexbox layout to use correct flex shorthand for numbers |
| state | Closed |
| labels | enhancementjavascriptai |
| assignees | tobiu |
| createdAt | Dec 6, 2025, 10:37 PM |
| updatedAt | Dec 6, 2025, 10:42 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8041 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Dec 6, 2025, 10:42 PM |
Update Flexbox layout to use correct flex shorthand for numbers
tobiu assigned to @tobiu on Dec 6, 2025, 10:39 PM

tobiu
Dec 6, 2025, 10:42 PM
Input from Gemini 2.5 pro:
✦ Implemented the fix in
src/layout/Flexbox.mjs.applyChildAttributesnow checks ifflexis a number usingNeo.isNumber(flex)and converts it to${flex} 1 0%. This preventsflex: 1from being converted toflex: '1 1 auto', resolving layout issues where equal distribution was expected but content size interfered.
tobiu closed this issue on Dec 6, 2025, 10:42 PM
Update
src/layout/Flexbox.mjsto correctly handle numericflexvalues. Currently,flex: 1is converted toflex: '1 1 auto', which can cause layout inconsistencies (e.g. inAgentOS.view.Viewport). According to MDN, a unitless number should translate toflex: <number> 1 0%.Change: If
flexis a number, convert it to${flex} 1 0%.