Stanford Tulpa Study looking for more participants
(if you're chosen they'll pay for travel and lodging!)

Minor CSS bug fix
#1
I have noticed in new posts since the forum upgrade, quotes in replies sometimes have messed-up date displays. Like, where it's supposed to say something like "(8 hours ago)" it actually comes out looking like "()8 hours ago". See attachment. (Edit: this apparently affects the Dark and Light themes.)

On investigating, I found this is because, while the <SPAN> element containing the whole date gets (and is supposed to get) the style "float: right", it also contains an inner <SPAN> element around the "8 hours ago" text so that it can have hover-text, and that inner <SPAN> element also gets the style "float: right" which is what makes it get a weird layout on the screen.

I found the following in the CSS for the site:
Code:
blockquote cite span {
    float: right;
    font-weight: normal;
}

These two rules are applied to any <SPAN> inside any <CITE> inside any <BLOCKQUOTE>, including a <SPAN> in a <SPAN> in a <CITE> in a <BLOCKQUOTE>, which is not what we want here. What we want is to only apply these rules to a <SPAN> which is a direct subelement of a <CITE> in a <BLOCKQUOTE>, so it won't also apply to a <SPAN> within a <SPAN> in a <CITE> in a <BLOCKQUOTE>. To do this, we need only make a slight change to the selector in the CSS:
Code:
blockquote cite > span {
    float: right;
    font-weight: normal;
}

This probably won't break anything, unless there is somewhere an instance of a <SPAN> that should get the "float: right" style and is a subelement of some element other than <CITE> which is in a <CITE> in a <BLOCKQUOTE>.


Attached Files Thumbnail(s)
   
Maggie David (she or they, birthday June 4)
Reply

Sponsors:
Lolflash - click it, you know you want to

#2
Yeah, I immediately noticed this too and brought it up, but I sure didn't know why it happened or how to fix it.
Hi! I'm Lumi, host of Reisen, Tewi, Flandre and Lucilyn.
Everyone deserves to love and be loved. It's human nature.
My tulpas and I have a Q&A thread, which was the first (and largest) of its kind. Feel free to ask us stuff.
Reply
#3
(03-15-2018, 02:00 PM)Luminesce Wrote: Yeah, I immediately noticed this too and brought it up, but I sure didn't know why it happened or how to fix it.

Test

EDIT: Thanks for finding that bug.... Fixed!
Reply
#4
Now that I'm looking at this on my phone again, I'm reminded that the mobile theme also appears to be affected
Maggie David (she or they, birthday June 4)
Reply
#5
Whoops I'll fix that too later today- I just noticed on my phone as well
Reply
#6
Now I see it as

(, 07:00 AM)Yesterday

(on mobile theme)
Lawyer up on my new forum game, Jean-luc's Jaundiced Judicial Judging Jamboree! Feel free to PM or post on that thread with any questions!
Stats for LOTPW
Reply
#7
Should be fixed now.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)

Sponsors:
Lolflash - click it, you know you want to