question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Aspect not working correctly with images + manual fix

See original GitHub issue

Describe the bug

When using b-aspect with images that don’t match the aspect ratio, the images height will become larger and won’t match the desired aspect

Steps to reproduce the bug

  1. Create an aspect ratio element with an aspect (e.g. 1.8)
  2. Put an img inside the b-aspect. Make sure the image doesn’t match the aspect ratio, to see the effect it has.
  3. Make sure the img has width: 100% and height: 100% to match the container size
  4. See the size (which won’t match the desired aspect ratio)

Expected behavior

The div containing the image (and hence the img as well) to match the aspect ratio

Versions

Libraries:

  • BootstrapVue: 2.12.0
  • Bootstrap: 4.4.1
  • Vue: 2.6.11

Environment:

  • Device: Windows
  • OS: Windows 10
  • Browser: Chrome
  • Version: 81

Demo link

https://codesandbox.io/s/bootstrap-vue-sandbox-8zgrw

In the demo there are 2 images blocks: (1) With the aspect. This one doesn’t work.

(2) A manual aspect box which I found how to do online; it’s the workaround I’m currently using an I’m working, although I would prefer to use b-aspect

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tmorehousecommented, May 1, 2020

We might be able to add a new prop to b-aspect to force the constraint (and apply different CSS classes)

0reactions
albertpratomocommented, Dec 18, 2020

@tmorehouse can you give a tip on how to make b-aspect force the constraint? What CSS should be applied?

Read more comments on GitHub >

github_iconTop Results From Across the Web

The picture looks too big, stretched, does not fit the screen, or ...
Setting the TV - Manual Modes (back to top). Some signals received by your television may not be displayed correctly with the automatic...
Read more >
LG TV Wrong Picture Size or Aspect Ratio | LG USA Support
The majority of Aspect Ratio issues can be resolved by correctly setting options in the Aspect Ratio Menu. Before getting started, verify ...
Read more >
Working with Images — Krita Manual 5.0.0 documentation
Detailed steps on how images work in Krita. ... It is not fully correct, as most monitors these days have 125 PPI or...
Read more >
How to resize Image with SwiftUI? - ios - Stack Overflow
In SwiftUI, use the .resizable() method to resize an image. By using .aspectRatio() and specifying a ContentMode , you can either "Fit" or ......
Read more >
Fixing Resolution of HDMI Output on PC - Driver Support
If you're facing issues with your HDMI output on your PC, you'll need to adjust the resolution or make changes to the settings...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found