Ok, this is bodgey.
// If this is today, make it a different color and show a border.
echo '
<td style="height: ', $calendar_data['size'] == 'small' ? '20' : '100', 'px; padding: 2px;', $calendar_data['size'] == 'small' ? 'font-size: x-small;' : '', '" class="', $day['is_today'] ? 'calendar_today' : 'windowbg', ' days">';
There is no need to force inline styles there. No need for $calendar_data['size'] to handle it either. It can be handled via css, which will be more flexible and better for teh performance anxiety.
ETA: It's easy to style this stuff just by using #main_grid or #month_grid.
Me fix. Just sayin'. 
ETA again: On second thought, I think I'll leave the calendar shiz for the moment as it will just derail me from other stuff. If anyone else wants to have a crack.... 
or I can fix it later. Whatever works.