suttacentral / suttacentral

SuttaCentral website application
https://suttacentral.net
135 stars 33 forks source link

Verse segments have large gap when references are activated #3005

Open thesunshade opened 9 months ago

thesunshade commented 9 months ago

Description:

When references are activated there is a large gap between verse lines and the ref numbers appear on their own line: image

Steps to reproduce:

Expected behaviour:

Refs should appear at the start of the line just like any other translation: image

Solution

Add

.verse-line {display:block}

And remove

.verse-line .translation {display:block}

image

image

thesunshade commented 9 months ago

I'm afraid I need to open this again. I forgot to test with the Pali verses. When the Pali is hidden it is correct. Please see below: https://suttacentral.net/dhp1-20/en/sujato?lang=en&layout=sidebyside&reference=main&notes=asterisk&highlight=false&script=latin image

thesunshade commented 9 months ago

I never noticed this before, but even non-verse segments have this problem when viewing side by side:

image

When viewing only the Pali manuscript, it is not a problem: image

sujato commented 3 months ago

It's tricky to get all the elements aligned in all the different scenarios!

I'm not 100% clear, is the CSS solution you proposed above still valid? Does that fix all the cases?

thesunshade commented 3 months ago

No, the original css I proposed no longer fixes it.

ihongda commented 4 days ago

截图 2024-11-26 23-05-46

There are also advantages to having the reference on a separate line.

I think the best solution is to put references in a separate line if there are many references, otherwise align them horizontally with the text.