Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Couldn't get my IE css loaded.
Apparently adding ie_stylesheets[screen][(lt IE 9)&(!IEMobile 7)][] = css/cbsa-lt-ie9.css
in the .info file is not working in OMEGA.
Needed to code it as follows
<?php
function mythemename_preprocess_html(&$variables) {
drupal_add_css(drupal_get_path('theme', 'mythemename') . '/css/ie-9.css', array(
'group' => CSS_THEME,
'browsers' => array(
'IE' => 'lte IE 9',
'!IE' => FALSE
),
'preprocess' => FALSE
));
}
?>
Comments
Comment #1
sylus CreditAttribution: sylus commentedYeah omega does not provide the ie_stylesheets like AdaptiveTheme did but what you did is perfectly acceptable.
I'll move this issue to Omega and see what they say if they would like to add it or not.
Comment #2
fubhy CreditAttribution: fubhy commentedIt's not worth introducing a new .info syntax for that. And if you really need it, there is a module for it. I think it's called conditional_stylesheets. We are not going to have this in 4.x I am afraid though. It's simple to do this with a little hook_preprocess() snippet as seen in the issue summary.