From: Shaun M. <sh...@ae...> - 2004-08-07 19:30:03
|
On 7 Aug 2004, at 16:14, Mike Noyes wrote: > > Shaun, > Let me preface my comments with: I'm no CSS expert. However, type > selectors are the major method for styling. Unlike class and ID > selectors, type selectors don't require style calls in the html markup. > > http://css.maxdesign.com.au/selectutorial/selectors_type.htm > "The most common and easy to understand selectors are type > selectors." > They are correct and it's why they should be used wherever possible. > In addition, the vast majority of stylesheets I've looked at use type > selectors to correct browser inconsistencies. Example (viewport): > > html, body {margin: 0; padding: 0} > That's wrong. You aren't 'correcting' a browser inconsistency there, you're replacing inconsistent behaviour of the browsers to something that will be consistent. I agree that html, body {margin: 0; padding: 0} is good though I don't think that should be enforced if a designer doesn't want to use it. God forbid there's any Netscape 4.7 users around but you might have to design a consistent interface for that as well as other browsers. Some government bodies were still speccing 4.7 support last I was involved with one. > >> I'd tighten up on where they are used in the templates but not in >> defining their looks at all. That's not the aim for core styles. > > It sounds like we may have a different view. Let me attempt to explain > my view. > > Core style is global in scope and limited in size. Core is > defined in the persistent stylesheet. > > Do we agree so far? > Not really but I think it's mostly because you want to define a standard to replace the HTML standard set whereas I'm not really bothered with that at all and want to add to it, not alter it per se. > Core style uses type selectors where possible to define element > presentation, and correct browser inconsistencies. You mentioned http://www.w3.org/TR/REC-CSS2/sample.html as the basis of a core persistent style sheet. I don't know a single browser that doesn't implement that already so why should we ship it and users download it? OK, we could correct a few IE bugs like centering, perhaps even box models but it's a big hunk of css for little reason IMHO. I really think that's an entirely different discussion. > We may have some semantic differences above. I believe the following > section is what you're concerned with. > > Site specific styles (themes) will be defined in the default > and > alternate stylesheets. Default style will use div descendant > selectors to provide style blocks for menu, module, image > float, > etc. use. Class/ID types used in phpwebsite will be written > down > for module and theme developer reference. > That's the discussion. I just want to avoid inconsistent style, which means defining one. We're still going to need to define some classes as you can't do everything with descendent type selectors. eg. You can make tree menus, tab menus and breadcrumbs all with ul/li but you'd still need three classes. I want to define those classes so they are available in a base definition that theme developers can adhere to. > > Agreed, provided you're not suggesting adoption of a template system > like smarty. > Er, no. Having just suggested Sigma to Matt for 0.94 and getting that through I'll stick there. ;-) >> > > Are you suggesting a best practices document? > [shivers] No I hate that phrase. Reminds me of when I was an ISO9001 Auditor. But I guess so. I notice the term 'best practice' only appears in the Perl docs on Apple's developer docs site. I'll crack on with a review of the UI next week, identify and report. Then we can talk UI guidelines and how they are implemented such that we've a rich UI experience with as least hassle for developers, admins and designers as possible. Shaun aegis design - http://www.aegisdesign.co.uk |