(See http://code.google.com/p/google-highly-open-participation-drupal/issues/...)
Original issue text:
This task is to convert Drupal’s core “bluemarine” theme to a tableless layout. This theme unfortunately still uses tables for the page layout.
Your task is to:
- Convert bluemarine to a tableless, CSS-based layout.
- Find flaws in the current design (malpositioned elements, too small margins, overflowing text, ...) and fix them.
When converting to a tableless layout, please keep in mind that bluemarine is often used as a “base theme” for creating more sophisticated designs. You will have to put particular focus on creating HTML markup and CSS code that is easy to understand and doesn’t rely on special hacks or complex neat tricks. CSS newbies shouldn’t have a hard time modifying or hacking bluemarine in order to make it suit their needs.
The final deliverable is a cross-browser compatible (IE6+, Mozilla, WebKit, Opera), CSS-only version of bluemarine in the form of a patch file. The task is considered to be sucessfully completed once this patch is marked “ready to be committed”. The patch should be created against the most recent HEAD version in CVS, not a downloadable package.
Comment | File | Size | Author |
---|---|---|---|
#36 | bluemarine-right-sidebar.zip | 19.44 KB | spangaroo |
#32 | bluemarine_to_css_4.patch | 8.36 KB | boombatower |
#29 | bluemarine_to_css_3.patch | 8.81 KB | boombatower |
#23 | bluemarine_to_css_2.patch | 8.77 KB | dvessel |
#22 | patch.txt | 7.34 KB | boombatower |
Comments
Comment #1
JirkaRybka CreditAttribution: JirkaRybka commentedOK, all fine, but I would like to suggest that we keep at least *one* tabled theme in core, to give the minimum of a choice to people, who still don't want their site's layout broken on every smaller screen/browser window, or older browser. I'm not going to elaborate here (no intention to bring up that "holly war" over again), but since I'm running 1024x768 screen, I haven't seen a single reliable tableless theme yet. Garland with 2 sidebars used breaks on core administrative pages even, so that's an example.
Let me say it again - no intention to hijack this thread. Just a small reminder, that keeping a choice between tabled/tableless might be a good idea.
Comment #2
add1sun CreditAttribution: add1sun commentedClaimed by j.boombatower
Comment #3
boombatower CreditAttribution: boombatower commentedI have converted the theme, from the HEAD, to tableless CSS. I had a few problems with IE6 related to the box model, but I believe I have everything working.
I left the previous names, for example:
header, footer
in place in hopes that any subclasses would be unchanged.I tested the theme on:
I do not have access to test the theme in WebKit, Opera without installing them, so if someone could test the theme on those two that would be great.
Comment #4
boombatower CreditAttribution: boombatower commentedI noticed some problems with the menu area when the search is enabled or sub-menus are being used. I will work on fixing those issues.
Comment #5
boombatower CreditAttribution: boombatower commentedWell, dinner gave me a few ideas which I think have fixed the problem.
Comment #6
aclight CreditAttribution: aclight commentedThe task description requires that your work be submitted as a patch to Drupal HEAD. There is a handbook with instructions for how to do this at http://drupal.org/patch/create
If you have problems making a patch, feel free to drop in to the #drupal-ghop or #drupal IRC channels on irc.freenode.net. There are usually people there willing to help you create a patch if you need it.
Also, make sure that your code follows the Drupal coding standards at http://drupal.org/coding-standards
Specifically, watch out for tabs (we use two spaces).
Comment #7
boombatower CreditAttribution: boombatower commentedI believe I fixed the coding standard issues. This is the first time I have had to generate a patch so I am not sure if this is correct.
EDIT: Looks like I accidentally changed status.
Comment #8
aclight CreditAttribution: aclight commentedWhen your patch is ready for review make sure to mark it as such (patch (code needs review)) and not as active (needs more info). That status is usually used for bug reports where someone needs more information to reproduce a problem.
Your patch also still has some tabs, so you need to fix those.
Comment #9
boombatower CreditAttribution: boombatower commentedNot sure how I missed those tabs. Sorry about that.
I hope this is what you are looking for.
Comment #10
aclight CreditAttribution: aclight commentedI'll try to review this tomorrow. But I just wanted to check to make sure that you've checked the HTML and the CSS that comes out of this to make sure that both validate correctly.
Comment #11
boombatower CreditAttribution: boombatower commentedYes, I checked them both periodically as I worked. There appears to be a spelling error in the CSS that I have fixed with this patch.
Comment #12
dvessel CreditAttribution: dvessel commentedA few notes about the direction of the change:
1.) Any classes or ID's should not be using underscores. Use dashes instead. logo_small/logo_large & columns_1/2/3
2.) I don't see a need for the different logo classes. Using it to add extra spacing when the search box is present is really needed? This was never originally checked for.
3.) The extra div wrapper within the menu container isn't needed.
4.) The #body "column_1/2/3" classes can be replaced with $body_classes by placing it within the body tag. It'll output a bunch of classes including the state of the left & right columns. This way it can be more flexible by being able to use descendant selectors for the side bars themselves instead of being limited to the center column and there would be less "logic" in the template.
5.) There a couple of instances of "vertical-align:top". It only applies to tables.
6.) Use of "body" ID deep inside the layout just seems odd. There's the page
<body>
and that can be confused easily. How about just "main-content" and removing the "main" ID wrapper.7.) How about using holy grail layout or anything else proven to work reliably. The conversion currently breaks in IE7 with the right column clearing past the main content. Looks fine in IE6. Would be nice to keep the widths of the side bars fixed. Resizing the window can really make things ugly when using percentages. Main content area should be fluid though of course.
Comment #13
boombatower CreditAttribution: boombatower commentedComment #14
boombatower CreditAttribution: boombatower commentedI changed everything you mentioned and believe this is what you asked for.
Comment #15
dvessel CreditAttribution: dvessel commentedBoombatower, this looks great. One little problem though. There must be an extra wrapper for the columns so IE6 calculates the positioning properly on load. With your latest patch, the left column pushes into the main content area. Resizing the window snaps it back into place. Just another odd quirk.
Somehow, providing the wrapper helps IE6 calculate it correctly.
Your current patch: (bad for ie6)
This works:
Then add the padding to
.column-layout
instead of<body>
. This will definitely fix it. I'd say it will be RTBC after that.The only other minor problem is that the columns don't extend down the length of the page but I think that can be done in a follow up patch by someone else. It does make it more hackish though so I'm not sure what others will think about that.
Comment #16
boombatower CreditAttribution: boombatower commentedInteresting that the holy grail layout layout doesn't work on IE6. My previous layout worked on 6, but not 7. Oh, the wonders of IE, always making life easier.
I made the changes that you requested. As for the the columns not extending I mentioned that in point 7 of #13. That is the main problem I have found with tableless layouts. The only fixes I have seen for that require JavaScript (yet another hack).
Note: By adding that wrapper it removes three of the layout css declarations, making it much easier to modify.
Comment #17
dvessel CreditAttribution: dvessel commentedForgot to mention that it will also need a IE7 hack with the change I mentioned above.
It cannot be seen by IE6 or it'll break that. It's looking hackish but it's only two selectors, one for each version of IE. Not sure it warrants extra style sheets for conditional includes.
[edit: I'll add this myself as I'm testing. Thanks.]
Comment #18
boombatower CreditAttribution: boombatower commentedI'm not exactly sure what I'm supposed to do, that is why I haven't responded. Do we just need to decide on some conditional CSS or what?
Comment #19
dvessel CreditAttribution: dvessel commentedSorry for the delay boombatower. There were serious issues with LTR layout in IE6/7 with the holy grail technique.
I'm not sure I'm allowed to do this (since it's assigned to you) but here's a patch. Tested with IE7, IE6 and Safari in both language directions. If another can verify that it's solid with FF and Opera, I think it'll be ready for commit.
Boombatower, if you see any other issues with this I'll leave it up to you. I just didn't want to go in cycles endlessly with this type of issue. :: curses IE ::
btw, the IE hacks have been removed. No longer necessary.
Comment #20
boombatower CreditAttribution: boombatower commentedWorks in Firefox, but it seems you increased the header size. If that is alright it seems to work on my end.
Comment #21
dvessel CreditAttribution: dvessel commentedHow about fixing that. And I'll mark it ready. ;)
Comment #22
boombatower CreditAttribution: boombatower commentedI just changed it slightly.
Comment #23
dvessel CreditAttribution: dvessel commentedThere was another issue with the RTL layout for both IE versions where the logo, name and slogan would get cut off. The only fix I could find was to do a little dirty trick of setting a width for the container of those elements and using negative margins. Not fool proof though. ..sigh
It's either that or the header positioning must change. Without knowing the exact width of the slogan, name and navigation links makes it extremely tricky.
Here are a few screen shots for four browsers in both LTR and RTL layouts screen shots.
Comment #24
boombatower CreditAttribution: boombatower commentedSo where do we stand and is there anything else I need to do?
Comment #25
dvessel CreditAttribution: dvessel commentedboombatower: fix any other issues you find. We need a third person here to verify to mark it RTBC.
Comment #26
dvessel CreditAttribution: dvessel commentedCould we get someone to review this please? boombatower needs to move on.
Comment #27
aclight CreditAttribution: aclight commentedThe only issue I see is that the description of the theme still says:
So since this is no longer table based, that needs to be changed. I think that's done in the .info file of the theme.
After that's fixed I would say RTBC and the student gets credit.
Comment #28
dvessel CreditAttribution: dvessel commentedSounds good. Patch boombatower?
Comment #29
boombatower CreditAttribution: boombatower commentedI changed the
.info
file to reflect the fact that the theme is no longer using tables.This patch includes that change along with the other changes required to convert the theme to a tableless format.
Comment #30
webchickOk. This last patch addresses aclight's concern. Marking RTBC here, and closed on the Google tracker. Thanks!!
Could you please upload your final patch to http://code.google.com/p/google-highly-open-participation-drupal/issues/... as well?
Comment #31
Dries CreditAttribution: Dries commentedUnfortunately, this patch no longer applies to CVS HEAD. Please re-roll. Thanks.
Comment #32
boombatower CreditAttribution: boombatower commentedRe-rolled. The page template fits on a page now ;)
Comment #33
Dries CreditAttribution: Dries commentedI've added an entry to the CHANGELOG.txt and committed this to CVS HEAD. Job wel done.
Comment #34
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #35
ravisagar CreditAttribution: ravisagar commentedWhen I applied the patch using patch -p0 < bluemarine_to_css_4.patch I got the following error. Am I doing anything wrong.
patching file themes/bluemarine/page.tpl.php
Hunk #1 FAILED at 11.
1 out of 1 hunk FAILED -- saving rejects to file themes/bluemarine/p age.tpl.php.rej
patching file themes/bluemarine/style.css
Hunk #2 FAILED at 70.
Hunk #3 FAILED at 198.
2 out of 4 hunks FAILED -- saving rejects to file themes/bluemarine/ style.css.rej
can't find file to patch at input line 272
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: themes/bluemarine/style-rtl.css
|===================================================================
|RCS file: /cvs/drupal/drupal/themes/bluemarine/style-rtl.css,v
|retrieving revision 1.5
|diff -u -r1.5 style-rtl.css
|--- themes/bluemarine/style-rtl.css 17 Dec 2007 15:05:09 -0000 1 .5
|+++ themes/bluemarine/style-rtl.css 6 May 2008 22:53:51 -0000
--------------------------
File to patch:
Comment #36
spangaroo CreditAttribution: spangaroo commentedThank you to j.boombatower for designing a great tableless bluemarine theme. He also took the time to forward the complete theme which I thought was very kind.
I modified the template because I needed the sidebar floated to the right. It seems to work okay in IE7, FF 3.0.9, and Safari 3.2.1.
Modding the CSS is still new to me so if you find any layout problems please let me know because I'm interested in improving if I can.