Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

计算 flex-shrink 时 minimum content size 不应该考虑 child 的百分比 width/height #1401

Open
temper357 opened this issue May 13, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@temper357
Copy link
Contributor

重现代码 | Code example:

  // @TODO: Percentage size of child should not be considered in auto min content width/height.
  xit("size 003", async () => {
    let flexbox_9;
    flexbox_9 = createElement(
      "div",
      {
        class: "flexbox column vertical",
        style: {
          display: "flex",
          "-webkit-flex-direction": "column",
          "flex-direction": "column",
          "background-color": "#aaa",
          position: "relative",
          height: "50px",
          "box-sizing": "border-box",
        },
      },
      [
        createElement("div", {
          "data-expected-width": "10",
          "data-offset-x": "20",
          style: {
            height: "100%",
            "background-color": "blue",
            "box-sizing": "border-box",
            flex: "1 0 10px",
          },
        }),
        createElement("div", {
          "data-expected-width": "10",
          "data-offset-x": "10",
          style: {
            height: "100%",
            "background-color": "green",
            "box-sizing": "border-box",
            width: "10px",
          },
        }),
        createElement(
          "div",
          {
            "data-expected-width": "10",
            "data-offset-x": "0",
            style: {
              height: "100%",
              "background-color": "red",
              "box-sizing": "border-box",
            },
          },
          [
            createElement("div", {
              "data-expected-width": "10",
              "data-offset-x": "0",
              style: {
                height: "100%",
                "box-sizing": "border-box",
                width: "10px",
              },
            }),
          ]
        ),
      ]
    );
    BODY.appendChild(flexbox_9);

    await snapshot();
  });

预期结果 | Expected results:
image

实际结果 | Actual results:
image

@temper357 temper357 added the bug Something isn't working label May 13, 2022
@temper357 temper357 self-assigned this May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant