Code: Select all
<style type="text/css" media="screen">
<!--
@import url("css/base.css");
-->
</style>
<!--[if IE 6]><link href="css/ie6.css" rel="stylesheet" type="text/css"><![endif]-->
<!--[if IE 5]><link href="css/ie5.css" rel="stylesheet" type="text/css"><![endif]-->
<link rel="stylesheet" type="text/css" href="css/print.css" media="print" />
while i can upload (via file manager) the ones referenced in the non-standard way, and can reference them directly in a template, i cannot edit them in the admin interface.
possible to support these alternate methods? perhaps radio button or pull-down selection (when you bring up a stylesheet for editing) for the options such as: "link" (the 'normal' way), "@import" (the more-or-less accepted way to hide a stylesheet from <=v4 browsers), "@import url" (same as 'import' but ie4 understands it) and conditionals (yes, proprietary microsoft junk, but it's the best way to spoon-feed styles to their inadequate browsers), such as "IE 6" and "IE 5" (and just "IE".. i suppose there'll be an "IE 7" at some point too). the selected option, of course, tells cmsms how to insert the stylesheet into the code.
i can see the process going something like this: code examines the attached stylesheets, in order. starting with the first, all consecutive ones linked the same way and using the same media get combined, in order, and inserted into the template. then on to the next one that's different and repeat. the admin interface would ensure that @imports are listed first and maybe suggests that print media ones are last in order and follow handheld and projection ones.
there are so many different ways to reference a stylesheet, it's probably not feasible to support them all. however, they are well documented (see top part of http://www.dithered.com/css_filters/css_only/index.php ), so it may not be too much to support them all and even reference the target/hidden browsers for each method. the syntax and other info could be stored in the database for easier additions and updates down the road (the same block of php code should be able to work with any of the methods).
i don't know of any other cms packages that can handle stylesheets internally using a variety of methods like this. people usually have to resort to hard-coding them into their templates when they need to use one of the other methods. not that big a deal when the server is sitting at your desk, but when the web interface is the best way you've got (or only way for some).. then it's nice to be able to handle any layout or design right in the browser.
this would need to be in addition to being able to specify what order stylesheets get applied (because @import'ed ones go first); which is something i noticed earlier as missing from the current version.
unfortunately my php skills are not up to par to do this, best i can do is offer the idea and how i picture it working.