wechat-miniprogram / wechat-miniprogram/float-pigment

[layout] Consider min-content in layout algorithms

Open
#14 0 comments 0 reactions 1 assignee View on GitHub

@TtTRz is already working on this.

Since Mar 25, 2025.

float-pigment-layout
Dominant language
Rust
Stars
17
Forks
4
Avg merge
4m
Merged PRs (30d)
1

Description

The current implementation does not consider the min-content of items, which may lead to unexpected compression of certain nodes.

<div style="display: flex; flex-direction: column; height: 100px;">
    <div>32x16</div>
    <div style="height: 100px; width: 100px;"></div>
    <div style="height: 100px; width: 100px;"></div>
</div>

Image

The container is being shrunk due to flex-shrink, while the expected height should be the child's min-content.

This feature needs to be implemented not only in the Flex Layout algorithm but also in other layout algorithms.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.