mirror of https://github.com/sveltejs/svelte
commit
d893f8fc28
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,3 @@
|
|||||||
|
export default {
|
||||||
|
cascade: false
|
||||||
|
};
|
@ -0,0 +1,7 @@
|
|||||||
|
<p class='foo'>red</p>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.foo {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
.foo[svelte-2772200924] {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*# sourceMappingURL=output.css.map */
|
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"file": "output.css",
|
||||||
|
"sources": [
|
||||||
|
"input.html"
|
||||||
|
],
|
||||||
|
"sourcesContent": [
|
||||||
|
"<p class='foo'>red</p>\n\n<style>\n\t.foo {\n\t\tcolor: red;\n\t}\n</style>"
|
||||||
|
],
|
||||||
|
"names": [],
|
||||||
|
"mappings": "AAEO;CACN,uBAAI,CAAC;EACJ,MAAM,CAAC,GAAG;EACV;AACF"
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
export function test ({ assert, smcCss, locateInSource, locateInGeneratedCss }) {
|
||||||
|
const expected = locateInSource( '.foo' );
|
||||||
|
|
||||||
|
const loc = locateInGeneratedCss( '.foo' );
|
||||||
|
|
||||||
|
const actual = smcCss.originalPositionFor({
|
||||||
|
line: loc.line + 1,
|
||||||
|
column: loc.column
|
||||||
|
});
|
||||||
|
|
||||||
|
assert.deepEqual( actual, {
|
||||||
|
source: 'input.html',
|
||||||
|
name: null,
|
||||||
|
line: expected.line + 1,
|
||||||
|
column: expected.column
|
||||||
|
});
|
||||||
|
}
|
Loading…
Reference in new issue