-
Notifications
You must be signed in to change notification settings - Fork 4
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
Images in Posts lose aspect ratio in Responsive views #9
Comments
This is a Bulma "issue" that I have baked into the theme. I have opted to use the So to get things working the way you want, it looks like there's a couple things you can do to edit the theme:
Let me know if that gets you to where you want to be! |
Thank you Caleb! When I just changed the class for the whole div, I lost all the text styling I'd added to PostMeta.vue, and it stopped interpreting the HTML styling included in my post text (parts of this content are recycled from many years ago.) So I added a new div just for the image:
And it works! Thanks so much for pointing me to the magic I needed. |
Images on the Index page always maintain their aspect ratio when Responsively scaled. But when the same image is added to a content page, Responsive scaling squishes the image out of aspect. Here's the starter view of the "Cover Image" content:
It is not obvious because the particular image looks fine squished. In DevTools you can see what happens:
Looks to me like the margins used in the full-screen view of the post image don't get scaled when it is Responsively reduced. Personally I'd prefer to not have those margins anywhere, but I can't find what creates them... They don't show on the Index page:
I've found it I hack the generated index.html to add
The aspect ratio is preserved - but I get only the blur image, and it is even tinier:
And I can't imagine where I'd add the preserveAspectRatio="xMidYMid meet" parameter into whatever part of the system generates that html! Adding that one parameter to index.html on my actual web server is the only change, the prepared image formats are identical:
Actually, the preserveAspectRatio parameter does not appear in DevTools! But its effects do... Searching for "viewBox" highlights the code for the image area - I don't understand what it has changed to work this magic...
Would definitely appreciate help! Or an explanation of which level of the code structure I should be reporting this to - Gridsome? Bulma? SVG? Some particular plugin?
The text was updated successfully, but these errors were encountered: