Taritsyn / BundleTransformer

Bundle Transformer - a modular extension for System.Web.Optimization (also known as the Microsoft ASP.NET Web Optimization Framework).
Apache License 2.0
130 stars 19 forks source link

Don't rewrite urls that reference svg patterns #83

Closed akuegel closed 3 months ago

akuegel commented 3 months ago

We can have url('#pattern') where #pattern is some svg pattern. This should not be rewritten.

Taritsyn commented 3 months ago

Hello, Adrian!

Could you give a more specific example of CSS code?

henningit commented 3 months ago

Here's an example:

.card_slot_mapping_arrow__line {
  marker-end: url('#triangle');
}

...where card_slot_mapping_arrow__line is the class of an SVG line element, and #trianglethe id of a SVG marker element:

var $marker = $playerDataDetailSvg.el('marker', { id: 'triangle', viewBox: '0 0 10 10', refX: '1', refY: '5', markerUnits: 'strokeWidth', markerWidth: '4', markerHeight: '4', orient: 'auto' });
$marker.append($playerDataDetailSvg.path('M 0 0 L 10 5 L 0 10 z').addClass('marker_path')).toDefs();

Issue: marker-end: url('#triangle'); becomes marker-end: url('/games/Checkers/client/#triangle');

(Adrian and I use the same framework)

akuegel commented 3 months ago

Thanks Henning for the example. I could also add a test for this, but I didn't find Tests for this class where I could add it.

Taritsyn commented 3 months ago

Thanks!

Taritsyn commented 3 months ago

These changes are included in version 1.14.1.