Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
theme system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
31 May 2014 at 21:35 UTC
Updated:
8 Feb 2019 at 13:08 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
joelpittet@lewisnyman and I tried a few different approaches yet this one was the cleanest we came up with so far. Any other suggestions are welcome, though this one does look to work quite well so give it a try.
Comment #2
lewisnymanI remember having this discussion for html5 boilerplate years ago: https://github.com/h5bp/html5-boilerplate/pull/418
Comment #3
Anonymous (not verified) commentedOoh, well if Paul Irish spurned it, I don't know... :-)
I'm wary of display: table, but it does seem to work! The width is now calculated to the size.
Comment #4
alexrayu commentedPlease consider using inline-block instead of table.
Comment #5
joelpittet@alexrayu please test both and let me know which one does what is intended.
@JamesLafrère ha nice find. We do know that our form elements attach their labels with for attributes. And the cursor helps illustrate the problem. I believe there is also now a type=> label that doesn't have to tie to an element nor does checkboxes and radios so that's why I tied it to the for attribute selector.
Comment #6
alexrayu commented@joelpittet I looked at both, and they both seem to produce same result in practice. In theory, however, having label an inline-block seems to be semantically correct. I tested these on node form.
Comment #7
lewisnymanIf we can get away with display: inline-block with no repercussions let's do it. display: table feels dirty.
Comment #8
Anonymous (not verified) commentedYep, inline-block works just the same, tested on Chrome/FF/Safari. Marking as RTBC.
Comment #9
joelpittet@JamesLefrère and @alexrayu I'm not sure the testing was very thorough as I did originally try with display: inline-block as the first thing I did, and got creative with :after trickery as well but that conflicted with required markers.
So here's a bit of proof in pictures.
Comment #10
Anonymous (not verified) commentedWhoopsy-daisy. I didn't actually notice the inline-block issues! I think this is going to have to be display: table. It's not such a big deal though eh? (Patch 1 to review?)
Comment #11
Anonymous (not verified) commentedComment #12
alexrayu commentedYes. Sadly inline-block won't do then.
Comment #13
alexrayu commentedReuploading the joels patch to have it latest.
Comment #14
Anonymous (not verified) commentedComment #15
joelpittetHere:D
Comment #16
yesct commented:)
Comment #17
joelpittetBetterish title
Comment #18
webchickReally sorry about how long this sat here. My post-DrupalCon life got a bit hectic. Confirmed the fix only makes the image browse appear when I click directly on the text, not just somewhere nearby.
Committed and pushed to 8.x. Thanks!
Comment #21
brankoc commented+related issue