Hi,

Panels uses a comma as decimal separator to format widths in percentages. For example.

.panels-flexible-region-12-center {
  float: left;
  width: 49,8513%;
}

This results in a broken layout in at least Firefox and Internet Explorer. Using number_format to explicitly format the widths in plugins/layouts/flexible/fliexilbe.inc with a period as decimal separator resolves this issue. I have attached a patch.

CommentFileSizeAuthor
#3 panels-flexible-css-widths.patch689 bytesRobbert
panels.patch689 bytesRobbert
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Robbert’s picture

Title: Comma instead of period in flexible layout » Comma instead of period in flexible layout CSS
sun’s picture

Status: Needs review » Needs work

Patch is reversed.

Robbert’s picture

Status: Needs work » Needs review
FileSize
689 bytes

Revised patch.

Robbert’s picture

I think I have figured out why I am (judging on the activity of this bug) one of the few people for which this issue occurs. Consider the following code

echo 0.55.' ';
setlocale(LC_ALL, 'nl_NL');
echo 0.55;

This yields 0.55 0,55. So, clearly the fact that I'm using Dutch localization causes floats to be formated with commas as decimal separator. Hence, such percentages should clearly be formatted using number_format since CSS expects periods as decimal separators and we do not want one's localization settings breaking it.

sdboyer’s picture

Status: Needs review » Fixed

Nice catch there, Robbert. Tested and it works, so committed. Thanks!

Status: Fixed » Closed (fixed)

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