mirror of https://github.com/sveltejs/svelte
fix sibling combinators with spread attributes (#5467)
parent
296e81af4d
commit
3970def5eb
@ -0,0 +1,3 @@
|
|||||||
|
export default {
|
||||||
|
warnings: []
|
||||||
|
};
|
@ -0,0 +1 @@
|
|||||||
|
input.svelte-xyz:focus+div.svelte-xyz{color:red}input.svelte-xyz:focus~div.svelte-xyz{color:red}
|
@ -0,0 +1,2 @@
|
|||||||
|
<input placeholder="Text" class="svelte-xyz">
|
||||||
|
<div class="svelte-xyz">Should be red, when input is focused</div>
|
@ -0,0 +1,11 @@
|
|||||||
|
<script>
|
||||||
|
const test = { placeholder: 'Text' };
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
input:focus + div { color: red; }
|
||||||
|
input:focus ~ div { color: red; }
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<input {...test}>
|
||||||
|
<div>Should be red, when input is focused</div>
|
Loading…
Reference in new issue