I'm using a subtheme of Corolla 2.x and sometimes my main column is narrowed. It's about half the normal size.
This is because on my site adaptivetheme/adaptivetheme/css/at.layout.css is called after the generated file files/at_css/mycorollasubtheme.responsive.layout.css with my settings.
adaptivetheme/adaptivetheme/css/at.layout.css contains the following CSS statement:
.sidebar-first .content-inner {
margin-left: 180px;
}
This adds always a big left margin if the order of the CSS files is reversed.
I'm using a workaround to avoid this problem in my subtheme. I've added the following section in mycorollasubtheme_preprocess_html().
// Copied from adaptivetheme/adaptivetheme/inc/template.process.inc adaptivetheme_preprocess_html()
// Load the media queries layout CSS files
global $theme;
$filename = $theme . '_mediaqueries_css';
$file = variable_get($filename);
$path = "public://at_css";
if (!empty($file)) {
$filepath = $path . '/' . $file;
drupal_add_css($filepath, array(
'preprocess' => variable_get('preprocess_css', '') == 1 ? TRUE : FALSE,
'group' => CSS_THEME,
'media' => 'screen',
'every_page' => TRUE,
'weight' => 10, // generated file should be loaded after at.layout.css which contains the backup layout (issue with .sidebar-first .content-inner)
)
);
}
Noteworthy, I'm using the 'weight' => 10 to ensure that the theme specific file is loaded after the general at.layout.css.
Adding a weight could also be a fix in adaptivetheme/adaptivetheme/inc/template.process.inc adaptivetheme_preprocess_html().
The CSS files of my site:
@import url("http://mysite.stage/modules/system/system.menus.css?lx2nzd");
@import url("http://mysite.stage/modules/system/system.messages.css?lx2nzd");
@import url("http://mysite.stage/modules/system/system.theme.css?lx2nzd");</style>
<style>@import url("http://mysite.stage/misc/ui/jquery.ui.core.css?lx2nzd");
@import url("http://mysite.stage/misc/ui/jquery.ui.theme.css?lx2nzd");
@import url("http://mysite.stage/modules/overlay/overlay-parent.css?lx2nzd");
@import url("http://mysite.stage/modules/contextual/contextual.css?lx2nzd");</style>
<style>@import url("http://mysite.stage/modules/book/book.css?lx2nzd");
@import url("http://mysite.stage/modules/comment/comment.css?lx2nzd");
@import url("http://mysite.stage/modules/field/theme/field.css?lx2nzd");
@import url("http://mysite.stage/sites/all/modules/mollom/mollom.css?lx2nzd");
@import url("http://mysite.stage/modules/node/node.css?lx2nzd");
@import url("http://mysite.stage/modules/poll/poll.css?lx2nzd");
@import url("http://mysite.stage/modules/search/search.css?lx2nzd");
@import url("http://mysite.stage/modules/user/user.css?lx2nzd");
@import url("http://mysite.stage/sites/all/modules/views/css/views.css?lx2nzd");</style>
<style>@import url("http://mysite.stage/modules/shortcut/shortcut.css?lx2nzd");
@import url("http://mysite.stage/modules/toolbar/toolbar.css?lx2nzd");
@import url("http://mysite.stage/sites/all/modules/codefilter/codefilter.css?lx2nzd");
@import url("http://mysite.stage/sites/all/modules/ctools/css/ctools.css?lx2nzd");
@import url("http://mysite.stage/sites/all/modules/elf/css/elf.css?lx2nzd");
@import url("http://mysite.stage/sites/all/modules/typogrify/typogrify.css?lx2nzd");
@import url("http://mysite.stage/sites/all/modules/tweetbutton/tweetbutton.css?lx2nzd");
@import url("http://mysite.stage/sites/all/modules/views_infinite_scroll/css/views_infinite_scroll.css?lx2nzd");</style>
<link type="text/css" rel="stylesheet" href="http://mysite.stage/sites/mysite.ch/files/at_css/mycorollasubtheme.responsive.layout.css?lx2nzd" media="screen" />
<style>@import url("http://mysite.stage/sites/all/themes/adaptivetheme/adaptivetheme/css/at.base.css?lx2nzd");
@import url("http://mysite.stage/sites/all/themes/adaptivetheme/adaptivetheme/css/at.layout.css?lx2nzd");</style>
<link type="text/css" rel="stylesheet" href="http://mysite.stage/sites/all/themes/corolla/css/corolla.responsive.style.css?lx2nzd" media="screen" />
<link type="text/css" rel="stylesheet" href="http://mysite.stage/sites/all/themes/corolla/css/corolla.responsive.gpanels.css?lx2nzd" media="screen" />
<style>@import url("http://mysite.stage/sites/all/themes/adaptivetheme/adaptivetheme/css/at.messages.css?lx2nzd");
@import url("http://mysite.stage/sites/all/themes/corolla/css/html-elements.css?lx2nzd");</style>
<link type="text/css" rel="stylesheet" href="http://mysite.stage/sites/all/themes/mycorollasubtheme/css/mycorollasubtheme.responsive.style.css?lx2nzd" media="screen" />
<style>@import url("http://mysite.stage/sites/all/themes/corolla/css/forms.css?lx2nzd");</style>
<link type="text/css" rel="stylesheet" href="http://mysite.stage/sites/all/themes/mycorollasubtheme/css/mycorollasubtheme.responsive.gpanels.css?lx2nzd" media="screen" />
<style>@import url("http://mysite.stage/sites/all/themes/corolla/css/tables.css?lx2nzd");
@import url("http://mysite.stage/sites/all/themes/corolla/css/page.css?lx2nzd");
@import url("http://mysite.stage/sites/all/themes/corolla/css/articles.css?lx2nzd");
@import url("http://mysite.stage/sites/all/themes/corolla/css/comments.css?lx2nzd");
@import url("http://mysite.stage/sites/all/themes/corolla/css/fields.css?lx2nzd");
@import url("http://mysite.stage/sites/all/themes/corolla/css/blocks.css?lx2nzd");
@import url("http://mysite.stage/sites/all/themes/corolla/css/navigation.css?lx2nzd");
@import url("http://mysite.stage/sites/all/themes/corolla/css/corolla.settings.style.css?lx2nzd");
@import url("http://mysite.stage/sites/mysite.ch/files/color/mycorollasubtheme-23a9822e/colors.css?lx2nzd");
@import url("http://mysite.stage/sites/all/themes/mycorollasubtheme/css/mycorollasubtheme.css?lx2nzd");</style>
<style media="print">@import url("http://mysite.stage/sites/all/themes/corolla/css/print.css?lx2nzd");
@import url("http://mysite.stage/sites/all/themes/mycorollasubtheme/css/mycorollasubtheme-print.css?lx2nzd");</style>
I'm using Drupal 7.10, Adaptive Theme 2.1 and Corolla 7.x-2.2.
I'm running PHP 5.3.8.
I'm using Firefox 9. I've seen this issue also with earlier versions of Firefox.
I don't know if this is really an issue of Adaptive Theme. Maybe it's a problem of Drupal core or a module. I don't know what is reversing the order of adaptivetheme/adaptivetheme/css/at.layout.css and files/at_css/mycorollasubtheme.responsive.layout.css.
I'll keep an eye on that problem. If I find more I'll let you know.
Comments
Comment #0.0
scitoMentioning browser Firefox
Comment #1
scitoIt's not an issue of Adaptive Theme. I'm facing the symptoms Drupal core and Views problem.
Views is readding the CSS files in
views/plugins/views_plugin_cache.inc:However, the order of insertions of CSS files is calculated in
drupal_add_css()through the total size of the $css array. The size remains at the same value in the second pass by Views. Thus, the files get the same weight and the order of the additions is lost.I'll create a new issue for Views.
Comment #2
scitoI've created a Views issue #1390886: CSS insertion order not respected after views_plugin_cache->restore_headers().
Comment #2.0
scitoAdding PHP version