Something I would find useful for CSS in the future. Maybe in version 4 (due some time in 2100?).
#content {
p {
color:#999999;
}
a {
text-decoration:none;
color:#333333;
}
a:hover {
text-decoration:underline
color:#666666;
}
}
In other words, CSS super classes / IDs. This would be really good for situations when you have a load of definitions that all target the same ID or class at the root (like the #content ID above). This could be extended to include files:
Sometimes I have wanted to make some simple changes to a drupal theme based on the current root path. The sections module does this, but I wanted a simpler way of changing elements in the CSS based on the current root path.
function _phptemplate_variables($hook, $vars = array()) {
switch ($hook) {
case 'page':
if (module_exists('path')) {
$alias = drupal_get_path_alias($_GET['q']);
if ($alias != $_GET['q']) {
foreach (explode('/', $alias) as $path_part) {
$classes[] = $path_part;
}
}