Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
theme system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
27 Sep 2013 at 09:59 UTC
Updated:
29 Jul 2014 at 22:58 UTC
Jump to comment: Most recent
Comments
Comment #1
johnpitcairn commentedPlease remove the wrapper div. Styling the link itself should be completely sufficient for any purpose IMO.
Comment #2
marcus7777 commentedI think so too
Comment #3
BarisW commentedYes, 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.
Comment #4
joelpittetLove it, please, please:) lessdivs++
Comment #5
joelpittetI 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?
Comment #6
joelpittetComment #7
thedavidmeister commentedI 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"
Comment #8
joelpittetI'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'