mirror of https://github.com/sveltejs/svelte
commit
b567eb2677
@ -0,0 +1,18 @@
|
||||
export default {
|
||||
html: `
|
||||
<p class="svelte-y94hdy" style="color: red !important; font-size: 20px !important; opacity: 1;">red</p>
|
||||
`,
|
||||
|
||||
test({ assert, component, target, window }) {
|
||||
const p = target.querySelector('p');
|
||||
|
||||
let styles = window.getComputedStyle(p);
|
||||
assert.equal(styles.color, 'red');
|
||||
assert.equal(styles.fontSize, '20px');
|
||||
|
||||
component.color = 'green';
|
||||
|
||||
styles = window.getComputedStyle(p);
|
||||
assert.equal(styles.color, 'green');
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
<script>
|
||||
export let color = `red`;
|
||||
</script>
|
||||
|
||||
<p style="color: {color} !important; font-size: 20px !important; opacity: 1;">{color}</p>
|
||||
|
||||
<style>
|
||||
p {
|
||||
color: blue !important;
|
||||
font-size: 10px !important;
|
||||
}
|
||||
</style>
|
Loading…
Reference in new issue