-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Store Badge Creator: Explain how to adjust the size of the store badge #5252
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
Comments
Hi Ankur - Hoping you can take a look at this issue. Thanks! |
@rudyhuyn can you please help with this question? |
Hi, I work on the badge. From the badge generator, you can either use the badge web component -- which does fancy things like rendering the badge in the user's language and honors the user's browser dark/light mode setting -- or you can use a plain HTML badge. Web component badge that detects browser theme and language: <script type="module" src="https://get.microsoft.com/badge/ms-store-badge.bundled.js"></script>
<!-- replace 9nksqgp7f2nh with the ID of your app -->
<ms-store-badge
productid="9nksqgp7f2nh"
window-mode="direct"
theme="auto"
size="large"
language="en-us">
</ms-store-badge> Alternately, you can use the plain image badge, no script required: <a href="https://apps.microsoft.com/detail/9nksqgp7f2nh?mode=direct">
<img src="https://get.microsoft.com/images/en-us%20dark.svg" width="200"/>
</a> To style the web component, you can use CSS parts: ms-store-badge::part(img) {
max-height: 52px;
} Or if you prefer the plain image badge, you style it like you would any other element. You can read more about styling and badge options on our App Badge repo. Hope this helps! p.s. I'll update the Microsoft Docs site with this info. |
…c_temp For protected branch, push strategy should use PR and merge to target branch method to work around git push error
I've submitted this PR to fix the issue. |
Type of issue
Missing information
Feedback
The badge image appears to ignore any sizing applied to the badge element (
ms-store-badge
), which makes it impossible to include it in an html layout.Please add information how to adjust the badge size.
Thanks
Page URL
https://learn.microsoft.com/en-us/windows/apps/publish/microsoft-store-app-badge
Content source URL
https://github.com/MicrosoftDocs/windows-dev-docs/blob/docs/hub/apps/publish/microsoft-store-app-badge.md
Author
@GrantMeStrength
Document Id
9c3935cd-075c-8799-0d27-5117533cd22e
The text was updated successfully, but these errors were encountered: