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

fix(components): [avatar] set img tag's width attribute #13844

Merged
merged 1 commit into from
Aug 3, 2023

Conversation

yj-liuzepeng
Copy link
Contributor

Please make sure these boxes are checked before submitting your PR, thank you!

  • Make sure you follow contributing guide English | (中文 | Español | Français).
  • Make sure you are merging your commits to dev branch.
  • Add some descriptions and refer to relative issues for your PR.

Description

The object-fit property requires the element to have explicit width and height in order to perform fitting operations based on its dimensions.
Due to the max-width: 100% property set on the img element in docs/.vitepress/vitepress/styles/base.scss, the fit attribute is effective. However, since the avatar component does not have a width set, it will cause issues

Related Issue

Fixes #13827

@pull-request-triage
Copy link

👋 @yj-liuzepeng, thank you for contributing element-plus.

  • You can comment with /label Components:[component_name] to add a label for which component you are working on.
  • You may join our Discord for staying tuned.

@github-actions
Copy link

github-actions bot commented Aug 3, 2023

@github-actions
Copy link

github-actions bot commented Aug 3, 2023

Hello @yj-liuzepeng, thank you for contributing to element-plus, please see our guideline to see how to make contribution

@github-actions
Copy link

github-actions bot commented Aug 3, 2023

🧪 Playground Preview: https://element-plus.run/?pr=13844
Please comment the example via this playground if needed.

@chenxch chenxch merged commit aa74616 into element-plus:dev Aug 3, 2023
12 checks passed
@element-bot element-bot mentioned this pull request Aug 4, 2023
3 tasks
@yj-liuzepeng yj-liuzepeng deleted the fix/avatar branch August 16, 2023 15:19
consultation-applio pushed a commit to consultation-applio/element-plus that referenced this pull request Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Component] [avatar] Avatar jpg图片 fit属性失效
3 participants