-
-
Notifications
You must be signed in to change notification settings - Fork 249
Description
I'm attempting to bundle a bunch of css together using a less file and Visual Studio 13 Web Essentials. v2.6.13 The source css files are in different folders. e.g.
@import (inline) "Telerik/Grid.css";
@import (inline) "Telerik/ListBox.css";
@import (inline) "Telerik/TabStrip.css";
@import (inline) "Telerik/ComboBox.css";
@import (inline) "Telerik/MultiPage.css";
@import (inline) "Telerik/Input.css";
@import (inline) "Telerik/Calendar.css";
@import (inline) "Telerik/Menu.css";
@import (inline) "Telerik/TreeView.css";
@import (inline) "Telerik/Default/Grid.Default.css";
@import (inline) "Telerik/Default/ListBox.Default.css";
@import (inline) "Telerik/Default/TabStrip.Default.css";
@import (inline) "Telerik/Default/ComboBox.Default.css";
@import (inline) "Telerik/Default/Input.Default.css";
@import (inline) "Telerik/Default/Calendar.Default.css";
@import (inline) "Telerik/Default/Menu.Default.css";
@import (inline) "Telerik/Default/TreeView.Default.css";
@import "Common.less";
The issue I'm finding is that less is importing the css files as is without changing URLs in the imported css. Relative URLs within the imported CSS files end up broken as they are relative to the location of the source CSS file, whereas the location of the bundled css is in a different folder.
e.g The following imported from Telerik/Grid.css...
RadGrid .rgBatchChanged {
background-image: url('Common/Grid/dirty.png');
...needs to be...
RadGrid .rgBatchChanged {
background-image: url('Telerik/Common/Grid/dirty.png');
... in the bundled css file.
I've attempted changing the Less settings in the WebEssentials-Settings.json, AdjustRelativePaths set to true or false seems to result in the same CSS. I've also tried changing the css files to less files, this also had no effect. The only solution I've got is to split the bundle into separate bundles for each folder, which is not optimal.
Can anyone offer a solution?