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 计算未考虑 flex container 的 max-width/max-height #1400

Open
temper357 opened this issue May 13, 2022 · 0 comments
Open

flex-shrink 计算未考虑 flex container 的 max-width/max-height #1400

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

Comments

@temper357
Copy link
Contributor

重现代码 | Code example:

  xit("size 002", async () => {
    let flexbox_7;
    flexbox_7 = createElement(
      "div",
      {
        class: "flexbox column horizontal",
        "data-expected-height": "33",
        style: {
          display: "flex",
          "-webkit-flex-direction": "column",
          "flex-direction": "column",
          "background-color": "#aaa",
          position: "relative",
          width: "400px",
          "box-sizing": "border-box",
          "min-height": "5px",
          "max-height": "30px",
          "padding-top": "1px",
          "padding-bottom": "2px",
        },
      },
      [
        createElement(
          "div",
          {
            "data-expected-height": "15",
            "data-offset-y": "1",
            style: {
              width: "100%",
              "background-color": "blue",
              "box-sizing": "border-box",
              "min-height": "0",
              flex: "0 1 auto",
            },
          },
          [
            createElement("div", {
              style: {
                width: "100%",
                "box-sizing": "border-box",
                height: "20px",
              },
            }),
          ]
        ),
        createElement(
          "div",
          {
            "data-expected-height": "15",
            "data-offset-y": "16",
            style: {
              width: "100%",
              "background-color": "green",
              "box-sizing": "border-box",
              "min-height": "0",
              flex: "0 1 auto",
            },
          },
          [
            createElement("div", {
              style: {
                width: "100%",
                "box-sizing": "border-box",
                height: "20px",
              },
            }),
          ]
        ),
      ]
    );
    BODY.appendChild(flexbox_7);

    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