Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295516

CssOptimizer should leave url('#hash') alone

$
0
0

Problem/Motivation

\Drupal\Core\Asset\CssOptimizer anchors all paths in the CSS with its base url. Aside of ignoring external and absolute paths, it should also ignore paths starting with a hash (#).

Steps to reproduce

Add urls in a CSS file which contains a hash sign, for example:




.blur {
  filter: url(my-file.svg#svg-blur); /* the URL of an SVG file used as a filter */
}

.inline-blur {
  filter: url(#svg-blur); /* the ID of an SVG that is embedded in the HTML page */
}

Proposed resolution

Change the regex so #hash urls will be left alone. See the patch in #9.

Remaining tasks

Review the patch and commit it to core.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

None.


Viewing all articles
Browse latest Browse all 295516

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>