#9301 closed defect (bug) (fixed)
no classes on div-coment in Walker_Comment::start_el()
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 2.8 | Priority: | normal |
Severity: | normal | Version: | 2.7 |
Component: | Template | Keywords: | has-patch tested |
Focuses: | Cc: |
Description
There are no classes on Walker_Comment::start_el() when it creates a <div id="div-comment-NNNN"> node.
This makes using CSS target that node pretty hard if not impossible across browsers.
Ideally, it would have a class like "comment-body".
This is a feature aid semantic markup.
Change History (7)
#4
@
15 years ago
It would have before we added the "Reply" and nested comments. But now the markup can change, on the fly, from (this is from memory, so the classes might be wrong):
<li class="comment"> <div id="div-comment-NN" /> </li>
to
<li class="comment"> <div id="div-comment-NN" /> <div id="response" /> </li>
So you can't use a rule like:
.comment > div { ... style the body of the comment ... }
... without getting the reply box, too.
Before this change, I'd just use css like this:
.comment { border: 1px solid blue; }
But the box will bound the replies too; which isn't what I wanted.
Ciao!
#5
@
15 years ago
- Component changed from General to Template
- Keywords tested added
- Milestone changed from Unassigned to 2.8
- Version set to 2.7
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
5 years ago
Note: See
TracTickets for help on using
tickets.
Example Patch