You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/css/samples/general-siblings-combinator.../input.svelte

31 lines
487 B

<script>
let foo = false;
let array = [1];
</script>
<style>
.a ~ .b { color: green; }
.a ~ .c { color: green; }
.a ~ .d { color: green; }
.b ~ .d { color: green; }
.c ~ .d { color: green; }
.a ~ .c ~ .c { color: green; }
.c ~ .c ~ .d { color: green; }
.a ~ .c ~ .c ~ .d { color: green; }
/* no match */
.b ~ .c { color: green; }
</style>
<div class="a" />
{#if foo}
<div class="b" />
{:else}
{#each array as item}
<div class="c" />
{/each}
{/if}
<div class="d" />