Koenig Gallery is driving me insane


#1

Hello, dear Ghost community.

I’ve been using Ghost for quite a while, and with the 2.0 release, I decided to give theme development a shot again. A lot has changed since 1.0 (when I made my last theme), and I like all the new features.

However, the Koenig gallery thing is driving me against the wall. It never seems to work with the CSS I specify. I tried CSS code from multiple Ghost Standard Themes, but it works in every theme except mine. The images weirdly stretch through the row because it somehow only manages to center the images.

Problem: https://kubik.design/style-guide/

I’m using the newest version of Ghost on a DigitalOcean Droplet
Browser I’m using is Chrome.

Thanks a lot in advance for any help with this!


#2

@marvin it looks like you’re missing the JavaScript that is needed for the gallery to work, you can see Casper’s implementation here:


#3

@Kevin Shoot. Thanks a lot for pointing out.

Seems like making something in CSS only isn’t possible these days. I should really learn JavaScript instead of wasting my time recreating everything in a tedious CSS alternative :slight_smile:


#4

Yes in this particular case CSS doesn’t offer a native way to achieve the desired layout. Hopefully in a future CSS spec :crossed_fingers:

https://drafts.csswg.org/css-sizing-4/#aspect-ratio


#5

Yeah. CSS really misses some features that are really desirable. Main one being fixing the aspect ratio, though. What also blows is not being able tint background images, which has to be done with a gradient workaround.

Let’s hope CSS4 is coming soon :tada:


closed #6

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.