For some reason, the admin block (from the admin.module) is not displayed properly when an aurora theme is enabled. See the two attached screenshots demonstrating the effect. I checked the CSS but wasn't able to figure out what's wrong. Any idea?

Comments

Snugug’s picture

Status: Active » Fixed

My immediate guess is that Admin module is built using the Content Box box model, whereas Aurora applies * {box-sizing: border-box;} at the top of your stylesheet. Border box is the better box model for RWD as it keeps padding and borders inside the defined height/width of the given element instead of pushing the height/width out. While this is very distinctly a feature and not a bug, I can see how it can be thought of as a bug. The next version of the Aurora gem (and hence future new subthemes) will make it more clear how to choose whether or not you'd like this CSS included, and how to convert old themes to use the new options, but for the time being, I'd suggest the following fix:

Assuming the Admin module's widget includes an overall wrapper with an ID of something like #admin, add the following to your CSS:

#admin, #admin * {@include box-sizing('border-box');}

It's ugly CSS, and it uses the * selector in the bad way, but it's the best I can offer at the moment while still providing the better box model out of the box for everything else.

jurgenhaas’s picture

This is amazing. A good guess in the first place and it demonstrates the power of the concept of compass. Thank you so much.

The proposed solution however wasn't perfect so for the sake of future reference, here is how it should look like:

#admin-toolbar, #admin-toolbar * {@include box-sizing('content-box');}

So, the selector is #admin-toolbar and the box-size is content-box instead of border-box

Thank you so much @Snugug, this is really great.

Snugug’s picture

Status: Fixed » Closed (fixed)

Glad that fixed it for you, thanks for posting the correct selector for future reference (wasn't sure what selector they used). Marking as closed.