Theme using ONLY CSS

Theme using ONLY CSS

by Dirk Herr-Hoyman -
Number of replies: 11
I'd like to see a Theme that does all the work using ONLY CSS.
It's now possible, with contemporary web browsers, to completely eliminate
tables for alignment purposes. See http://www.csszengarden.com
for a how far you can push this.

I do recognize this is a non-trivial change. The current Theme aproach would not
be enough. Changing how Blocks work, I think that's the biggest change.

If we did do this, I could make my designers VERY HAPPY. They've got some
very nice designs, one that we are trying to figure out how to make work with
Moodle right NOW.

Thoughts?
Average of ratings: -
In reply to Dirk Herr-Hoyman

Re: Theme using ONLY CSS

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
All been discussed many times ... try searching the forums for Templates (and also see this oldish plan). This is the next stage after the current huge XHTML conversion that we have made from 1.4, and will allow a complete set of templates to be created without tables if one wishes.

But don't get too carried away by the pretty pictures in the Zen Garden ... that all-out tableless approach breaks a lot of stuff too. A huge amount is possible with the current CSS in 1.5 - no one is really tapping it yet and making really high-level beautiful images to take advantage of all the hooks we have.
In reply to Martin Dougiamas

Re: Theme using ONLY CSS

by Dirk Herr-Hoyman -
Got it. Sounds like tables are still de rigour for a while.
That's ok, tables are like a safety net smile

I will suggest that our designer use CSS within the bounds of what's
setup in 1.5 for the overall layout considerations.

I don't see a naming an obvious naming convension for the CSS styles.
One that would make it clear "these styles are for Moodle" or
"these styles are used by our content". The easiest thing to do is
use a prefix for locally defined styles. Like "x-" is used for MIME types.
Or "mdl_" is used on db tables by default.
Do you have any suggestion here, Martin?

In reply to Dirk Herr-Hoyman

Re: Theme using ONLY CSS

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Well, it's not changing at this stage! smile

We use short obvious names for class names, and combine them like .forumpost .content .commands. There are classes for each module and each class, and a unique ID for each page as well.  A very useful tool for identifying the class names is the Web Developer extension for Firefox/Mozilla - with it all the names can be shown inline.

You can name your own styles whatever you wish.
In reply to Martin Dougiamas

Re: Theme using ONLY CSS

by Dirk Herr-Hoyman -
What I have in mind is to build Themes for more specific places.
Like for a specific course.
Here are some example of course designs
http://doit.wisc.edu/faculty/support/development/demos.asp
French and Italian Lit is a good one to ponder.

Applying a new set of CSS styles, ones that don't interfer
with the ones Moodle has set already, is what I'm after.
For the names already used (which will OF COURSE smile make
it into some yet-to-be-created documentation), we avoid
them. Or if we want to take over and redo an existing one,
well then we do that.

As one starts to ponder what it means to have granular "learning objects",
and to apply design "templates" to them, you can see where having
some sort of naming convension makes sense.
In reply to Dirk Herr-Hoyman

Re: Theme using ONLY CSS

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Themes that approximate these examples are certainly possible.

Note that Moodle 1.5 supports course themes as well as user themes, so all you need to do is select the theme from the course settings menu. Each PAGE is in fact addressable using a consistent naming scheme drawn from the URL, so you can have a whole new theme for each specific page in a specific course if you want.

So you don't need to add new CSS styles to change any of the Moodle pages. Should you wish to define new styles for some specific content pages you have then yes, by all means add a prefix to them. It doesn't matter what the prefix is, you could use 'wisc_' for example.

Does that help?
In reply to Martin Dougiamas

Re: Theme using ONLY CSS

by Dirk Herr-Hoyman -
Yes, this is just what I wanted to hear. Just enough already done in 1.5 to launch off into a new realm!

We are just about to look at how to implement a design for a new project.
One that has a bunch of lessons for speech therapists, this has US FIPSE
grant funding and will be distributed to multiple institutions, it's called SIMPLE.

Along with the design considerations, SIMPLE needs to deal with a "mastery of learning" approach. Only get to move on if you master the concepts. It's very much in the mold of SCORM simple sequencing, and perhaps we'll implement that little thing too smile
In reply to Dirk Herr-Hoyman

Re: Theme using ONLY CSS

by Michael Penney -
Cool sounding project, Dirk!

Are you planning on adding features to Moodle lesson for the lessons?

Here's an example of a course we built putting a textbook online, w/video, audio, etc.

Flow

