Skip to content
Discussion options

You must be logged in to vote

After looking at: https://stackoverflow.com/questions/63392775/is-there-a-way-to-set-the-image-scaling-method-in-rest-sphinx
and reading the first answer,
I think scale does use the percentage to calculate the pixel dimensions and then sets a static pixel width with CSS.

So it doesn't really scale with the viewport later, because it's not 50% of the viewport width, but 50% of the actual image size 🧐

So perhaps this answer will help with the transform:
https://stackoverflow.com/questions/8397049/how-can-i-resize-an-image-to-a-percentage-of-itself-with-css

@alexvoss Setting width with percentage with attribute list probably won't work, as the value should be pixels, but I don't know for sure

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@madjxatw
Comment options

@alexvoss
Comment options

alexvoss Feb 26, 2024
Collaborator Sponsor

@kamilkrzyskow
Comment options

Answer selected by madjxatw
@alexvoss
Comment options

alexvoss Feb 26, 2024
Collaborator Sponsor

@madjxatw
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants