Support » Requests and Feedback » More hooks for CSS styling!

  • It gets ugly wrapping elements in divs and spans for the sake of styling…

    For instance, the Comments links have a number of states ‘Comments n’ ‘Comments 1’ ‘No Comments’ and ‘Comments Off’. Wouldn’t it be real swell if you could set a class for each?

    Presently you can only pass one class to comments_popup_link(). Sure easy enough to hack, but when your trying to create a neat little packed theme including 12 plugins and a handful of hacks for such straight forward stuff its annoying

Viewing 5 replies - 1 through 5 (of 5 total)
  • couldn’t you do this with else/if?

    yeah for sure!

    I just think it would be better in terms of setting apart design from content, i.e. keep the styling in the css 🙂

    Well you could pass the class as a variable in php and still style in the CSS. Incidentally it is no part of CSS that the style changes according to the words in the content. And whilst it would be need no doubt it would prolly fall into the *bloat* cat if considered for WP. Those who need it will have to hack I would think.

    Hi Root :),

    Could you please give me a small example of passing the class as a variable to do this sort of styling for comments? im eager to understand how to do that…

    Yeah I do understand that its not part of CSS to actually change the style according to words in the content, what i was referring to was setting a class for each state, and extending the capabilities of the comments_popup_link() function. Sorta like this guys plugin

    Well I do not know much php but a conditional statement with if; then do this; else do something; is what you need. The; do this; in question being adding the class. The class varies by comment type. Each class is styled in the CSS. There are some good worked examples on the Codex which just need a bit of adapting.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘More hooks for CSS styling!’ is closed to new replies.