vitepress icon indicating copy to clipboard operation
vitepress copied to clipboard

Resize hero image

Open ambodu opened this issue 3 years ago • 2 comments

Is there any way to resize the img that i have configured in docs/index.md/hero ?

ambodu avatar Sep 02 '22 01:09 ambodu

You should add custom css and overwrite it. Target:

.VPHero .image {
  max-width: 480px;
}

You should also overwrite media query on different screen size too. So basically, it' better to resize your image instead of CSS. If you want to make it smaller, add transparent padding to your image.

I think adding config option to resize the image is a bit hard because of media query break points we have. It would be better to have some solid guideline on how to place good image on default theme.

Which is make the image aspect ratio square. Adjust paddings of the image to get the best result. And I think we could add this to docs 👀

kiaking avatar Sep 02 '22 01:09 kiaking

thank you so much for replying to me so quickly and this did solve the problem that was bothering me.I also think we should add this to docs :smiley:

ambodu avatar Sep 02 '22 01:09 ambodu

Let's track the docs thing at #1773

brc-dd avatar Mar 21 '23 18:03 brc-dd