?

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

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.

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