Login as guest.

We wrote a good deal of the new features now in lesson 1.5 for this project (though it is still in 1.3 smile)

In any event, one thing that would be a cool addition to lesson would be SCORM export, as lesson feature set already meets alot of SCORM structure. Another thing would be direct connection to quiz question pools from w/in lesson.

In reply to Michael Penney

Re: Theme using ONLY CSS

by Dirk Herr-Hoyman -
Bingo, Flow is very much what we have in mind for SIMPLE
Actually, I had to pinch myself, this is very close to the static
HTML mockups for SIMPLE done by the same designers that did examples
I was showing earlier.

What we want to do with SCORM SS is to build up the "nodes in a tree"
style course. So far, what Moodle does is either linear (topic or weekly)
or no structure (social). The linear format is a "node in a list", a 1-d construct.

In the SCORM SS you have a set of lessons (nodes) which are connected
by the SS rules (an XML rule set). The rules look at the results from doing a node or
a sub-tree under that node.

Did check with the ADL Colab (in Madison) last week,
there aren't any open source SS engines out there that are better than the ADL reference implementation. That's done in Java and probably won't scale all that well. Still, this could work well enough for low usage scenarios, which would fit our
speech theraphy professional training need. That does mean we'd have to
weave in Axis and fire up the SS engine separately in Tomcat. There to be done within PHP and Apache.

Guess I/we should look at the 1.5 Lesson next...

Oh, a bit more on the SIMPLE project and where we are thinking of going with Moodle. We are looking for a nomadic style of usage for the user. This would run on your desktop. Could run either connected or disconnected to the Internet, that's sometimes called Nomadic.
The students use this from their desktop, including login. It's a stripped down CMS,
only need to do the lessons and send the results off as they are completed. Now, the results get sent only when connected. What this means is you could send the whole darn thing on a DVD. Media rich lessons and the software to run it.
The sending of the data, that we are looking at doing with a Web Service.
The new one from the IMS Tools Interoperability working group, which is only about 2 weeks old smile. This would carry the "results".

So far, what runs on the desktop looks like Moodle. Configured just for this use.
Including the Java WS.
Where do the results go? Well, how about to a Moodle somewhere else.
That's where the instructors would be looking.

Now all we have to do is meet the July demo deadline for our customer big grin
In reply to Dirk Herr-Hoyman

Re: Theme using ONLY CSS

by Michael Penney -
Thoughts?

Use tables for blocking out the main content areassmile.

Even CSS Zen garden can't get it right yet with only CSS (see attached).




Attachment zengardencssoops.gif
In reply to Michael Penney

Re: Theme using ONLY CSS

by Timothy Takemoto -

I could not get it to do that in I.E.
http://www.csszengarden.com/
Not that I hate tables so much.
One problem (or advantage? not) with CSS seems to be that it makes it very difficult to copy. Try copying the central column of the above site.

In reply to Timothy Takemoto

Re: Theme using ONLY CSS

by Michael Penney -

The Road to Enlightenment

Littering a dark and dreary road lay the past relics of browser-specific tags, incompatible DOMs, and broken CSS support.


Hmm, it all copies fine in Netscape/XP.

And right click/view selection source:

<div id="preamble">
<h3><span>The Road to Enlightenment</span></h3>
<p class="p1"><span>Littering a dark and dreary road lay the past relics of browser-specific tags, incompatible <acronym title="Document Object Model">DOM</acronym>s, and broken <acronym title="Cascading Style Sheets">CSS</acronym> support.</span></p>
<p class="p2"><span>Today,
we must clear the mind of past practices. Web enlightenment has been
achieved thanks to the tireless efforts of folk like the <acronym title="World Wide Web Consortium">W3C</acronym>, <acronym title="Web Standards Project">WaSP</acronym> and the major browser creators.</span></p>
			<p class="p3"><span>The
css Zen Garden invites you to relax and meditate on the important
lessons of the masters. Begin to see with clarity. Learn to use the
(yet to be) time-honored techniques in new and invigorating fashion.
Become one with the web.</span></p>
</div>

I've noticed that sometimes when you can't copy something in IE, it's more  because of the way IE "handles" CSS than b/c of a planned feature of CSSsmile. For instance that this (login as guest)

http://iucn.ffof.org/cms/mod/lesson/view.php?id=15

doesn't copy in IE is an IE bug, not a feauresmile (on the other hand, that floating drop down menu made us glad that the client didn't care about NS and liked the fact that it was hard to copy in IEsmile.