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



Messages In This Thread
Minor CSS bug fix - by vtk - 03-15-2018, 06:12 AM
RE: Minor CSS bug fix - by Luminesce - 03-15-2018, 02:00 PM
RE: Minor CSS bug fix - by Pleeb - 03-15-2018, 11:32 PM
RE: Minor CSS bug fix - by vtk - 03-16-2018, 10:34 AM
RE: Minor CSS bug fix - by Pleeb - 03-16-2018, 10:41 AM
RE: Minor CSS bug fix - by jean-luc - 03-16-2018, 07:25 PM
RE: Minor CSS bug fix - by Pleeb - 03-18-2018, 01:20 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)

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