Closed (fixed)
Project:
Shiny (Administration theme)
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Apr 2013 at 19:57 UTC
Updated:
27 Jun 2013 at 15:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
timaholt commentedRealized this was just because the path started with // instead of http:// The // was making Drupal think it was a local file, and the @import tag was dropped when it couldn't find it. Forcing a full http:// allows it to work, but breaks https:// sites.
Comment #2
timaholt commentedPatch attached.
Comment #3
timaholt commentedPatch works for http but not for https. Rethinking this.
Comment #4
Ignigena commentedThe easiest fix for this might be to just hardcode in the https value. It will ensure no insecure content warnings on sites with SSL whilst not breaking the CSS aggregation.
Don't know if this is the best practice and I know that SSL sometimes has a bit of additional negotiating overhead which can add to the total load time. But running a test on Pingdom Tools it seems like the difference is minimal:
HTTP version (NY): 44ms
HTTPS version (NY): 74ms
Otherwise we'll need to go the PHP route and embed the OpenSans CSS within the document head rather than using an @import statement within the CSS file.
If I'm making no sense feel free to call me out. It's the end of a long week!
Comment #5
timaholt commentedActually this patch takes a different approach, and loads the protocol agnostic css file via a drupal_add_css in the preprocess_html hook. This should work on both, and also it works with aggregation turned on!
Comment #6
Ignigena commentedYes, that would be the "proper" method :)
Tested on my installation and everything seems to apply correctly to the 7.x-1.x development branch. Changing this to RTBC.
Comment #7
damien tournoud commentedBefore committing, let's add a comment explaining why we are doing that. Also, please open a core issue. The bug is in
drupal_load_stylesheet_content()(that uses a regexp (!) to exclude external includes).Comment #8
timaholt commentedI filed a core bug here: http://drupal.org/node/1978794
Comment #9
dudenhofer commentedI applied the patch, added the comment, and replicated the update in the scss file as well. This has been committed now, so I'm marking this as fixed.