Scale figures so they look proportional #6588
-
DescriptionI have lots of images with variable widths to use in a book and I'd like them to look proportional. Here's a MWE trying to scale the images: ---
project:
type: book
book:
title: My Title
author: Me
chapters:
- index.qmd
format:
html:
theme: doc.css
---
# Intro
## Actual size

## Scaled
{.Scale}
{.Scale}
{.Scale}
{.Scale} This is the CSS file: /*-- scss:defaults --*/
.Scale {
transform: scale(0.25);
}
These are sample images: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Setting |
Beta Was this translation helpful? Give feedback.
-
It's really unclear what you mean by "proportional" since Quarto keep the aspect ratio, that makes not much sense.
|
Beta Was this translation helpful? Give feedback.
Ok, so there nothing proportional at least from the HTML/CSS perspective.
As long as you take care of generating the figures correctly and that you set their width properly, you should not have to resign on the responsive feature.