Hi,
It seems browsers like Firefox and Chrome don't let load a http css file from a https site. That breaks Zero Point theme at https sites.
It can be solved pointing local pure css files. Replace these lines, near #124 at template.php:
// Set grids responsive stylesheets
if(theme_get_setting('css_zone')) {
drupal_add_css('http://yui.yahooapis.com/pure/0.6.0/pure-min.css', array('group' => CSS_THEME, 'every_page' => TRUE, 'weight' => 1, 'preprocess' => FALSE));
} else {
drupal_add_css(drupal_get_path('theme','zeropoint').'/css/yui/pure-min.css', array('group' => CSS_THEME, 'every_page' => TRUE, 'weight' => 1));
}
if(theme_get_setting('grid_responsive') == '1') {
if(theme_get_setting('css_zone')) {
drupal_add_css('http://yui.yahooapis.com/pure/0.6.0/grids-responsive-old-ie-min.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'IE 8', '!IE' => FALSE), 'every_page' => TRUE, 'weight' => 2, 'preprocess' => FALSE));
drupal_add_css('http://yui.yahooapis.com/pure/0.6.0/grids-responsive-min.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'gt IE 8'), 'every_page' => TRUE, 'weight' => 2, 'preprocess' => FALSE));
by:
// Set grids responsive stylesheets
if(theme_get_setting('css_zone')) {
drupal_add_css(drupal_get_path('theme','zeropoint').'/css/yui/pure-min.css', array('group' => CSS_THEME, 'every_page' => TRUE, 'weight' => 1, 'preprocess' => FALSE));
} else {
drupal_add_css(drupal_get_path('theme','zeropoint').'/css/yui/pure-min.css', array('group' => CSS_THEME, 'every_page' => TRUE, 'weight' => 1));
}
if(theme_get_setting('grid_responsive') == '1') {
if(theme_get_setting('css_zone')) {
drupal_add_css(drupal_get_path('theme','zeropoint').'/css/yui/grids-responsive-old-ie-min.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'IE 8', '!IE' => FALSE), 'every_page' => TRUE, 'weight' => 2, 'preprocess' => FALSE));
drupal_add_css(drupal_get_path('theme','zeropoint').'/css/yui/grids-responsive-min.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'gt IE 8'), 'every_page' => TRUE, 'weight' => 2, 'preprocess' => FALSE));
} else {
Inspiration: http://stackoverflow.com/questions/20132453/rails-external-css-framework-not-loading-in-some-browsers
Comments
Comment #1
calbasiComment #2
florian commentedI do not understand you. There is a setting in zeropoint that do automatically what you say here. Just go to zeropoint's settings and under "Pure Grid settings" uncheck the first option "Use Yahoo CDN ..."
Comment #3
florian commentedComment #4
florian commentedThis is a duplicate of Layout is not appearing properly in Chrome.
If your website has https, load pure.css locally (default theme setting) and not from Yahoo CDN.
Comment #6
calbasiHi Florian,
Do you want I add a patch to include this in the readme.txt file?
I suppose it's also possible to change text string at select option where you could pick for Yahoo CDN or even don't disable this option if website is under SSL... But last option is far from my limited php skills ;-) and documentation options could do the work...
Comment #7
florian commentedThe theme works as designed, so what do you want to fix by a patch?
Please read carefully the following line in theme's settings:
"Use Yahoo CDN to serve the responsive CSS files. If you use https leave this option unchecked to load any responsive CSS files locally. "
There is only http://yui.yahooapis.com (no https). This is the reason that some browsers won't call http from https.
The rules are clear:
- If you have a http site you can use both local and CDN pure.css files.
- If you have a https site, you have to serve the files locally, so no CDN allowed.