Add the ability for the content region to expand to the full width of the theme if the right sidebar is not present.

CommentFileSizeAuthor
#9 wide-content.diff2.24 KBmarkDrupal
#1 single-column.patch728 byteseaton

Comments

eaton’s picture

Status: Active » Needs review
StatusFileSize
new728 bytes

Here's an experimental CSS tweak that allows the theme to expand to its full width if there's no content in the right sidebar. At one point it does override the grid_* width, which is less than ideal, but it also restricts it to what's going on inside the #content div.

Anonymous’s picture

Haven't had a chance to review this yet. Will look at it this week.

Had to comment so it wouldn't close automatically before I looked at it.

daniel-san’s picture

Upon applying patch received following failure:

patching file style.css
Hunk #1 FAILED at 246.
Hunk #2 succeeded at 447 with fuzz 1 (offset -96 lines).
1 out of 2 hunks FAILED -- saving rejects to file style.css.rej

Text from style.css.rej:

***************
*** 246,251 ****
  	display: inline;
  }
  
  #sidebar-right {
  	display: inline;
  	float: right;
--- 246,259 ----
  	display: inline;
  }
  
+ body.no-sidebars #center, body.no-sidebars #center .grid_12 {
+   width: 940px;
+ }
+ 
+ body.no-sidebars #center .grid_4 {
+   width: 460px;
+ }
+ 
  #sidebar-right {
  	display: inline;
  	float: right;

Hope this helps.
Dan

Anonymous’s picture

Priority: Normal » Minor
Status: Needs review » Active

Dan,

Thanks for trying the patch. The code has changed a lot since Jeff submitted this patch, so it's not likely the patch would work as designed even if the patch applied correctly.

I'm also not sure at this point that anyone even wants this feature. Were you trying the patch because you had need of a full-width version?

Thanks,
Shannon

daniel-san’s picture

Shannon,

Yea, I would definitely want to have the theme work at full width when not using sidebars. I just haven't had the time to work on the css to make it happen. Work projects coming in front of personal, ya know.

Thanks for the information and if I get a chance to work on it, I will update what I've done to make it full width.

Take care,
Dan

Anonymous’s picture

Dan,

Since the CSS is based on a grid system, doing this at the CSS level will be nasty.

I'm planning to handle this using a deterministic approach similar to what I did with Hiroshige.

Shannon

daniel-san’s picture

Ok Shannon. Thanks for letting me know.

I really appreciate the work you guys have done on this theme.

Anonymous’s picture

Dan,

I've checked in some changes to CVS that provide a full-width layout if the sidebar isn't present. There is some weirdness in the block listing page (admin/build/block) if there is nothing in the sidebar, the region names appear below the block list. This isn't a big issue, however.

I won't roll a new release though until I've had a chance to resolve #283329: Bad CSS styles for dl, dt, and dd elements

Shannon

markDrupal’s picture

StatusFileSize
new2.24 KB

Here is a new patch that accomplishes the same thing

Anonymous’s picture

Mark,

It's not quite the same thing. Any element that has the class grid_12 needs to always be 12 columns wide. If it's 16 columns wide, it needs to have the class grid_16. The goal is to stay within the semantics of the grid system that is being used.

Anonymous’s picture

Status: Active » Fixed

This was implemented in a prior release.

Anonymous’s picture

Status: Fixed » Closed (fixed)