Hey,

There is some weird spacing going on with checkboxes in drupal tables, this because it is fluid. The patch adds a width.

spacing-checkboxes-drupal.jpg

Comments

karschsp’s picture

Status: Needs review » Reviewed & tested by the community

Patch looks good. RTBC.

droplet’s picture

I want to fix it a long time ago but tables in Drupal are without fixed-width, was though it is drupal style.

14px is the best value for IE I think. but in Firefox is 16px.

(Of course you won't see the diffident because browsers omitted it when width is smaller than content)

Bojhan’s picture

Status: Reviewed & tested by the community » Needs review

Sorry, to put it back to needs review. But I am not sure, I am right :D - I would love feedback like droplets on how more pixels might be better.

droplet’s picture

Status: Needs review » Needs work

I recheck it again, the actually width of checkbox in IE is 13px. I don't know if any browsers checkbox smaller than this value. A CSS trick is set the width to "1px" that let the browsers calculating the right value (min width) for it.

droplet’s picture

Status: Needs work » Needs review
StatusFileSize
new10.59 KB
new513 bytes

re-roll patch + #4

Bojhan’s picture

Status: Needs review » Reviewed & tested by the community

Tested, and it worked.

catch’s picture

Status: Reviewed & tested by the community » Needs work
+/*
+ * Checkbox have different width size in cross-browsers. Set width to a minimum
+ * value that trigger browsers to automatically size minimum width of TH element.
+ */

The first line should be:

/**

" Checkbox have different width size in cross-browsers." reads oddly to me, maybe "Checkboxes have different widths in different browsers"?

droplet’s picture

Status: Needs work » Needs review
StatusFileSize
new519 bytes
Bojhan’s picture

Status: Needs review » Reviewed & tested by the community
dries’s picture

Status: Reviewed & tested by the community » Needs work

I'm not sure I understand the documentation. Is the minimum with a hack or a well-documented feature that works across all browsers?

Furthermore, the help text has a couple of grammar issues:

1. 'Checkboxes have' instead of 'Checkbox have'.

2. 'that triggers' instead of 'that trigger'.

joachim’s picture

Could this be backported to D7?

droplet’s picture

How about:

Reducing "select all" column's width.
Due to form elements rendering difference in across browsers and operating systems, it cannot specify a fixed width on TH element. So we reduce the widths to a minimum value that will trigger browser engines to calculate the best TH element width.

1 pixel isn't a magic value. browsers expand table's column to fit the content. checkout how table width algorithms works: http://www.w3.org/TR/CSS2/tables.html#width-layout

@joachim,

It's theme changes, i bet it won't backport :(

Bojhan’s picture

Can the comment issues be addressed?

droplet’s picture

Issue tags: +Novice

or shorten it to:

Browsers will calculate the best width of TH element.

tagging Novice for Doc guy and native speakers. :)

kid_icarus’s picture

StatusFileSize
new695 bytes
new422 bytes

Perhaps this wording documents the change better?

+/**
+ * Force browsers to calculate the width of a 'select all' TH element.
+ */
kid_icarus’s picture

Status: Needs work » Needs review
bleen’s picture

Status: Needs review » Reviewed & tested by the community

The comment in #15 is much clearer.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Makes sense. Committed/pushed to 8.x.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

klonos’s picture

Version: 8.x-dev » 7.x-dev
Status: Closed (fixed) » Active
Issue tags: +Needs backport to D7

This was asked before back in #11, but was left unanswered. Can/should this be backported to D7?

sivaji_ganesh_jojodae’s picture

Status: Active » Needs work
StatusFileSize
new7.31 KB

+1 for backporting this to D7.

The content listing page (admin/content) looks good but people listing page (admin/people) has excess of width.

sivaji_ganesh_jojodae’s picture

Status: Needs work » Needs review
StatusFileSize
new318 bytes

Have rerolled the patch #15 for d7.

droplet’s picture

can you add back the comments.

sivaji_ganesh_jojodae’s picture

StatusFileSize
new401 bytes

Rerolled with comment.

droplet’s picture

Status: Needs review » Reviewed & tested by the community

Looks good. RTBC.

David_Rothstein’s picture

Status: Reviewed & tested by the community » Needs review

Has anyone tested this in different browsers? Especially older versions of IE?

It seems relatively safe for backport... especially if it only affects Seven. (However, at least for Drupal 8 I actually can't really figure out why this was done in the Seven theme only. Doesn't the same issue exist for any theme?)

mattih’s picture

Tested on IE8 - everything works as should.

shyamala’s picture

Issue summary: View changes
Status: Needs review » Needs work

Tried adding patch to simplytest.me got message: "An error occurred while patching the project." Looks like this needs a re-roll.

droplet’s picture

Status: Needs work » Needs review
parthipanramesh’s picture

Looks good! I applied this patch and it solves the issue! It looks a lot better now. Thank you!

droplet’s picture

Oh. I have no permission to update this issue, why ??

Anyone could marked it as "Reviewed & tested by the community" ?

lewisnyman’s picture

I can't either! No idea why

joachim’s picture

Status: Needs review » Reviewed & tested by the community
David_Rothstein’s picture

Status: Reviewed & tested by the community » Fixed
David_Rothstein’s picture

By the way, I'm still not sure why this fix is only in the Seven theme, but I guess it's up to some other issue to expand it beyond Seven if necessary.

Thanks for the additional testing (with IE8, etc) in the meantime.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.