Current more link markup:

<div class="more-link"><a href="http://whatever" title="some title">More</a></div>

Proposed markup:

<a href="http://whatever" class="more" title="some title">More</a>

Related issue: https://drupal.org/node/2031301

Comments

johnpitcairn’s picture

Please remove the wrapper div. Styling the link itself should be completely sufficient for any purpose IMO.

marcus7777’s picture

I think so too

BarisW’s picture

Yes, we certainly don't need that. It's basic CSS to style it as a block-level element or add icons before/after it without needing a wrapper div.

joelpittet’s picture

Love it, please, please:) lessdivs++

joelpittet’s picture

Issue summary: View changes

I gave it a go over at #2031301-56: Replace theme_more_link() and replace with #type 'more_link' but ran into a snag. Maybe someone can point me in the right direction?

joelpittet’s picture

thedavidmeister’s picture

I left a comment at https://drupal.org/comment/8249979#comment-8249979 saying that the reason we have the wrapper DIV is because we can't remove it due to the way that #type/element_info()/drupal_render() works internally without making "more links" rather inflexible/broken. Yes, the wrapper DIV is unnecessary HTML and not useful for themers, but the #type system itself is unable to provide default classes on an element while allowing themers to add their own classes to that same element.

Having the wrapper DIV is kind of saying "themers, you can add whatever classes you like to the link itself, leave the system default classes on the wrapper and just pretend they're on the A element"

joelpittet’s picture

Status: Active » Closed (duplicate)

I've made progress, just need some reviews over there. Closing this as a duplicate.
#2031301: Replace theme_more_link() and replace with #type 'more_link'