Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#3 | panels-flexible-css-widths.patch | 689 bytes | Robbert |
panels.patch | 689 bytes | Robbert | |
Comments
Comment #1
Robbert CreditAttribution: Robbert commentedComment #2
sunPatch is reversed.
Comment #3
Robbert CreditAttribution: Robbert commentedRevised patch.
Comment #4
Robbert CreditAttribution: Robbert commentedI 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
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 usingnumber_format
since CSS expects periods as decimal separators and we do not want one's localization settings breaking it.Comment #5
sdboyer CreditAttribution: sdboyer commentedNice catch there, Robbert. Tested and it works, so committed. Thanks!