Here is how it currently works:
- Moodle works out which blocks will be visible in, say, the left column.
- It then asks each of those blocks what it's 'preferred_width' is. (At this point, almost every block answers 180(px), looking through core code and contrib, other responses (with number of blocks that give that response) are 210 (8), 250 (2), 210 (2), 170 (1), 140 (1))
- Then it asks the theme if it wants to put any limit of the size of the blocks columns. Most themes use the default min = 100, max = 210. The two exceptions in core+contrib are anomaly: min = max = 200, and customcorners: min = max = 180. - Oh, except for the places where it does not bother the consult the theme, and instead hard-codes min = 180, max = 210.
- Then Moodle computes the actual width of the column as max(preferred widths from 2), but limited to be within the min and max given by the theme.
What does Moodel actually do with this number? Well, if this is a page that is still using horrible old-style tables for layout, then that width in pixels goes on the td for that blocks column as a style="width: NNNpx;" attribute.
However, on pages that have been converted to divs, like course/format/weeks/format.php, then that number is ignored, and instead in the theme we have
.weeks-format #left-column {
width: 11.5em;
}
in the theme CSS.
So, the whole seems pretty pointless these days, especially since page layouts in terms of px are not that sensible if you want things to work nicely when users change the font size.
I plan to just remove all this complication, and just the the theme decide how wide the columns should be in its CSS. Does anyone have a problem with that?