Materialize: Image-cropping in materialboxed image nested in horizontal card

Created on 11 Feb 2018  路  3Comments  路  Source: Dogfalo/materialize

Expected Behavior


Applying the materialboxed class to a (in my case horizontal) card image should also work fine.

Current Behavior


Everything is fine except the magnified Image is cropped somehow. The dimensions are set as element style, which is done by the JS-part i guess. Also the image isn't centered properly as i would expect.

See http://czihal-gk.de/wordpress/fertigungsverfahren/ for instance. Just click an image in one of the provided cards and i think you'll see, what i mean.

The mobile versions seem to work fine, but i can't tell if this is because i am switching to a vertical card for mobile devices...

Possible Solution



I tried removing the element styles (width and height), which resulted in a fine centered image, but not magnified. I can only guess, what the fix would be, most likely there are some wrong dimension calculations.

Steps to Reproduce (for bugs)

  1. create a horizontal card with image and assign .materialboxed to the image
  2. click on the rendered image
  3. enjoy

See this example: http://czihal-gk.de/wordpress/fertigungsverfahren/

Context


Your Environment


  • Version used: 1.0.0-alpha.3
  • Browser Name and version: Chromium Version 57.0.2987.98, Firefox 58.0.2 (64-Bit), both running on Debian 8.10 (64-bit)
  • Operating System and version (desktop or mobile): Linux Mint (Debian Edition) 2

Most helpful comment

Good find! I fixed a bunch of issues that caused errors when css properties like max-width or max-height were applied.

Fixed in 51109e1db639e5b4a9f8de755cee140c83d4c218

All 3 comments

Good find! I fixed a bunch of issues that caused errors when css properties like max-width or max-height were applied.

Fixed in 51109e1db639e5b4a9f8de755cee140c83d4c218

Thanks buddy! Just wanted to leave one more comment: You are doing a great job here! Really appreciate it!

Just updated to Alpha 4. Good Job, works just perfect!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Robouste picture Robouste  路  3Comments

MickaelH974 picture MickaelH974  路  3Comments

ReiiYuki picture ReiiYuki  路  3Comments

ruslandzhumaev picture ruslandzhumaev  路  3Comments

serkandurusoy picture serkandurusoy  路  3Comments