From: Mike N. <mh...@us...> - 2004-08-30 19:26:52
|
On Mon, 2004-08-30 at 04:49, Shaun Murray wrote: > On 29 Aug 2004, at 21:21, Mike Noyes wrote: > You can still have <ul class="menuman horizontal"> if you want. It > makes more sense than using divs to me most of the time although it may > not fit in with getting it to work easily with phpWebSite. Shaun, Prefixing selectors that originate in module css thus making a descendant selector module set, is the main thrust of this proposal (e.g. .pagemaster, .menuman). I agree I probably went overboard with div, but I wanted to show structure in the prof-of-concept. > I also wonder what happens when you've got multiple templates? eg. > Announce has a view_small.tpl and a view.tpl which both have menus in. > Do you define two classes so that each template view can be styled > differently? Using the module name wouldn't let you have two different > menu styles defined so I guess you'd have to use a content variable as > the class? That's left to the module developer. They have three choices: A) Use a style defined in another module Note: core modules are the only ones guaranteed to be available in all installs. B) Use a style defined in another module, and modify it. C) Create a new style > I agree, but I'm trying to make them non-module-specific. I want to > avoid having to define a 'horizontal' class for every module. It should > be defined just once and work through all modules unless the theme > designer has chosen to override them specifically for a module by > building in an extra style sheet for the theme or module. Ah. We differ here in structure. > I really think we should avoid as much as possible multiple > spreadsheets. I really, really, really don't want the default behaviour > to be that module developers have to provide a stylesheet by default. > The problem with that is that you're then setting a precedent that the > style is set locally in the module and not globally by default so each > module developer will set their styles up differently to each other. > Whereas that's powerful, it's also hard work for a theme designer, site > maintainer and prone to errors. It's a lot of duplication too. How much duplication we experience is a function of coordination/cooperation. If all the css is contained in preferred and persistent style sheets, how would additional module installation or upgrade be handled? For a dynamic modular cms to function, I believe module style sheets are necessary. > That gives you basic functionality with no theme stylesheet and no > module stylesheets - ie. just one stylesheet. It's then easily > overridden for different media, like print or PDAs. Can you work up a prof-of-concept for this structure? > "horizontal" isn't a very good gobal classname, no. I just used yours > so you knew what I meant. I think you might have persistent and > preferred the wrong way round also as preferred.css looked more like a > persistent to me. ;-) I'm still trying to figure out what styles belong in each. The main thing is making sure alternate stylesheets work for WAI purposes. > With menus, I think it's something that should be as global as the > boxstyles templates so that you can style menus in one place and they > get used everywhere. If you want something special for a module then > they can have your own module menustyles although I imagine if they are > nice enough, they'd make their way into the global menustyles. In my proposal menumaker.css specifies default menu style sets/types. Unfortunately, menumaker isn't a core module. > > I'm still learning things about cascade, so I might well be wrong. > > Who isn't? I spent ages last week designing some css only to find I > couldn't get it to work on Internet Explorer again. Most annoying. Then > came across a new css hack I'd not seen before. CSS isn't simple so we > have a duty to make it as simple as possible. Agreed. > I'm messing around with different menu styles at the moment, showing > what can be done with a simple unordered list and working out menu > states and if you need other classes. I think you need an 'active' > class and a 'first' or 'last' class at least. It might get more complex > with multi-level too. I was hoping to have this finished a while ago > but paying work got in the way. > > http://www.aegisdesign.co.uk/examples/pwsmenu/ > > The html is exactly the same on each variant bar a class name for the > ul, only the css changes. > It's not then too much of a stretch to imagine a php function > generating the html from a template when passed an array and a menu > template name. The html is in /templates along with lists and > img_gallery. I think perhaps boxstyles should be in /templates also if > we're tying the whole thing up.. This is a very good example for menuman.css. -- Mike Noyes <mhnoyes at users.sourceforge.net> http://sourceforge.net/users/mhnoyes/ SF.net Projects: ffl, leaf, phpwebsite, phpwebsite-comm, sitedocs |