importedData = '@media ' + mediaQuery + '{' + importedData + '}';
var newContext = override(context, {
- relativeTo: importRelativeTo,
+ relativeTo: importRelativeTo
});
return importFrom(importedData, newContext);
this.outputMap.addMapping({
generated: {
line: this.line,
- column: this.column,
+ column: this.column
},
source: this.stylingSourceFor(original, metadata) || '__stdin__.css',
original: {
'keeps urls the same': [
'@import url(base.css);',
'a{background:url(../partials/extra/down.gif)no-repeat}'
- ],
+ ]
}, {
target: path.join(process.cwd(), 'test.css'),
relativeTo: path.join('test', 'fixtures', 'partials-relative'),
'whitespace body': [
'a{ \n }',
''
- ],
+ ]
})
)
.addBatch(
'rect zeros with commas': [
'a{clip:rect(0px, 0px, 0px, 0px)}',
['clip:rect(0,0,0,0)']
- ],
+ ]
})
)
.addBatch(
kind: 'selector',
value: [{ value: 'a', metadata: { line: 1, column: 25, source: undefined } }],
body: [{ value: 'color:red', metadata: { line: 1, column: 27, source: undefined } }]
- },
+ }
]
},
{
metadata: { line: 2, column: 0, source: undefined },
isFlatBlock: true,
body: [
- { value: 'font-family:"Font"', metadata: { line: 3, column: 1, source: undefined } },
+ { value: 'font-family:"Font"', metadata: { line: 3, column: 1, source: undefined } }
]
}
]
selector: 'a,\n\ndiv.class > p ',
selectorsList: ['a', '\n\ndiv.class > p ']
}
- }],
+ }]
],
'two selectors': [
'a{color:red}div{color:blue}',
return mapping.source == 'styles.less';
});
assert.lengthOf(stylesSource, 2);
- },
+ }
},
'nested once': {
'topic': new CleanCSS({ sourceMap: true }).minify('@import url(test/fixtures/source-maps/nested/once.css);'),