I just became aware of the awesomeness of box-sizing: border-box CSS property. If you set that then then any padding or border specified on an element is laid out and drawn inside this specified width and height, instead of outside the specified width and height as normal CSS 2.1's traditional box model works.

Previously, we had a giant warning comment not to touch the padding on any columns because it would cause way too much math to be needed. Seriously. To make the math much simpler, we always put an "inner" div inside the column's div so that a border or padding could be added there instead. This made the markup fatter than ideal.

So can we use this everywhere? http://caniuse.com/css3-boxsizing says the only sore spot is IE7 and lower. However… now that we have the .ie7 and .ie6 classes available to us in Zen 7.x-5.x, we can compensate for that.

Comments

JohnAlbin’s picture

Status: Active » Fixed

Fixed! http://drupalcode.org/project/zen.git/commitdiff/a648579?hp=5e7d645c5832...

This commit gets rid of a lot of wrapper divs too.

barraponto’s picture

Good bye, wrapper divs!

JohnAlbin’s picture

Yeah, those poor wrapper divs. I argued vehemently to leave them in for so long. But Drupal has enough wrappers now. Those page wrappers just aren't needed anymore.

/me wipes a tear.

pgrady_’s picture

This is super exciting and awesome!

JohnAlbin’s picture

I should note that there are fewer IE7 users worldwide than there are IE6 users. And that most IE6 users are Chinese using pirated versions of WinXP pre-Service Pack 2 and they can't upgrade their IE browser without upgrading the OS to Service Pack 2 which includes anti-piracy software.

There are also more mobile users than IE6 and IE7 users combined. So it makes sense to drop support for IE6 and IE7 in exchange for mobile support. (box-sizing: border-box makes creating fluid grids easy.)

barraponto’s picture

@JohnAlbin: really? I see pirate copies of Windows all over Brazil. And they have never been prevented from upgrading to SP2+ or even Vista (ugh) or 7. Although, of course, you can just help people install Ubuntu.

Status: Fixed » Closed (fixed)

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