The current documentation only indicates that relative paths to css files are supported, however it appears that stream wrapper URIs work fine as well (e.g. public://css_injector/css_injector_1.css).

Support was added here: #927406: Colorable themes fail when CSS aggregation is enabled due to improper stream wrapper usage
A css_injector issue that uses a stream wrapper URI: #1044670: Fix file handling resulting in Incorrect path to css file on Windows

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gapple’s picture

FileSize
1.61 KB

Status: Needs review » Needs work

The last submitted patch, drupal-1222794-1.patch, failed testing.

gapple’s picture

FileSize
2.04 KB

Here is a proper Git patch.

The only change is the first sentence of the description of the $data parameter when $options['type'] is 'file':

The path to the CSS file relative to the base_path(), e.g., "modules/devel/devel.css".

Changes to

The path to the CSS file relative to the base_path() or a stream wrapper URI, e.g., "modules/devel/devel.css", "public://generated_css/stylesheet_1.css".

gapple’s picture

Status: Needs work » Needs review

forgot status change

jhodgdon’s picture

Version: 7.x-dev » 8.x-dev
Status: Needs review » Needs work
Issue tags: +Needs backport to D7

I know this was in the original text wrong, but there's a slight punctuation problem:
wrapper URI, e.g.,
should be
wrapper URI; e.g.,

Actually, I think it should say:

The path to the CSS file relative to the base_path(), or a stream wrapper URI. For example: "modules/devel/devel.css" or "public://generated_css/stylesheet_1.css".

Also, we patch vs. 8.x and backport to 7.x. Thanks!

gapple’s picture

FileSize
2.05 KB

That's definitely a bit easier to read.

Here's an updated patch for D8.
I was able to cherry-pick the commit without issue, so I'm sure the patch will still apply to D7 cleanly as well.

gapple’s picture

Status: Needs work » Needs review

status

gapple’s picture

FileSize
2.05 KB

Just noticed some end-of-line whitespace snuck in to the previous patch

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
2.05 KB

To get a patch tested, it can't have a -D# on the patch name (which is noted in the attachment field help text below where you attach files). So, re-uploading the previous patch with a different name.

And the patch looks fine to me for d7/8, as long as the test bot agrees.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x and 7.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.