The content in the "main page content" block already has its own wrapping divs, whether its the node or panel or View, whatever. Adding a block wrapper around it is redundant.

The content region is already placed in a div#content so that can be placed in the same column as the title, help, tabs, etc. So adding a region wrapper around the content is also redundant.

We can easily get rid of these wrappers by creating a region--bare.tpl.php and a block--bare.tpl.php that have been stripped of their wrapping divs and then adding a template suggestion for the main page content block and content region.

Comments

JohnAlbin’s picture

Status: Fixed » Closed (fixed)

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

OnkelTem’s picture

Component: CSS/SASS/HTML markup » layout.css
Status: Active » Closed (fixed)

The content in the "main page content" block already has its own wrapping divs, whether its the node or panel or View, whatever. Adding a block wrapper around it is redundant.

But removing the block wrapper makes it impossible to address Any content or how it is supposed to stylize #content insides?

The content region is already placed in a div#content so that can be placed in the same column as the title, help, tabs, etc. So adding a region wrapper around the content is also redundant.

"title, help, tabs" as you said - have their names and addressable. Now after removing the wrapper content becomes the only anonymous entity.

In short, this breaks everything which relies on existence of ".region-content". For example, the only place where a custom contextual links could be attached is .region-content. Now after this is removed, things like http://drupal.org/sandbox/onkeltem/1730244 have no chances to survive... in sake of this rationalization effort. I vote for not removing region-content.

OnkelTem’s picture

Component: CSS/HTML markup » layout.css
Status: Closed (fixed) » Active
OnkelTem’s picture

Component: layout.css » CSS/SASS/HTML markup
echoz’s picture

Component: layout.css » CSS/SASS/HTML markup
Status: Closed (fixed) » Active

We can easily get rid of these wrappers by creating a region--bare.tpl.php and a block--bare.tpl.php that have been stripped of their wrapping divs and then adding a template suggestion for the main page content block and content region.

Doesn't this give you what you need?

OnkelTem’s picture

Doesn't this give you what you need?

I don't mean that overriding has any difficulties, just wonder why this is by default.

echoz’s picture

Status: Active » Fixed

My understanding of this is to lighten up the markup.

OnkelTem’s picture

My understanding of this is to lighten up the markup.

Then why not to lighten it more and remove half of standard Drupal HTML? I still don't get how to address content without .region-content.

Status: Fixed » Closed (fixed)

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