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

SVG icons in feature elements do not respect their size setting #1886

Closed
3 tasks done
dhazel opened this issue Feb 2, 2023 · 1 comment
Closed
3 tasks done

SVG icons in feature elements do not respect their size setting #1886

dhazel opened this issue Feb 2, 2023 · 1 comment
Labels
has-workaround Has workaround, low priority stale theme Related to the theme

Comments

@dhazel
Copy link

dhazel commented Feb 2, 2023

Describe the bug

Bug

SVG feature icons in the home layout expand to fit the width of their feature element, rather than being constrained to the size specified in their width declaration.

Reproduction

Context

Given the frontmatter

---
layout: home

hero:
  name: Bug example

features:
  - icon:
      src: /flag-solid.svg
      width: 50
    title: Bug example
    details: The icon expands to fit the width of the feature element, rather than being constrained to 50px
---

Expected behavior

Expected

The feature icon is expected to size to the width specified by the width declaration.

System Info

System:
    OS: Windows 10
  Binaries:
    Node: 18.13.0
    npm: 8.19.3
  Browsers:
    Chrome: 109
  npmPackages:
    vitepress: ^1.0.0-alpha.40 => 1.0.0-alpha.45

Additional context

No response

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
@dhazel dhazel added the bug: pending triage Maybe a bug, waiting for confirmation label Feb 2, 2023
@brc-dd brc-dd added theme Related to the theme and removed bug: pending triage Maybe a bug, waiting for confirmation labels Feb 2, 2023
@brc-dd
Copy link
Member

brc-dd commented Feb 2, 2023

You can use style: "width: 50px" instead of width: 50 for now.

@brc-dd brc-dd added the has-workaround Has workaround, low priority label Feb 2, 2023
@github-actions github-actions bot added the stale label Aug 3, 2023
@brc-dd brc-dd closed this as completed in 93823a8 Aug 6, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
has-workaround Has workaround, low priority stale theme Related to the theme
Projects
None yet
Development

No branches or pull requests

2 participants