Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
CSS
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Apr 2013 at 15:36 UTC
Updated:
29 Jul 2014 at 22:13 UTC
Problem: attempt to use @import in stylesheets with a protocol agnostic url so that they server over either http or https:
@import url(//fonts.googleapis.com/css?family=Open+Sans:400,700,300,600,800);
Then turn on CSS aggregation. This line is dropped from the aggregated CSS file. It appears to be that the regex is improperly seeing this as a local file to include, and then can't find it. Once it can't find it it drops it from the aggregated CSS file. There are alternate ways to do this, but this should work with @import.
Comments
Comment #1
damien tournoud commentedThe bug is in
drupal_load_stylesheet_content(), that currently uses a regexp (!) specifically crafted to exclude the external@imports. Most likely this whole code will have to be rewritten.Comment #2
robloachAssetic, #JustSayin'.
Comment #3
damien tournoud commented@RobLoach: do you have an ETA on this? :)
Comment #4
olli commentedDuplicate #2014851: Drupal CSS preprocessing breaks protocol-relative paths?
Comment #5
wim leersIndeed, duplicate of #2014851: Drupal CSS preprocessing breaks protocol-relative paths, where I just posted a reroll that should be RTBC'able for Drupal 8, the pre-existing patch there should be easily portable to Drupal 7.