Messages écrits par Patrick Malley

Surely, the base theme should not be making an assumption like 'centre everything', which is one of the things that makes theming Moodle 1.9 a real pain (if you want a left-aligned theme).


The participants table is a large table that should take up at least 85% of the width of the content and have equal space to the left and right of the theme. The current base theme does not set an alignment and does not set a width for this table. Therefore, it has to be set in the new theme.

I can go about this in one of multiple ways:

1.) I can add such common layout styles directly to the Base core.css (or otherwise appropriate) stylesheet.
2.) I can create a new theme (base+) that is based on the Base theme and build ALL of my themes off that (this seems like a strange choice to me but will be necessary considering the amount of coding necessary to get base ready to actually work as a starting point for projects).
3.) I can create new stylesheets for these new layout elements. That way, if a theme developer wants to exclude my centering (or other elements) they can exclude them from the styles.
Moyenne des évaluations Useful (1)
It looks like Standard is sticking around, but only as one of many other theme options.

Per my understanding and Martin's comments below: you can use any theme as a parent theme. I will be basing all of my initial core themes on Base alone. I advise you to do the same until we get some more themes in place. Then, let's say you like Boxxie, but want to see it in Magenta and with a different layout, then you can do that with Boxxie as a parent.

The documentation should be clear on this flexibility to choose any theme as a parent.

Hope that's more clear.
My feeling is just that Base is a little too basic as it currently is. It should include all styles to ensure that the layout is consistent (for example, tables and forms should be centered, margins should be appropriate, etc.). I realize there is a fine line here, but it's something I will work on, for sure.

I'd ideally like Base to be complete enough that all one has to do is select it as a parent theme, and code the broader parts of Moodle to effect greater change. As is, I'm having to check every single module and am finding a lot of strange presentation that is not set in Base or the module.

Therefore, here's my proposed course of action for my next theme:

1.) I'll start coding on top of the Base theme.
2.) When I encounter something that should just be part of Base (for example, the participants table not being centered at all), I'll add it there instead of my theme.
3.) When I encounter something inside a module that should be part of the module "base" styles, I'll add that to the the module's styles.css file.

Theme developers: It's absolutely crucial that you file bugs and improvements as you find them. My work over the weekend uncovered a lot of things that need fixing/improving. If there is no ticket in the tracker, I can't promise I'll find them. So, as you're working, if you say to yourself, "Hey, there are two .generalbox divs on the same page without any way of distinguishing between them. I'd really like to style this .generalbox and not that one. This div needs a class or id.) Submit it!

Also, note that Boxxie will probably be recoded once I have this second theme complete. Our goal is 20 themes in the core - some of them will have to be created by you, but all of them should be based on "Base" so that I can fix major issues with a single fix to a single theme. If you're developing a theme and you realize that you are frequently adding this one bit of CSS, let me know by filing a ticket so we can discuss the merit/problems with adding it to Base.

There are my general thoughts, rambling though they are. Please developers, let me know your thoughts soon so I can continue working. Thanks!
Moyenne des évaluations Useful (3)
I spent a lot of time this weekend working on my Boxxie theme, which will be included in the core. This is basically my 1.9 theme "Greenie" renamed to accommodate difference colors down the road. The amount of time I invested was silly and I still haven't made it through all of the modules. There's clearly a lot of work yet to do on the base theme. Or, is there?

A lot of issues I found myself fixing were in relation to layout and structure. Here are my biggest question:

1.) As I work through my themes, should I be basing them on just "base" or should I base them of both base and Standard?

If the latter, then why have a base?

If the Base theme is to be a starter theme, it should include all essential styles to make the installation work correctly. If the Base theme is to be the starter theme, then I know I'll just add my fixes to it as I work this summer. Others can file bugs for me to fix it if necessary as they find it. This way, I won't have to update 20 themes with one fix down the road. Right?

One more question:

2.) Should module and block layout issues be resolved in their own styles.css file? I'm pretty sure the answer here is yes, but I thought I should ask.
Moyenne des évaluations  -