Bbcode cardimg tag working funny

User avatar
darrenhabib
Posts: 1890
Joined: 4 years ago
Pronoun: Unlisted

Post by darrenhabib » 3 years ago

Something has changed to the cardimg tag in that when you specify a width the height the image takes up is still the same as not setting a width.



It looks like it's just centered aligned, but if you hover over the card image tag on the left you'll see that you can click on the link on the card above and below where the actual image is.
My primers are very messed up with this change..

User avatar
Feyd_Ruin
Elder Vampire
Posts: 5478
Joined: 5 years ago
Answers: 3
Pronoun: he / him
Contact:

Post by Feyd_Ruin » 3 years ago

I'm honestly wondering if there weren't a bunch of browser updates, as things seem to be different when I haven't changed them.
I've removed the "object-fit" property from post images. As to how it changed its function between when I added it a year and a half ago and now, though........
To the beaten, the broken, or the damned; the lost, and the wayward: wherever I may be, you will have a home.

User avatar
darrenhabib
Posts: 1890
Joined: 4 years ago
Pronoun: Unlisted

Post by darrenhabib » 3 years ago

If a thread hasn't been resubmitted then the changes don't take effect, so not sure if that gives you any more information to go by.
If you look at the Will & Rowan thread it's all been effected by the change (search for "Mass creature removal" to see images effected).
But my Aminatou hasn't been updated recently as seems to be unaffected.

I feel this has happened in the last week or even the last few days because I was working on the Kenrith one maybe 4 days ago and I'm pretty sure it was fine then.
The browser change thing does seem like it would coincide with this.

User avatar
darrenhabib
Posts: 1890
Joined: 4 years ago
Pronoun: Unlisted

Post by darrenhabib » 3 years ago

Actually I looked at the html between working and not working examples and you can see a set height of 405px is set no matter what the width is.
As you can see when it was working it just set it to autopx.


HTML when working
<img class="autocard_image" style="width:160px;height:autopx;border-radius:12px;box-shadow:0px 0px 0px rgba(0,0,0,0.5);object-fit:fill" src="https://www.mtgnexus.com/autocard/img/The+Chain+Veil">

New HTML no working
<img class="autocard_image" style="width:160px;height:405px;border-radius:12px;box-shadow:0px 0px 0px rgba(0,0,0,0.5);object-fit:fill" src="https://www.mtgnexus.com/autocard/img/Chandra%2C+Novice+Pyromancer">

User avatar
Feyd_Ruin
Elder Vampire
Posts: 5478
Joined: 5 years ago
Answers: 3
Pronoun: he / him
Contact:

Post by Feyd_Ruin » 3 years ago

Ohhhh, I misunderstood part of your issue.

Aye, that "height:autopx;" always bugged me, since it's malformed. It ignored it and assumed auto, but still. I fixed this by giving it a default height of 405px, but that means it assumed you'd set a height AND width if you did either. When you didn't, the default came into play. (Posts are rendered live, BUT the tag is saved with whatever default values I give it when you submit. So the posts simply have different default values since they changed - one at 405, one at "auto".)

I adjusted the way it is again, so it now works with auto or pixel, with an "auto" as the default. This makes it's compatible with only setting a width or height.

The caveat is that you'll need to re-edit the messed up posts because they'll still have the old default 405 saved, and editing and resaving will allow them to inherit the new "auto".

edit:
I edited and saved the Kenriths primer to confirm it's a no-touch fix, and it updated correctly.
Apologies for the trouble.
To the beaten, the broken, or the damned; the lost, and the wayward: wherever I may be, you will have a home.

Post Reply Previous topicNext topic

Return to “Community Software Feedback and Bug Reports”