?

Log in

No account? Create an account

Previous Entry | Next Entry

.comment-meta closed weirdly

  • Feb. 26th, 2009 at 5:26 PM
In the process of working up some new layouts, I have once again tripped over this annoying bug: the .comment-meta div encompasses the whole of the comment, including the body and the linkbar. It would be lovely if the /div could be moved up to just under the date-time and before .comment-body so that comment-meta encompasses only the actual meta-information of the comment, as the name suggests it is intended to.

And then one could style headers for each comment without a lot of roundabout horsing around with the backgrounds or else doing unnatural things to span tags.

Tags:

Comments

( 13 comments — Leave a comment )
av8rmike
Feb. 27th, 2009 03:04 am (UTC)
I could submit a bug report on this, but I can't make any promises when or if it'll get fixed. That's about all I can offer, unless you're asking how to patch it in your own layout layer.
branchandroot
Feb. 27th, 2009 03:12 am (UTC)
*sighs* Kind of figured. I was hoping to get the original fixed, since a patch for me is just for me, but in light of Recent Events I wasn't holding my breath.

av8rmike
Feb. 27th, 2009 05:25 pm (UTC)
Hmmm... I tried making this change in my own layout, but the problem is, the comment text now "clears" to below the user icon instead of flowing next to it. Either I did something wrong or this is exactly what is supposed to happen.
branchandroot
Feb. 27th, 2009 05:40 pm (UTC)
*runs that in her head a minute* Ah, I see. Yes, if the text is in a separate div from the header (which it should be) and the icon is in the header, then the comment-body div would need to be given a display:inline in order for the text to wrap.

*sighs* That probably deep-sixes getting it fixed generally, because all the existing themes would need that line added, which I'm betting LJ will not shell out time for.
av8rmike
Feb. 27th, 2009 06:09 pm (UTC)
Setting "display: inline" on comment-body doesn't work either. You'd have to do something more creative than that, I'm afraid.
branchandroot
Feb. 27th, 2009 08:06 pm (UTC)
*looks at the html again* Hm. Maybe it's because the comment text isn't enclosed in a paragraph tag... Odd; that's the solution that's worked for entry text in the past, when I've moved the icon into the header. I'll have to take a poke at this when I've got all my files handy.
branchandroot
Feb. 28th, 2009 06:34 pm (UTC)
*frowns* Okay, I took a copy of the Expressive html and moved the comment-meta /div up to just before the comment-body div, and I didn't even have to add display:inline. The icon (floated) is right where it should be, and the comment text is wrapping around it just as it should. It occurs to me that it's because there is no paragraph tag that the display:inline is not needed for comments, so actually this should be easy.

What theme were you testing this with? I could see getting different results if the icon is positioned in some other way than float.
av8rmike
Mar. 2nd, 2009 02:32 pm (UTC)
I tested it on my own journal and this one. Here is what a patch would look like showing exactly what I changed:
--- C:\...\base.s2    Mon Mar  2 08:56:51 2009
+++ C:\...\mod.s2     Mon Mar  2 08:57:14 2009
@@ -72,6 +72,7 @@
         """<div class="comment-subject">$e.subject</div>""";
     }
 
+    "</div>\n";
     """<div class="comment-body">""";
     $e->print_text();
     """</div>
@@ -114,7 +115,7 @@
         $e->print_multiform_check();
     }
 
-    "</div>\n</div>\n</div>\n</div>\n";
+    "</div>\n</div>\n</div>\n";
     if (not $e.frozen) {
         $e->print_reply_container({"class" => "quickreply"});
     }
Notice that I only changed one closing div tag, nor did I change the section for collapsed comments. Since the comment-meta, -body, and -links DIVs now are separate boxes, there's no reason they should flow inside each other. I'll even leave this comm's layout like this for a few hours so you can check out why it doesn't work right.
branchandroot
Mar. 2nd, 2009 03:48 pm (UTC)
The problem appears to be in the style sheet sceen.css, down at the very bottom where the float clearing is defined. .comment-meta:after is given this styling:

content: " ";
display: block;
visibility: hidden;
clear: both;
height: 0.1px;
font-size: 0.1em;
line-height: 0;

Which looks like why the text of comment-body, which should indeed wrap around a floated element from another div is, instead, clearing it.

So, two things would need to happen: both the moving of the /div and the deletion of this particular line from screen.css. Or, since there must have been some reason to clear the comments, altering .comment-meta:after to .comment-inner:after.

Figured it must be a css problem, since I don't use the base or screen at all in my layouts, and that's where it was working properly.
av8rmike
Mar. 2nd, 2009 04:38 pm (UTC)
Okay, okay... Now we're on the same page (no pun intended). That screen.css stylesheet is the main stylesheet for the style (default/screen.css). There's all that "utility code" down at the bottom of the sheet, referencing this site. Presumably it was all implemented to fix cross-browser bugs, so we'd have to test this on multiple browsers.
It's all very interesting academically, but we're now talking about patching a layer and a principal stylesheet to "fix" what is arguably an aesthetic flaw, not any loss of functionality.
branchandroot
Mar. 2nd, 2009 04:46 pm (UTC)
*nods* Exactly.

*considers* Well, yes and no. It isn't hurting anything in the current themes, certainly, since they were all designed around the current html. But changing this would open up some extra possibilities in future themes, such as giving the comments header backgrounds. That might or might not be enough inducement for the admins to go for it, of course.
marahmarie
Feb. 28th, 2009 07:19 am (UTC)
Doing unnatural things to span tags sounds kind of kinky :)...but I know what you mean. I do unnatural things to them too, all the time. It's good that you pointed it out, though. It should be fixed so that the CSS does what the name implies instead of what it's doing.

I'm so used to doing whatever I have to do to make whatever I have to make work, work, that I literally take it for granted that things like that are all messed up.
branchandroot
Feb. 28th, 2009 06:35 pm (UTC)
*laughing* Yeah, usually I just hack around it however I have to, but this one seems like an actual bug and not just someone having a very different idea about layout that I do.
( 13 comments — Leave a comment )

Latest Month

March 2016
S M T W T F S
  12345
6789101112
13141516171819
20212223242526
2728293031  

S2 Help Communities

Tags

Powered by LiveJournal.com
Designed by chasethestars