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 布局中 align-item 设置时 child 设置 margin auto 未居中 #666

Closed
temper357 opened this issue Sep 9, 2021 · 0 comments · Fixed by #667
Closed

Flex 布局中 align-item 设置时 child 设置 margin auto 未居中 #666

temper357 opened this issue Sep 9, 2021 · 0 comments · Fixed by #667
Assignees
Labels
bug Something isn't working
Milestone

Comments

@temper357
Copy link
Contributor

使用的 Kraken 版本 | What version of kraken are you using

main

重现步骤 | Steps To Reproduce

重现代码 | Code example:

  it('should work flex item of margin auto when align items is set', async () => {
    let div;
    div = createElement(
      'div',
      {
        style: {
          display: 'flex',
          flexDirection: 'column',
          alignItems: 'center',
          width: '300px',
          height: '300px',
          backgroundColor: 'green'
        },
      },
      [
        createElement('div', {
          style: {
            width: '100px',
            height: '100px',
            marginLeft: 'auto',
            marginRight: 'auto',
            backgroundColor: 'yellow',
          }
        })
      ]
    );

    BODY.appendChild(div);

    await snapshot();
  });

预期结果 | Expected results:
image

实际结果 | Actual results:
image

@temper357 temper357 added the bug Something isn't working label Sep 9, 2021
@temper357 temper357 added this to the 0.9 milestone Sep 9, 2021
@temper357 temper357 self-assigned this Sep 9, 2021
@temper357 temper357 added this to To Do in Browser Features via automation Sep 9, 2021
Browser Features automation moved this from To Do to Done Sep 13, 2021
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
Development

Successfully merging a pull request may close this issue.

1 participant