mirror of https://github.com/sveltejs/svelte
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.
31 lines
492 B
31 lines
492 B
4 years ago
|
<script>
|
||
|
let foo = true;
|
||
|
let bar = true;
|
||
|
</script>
|
||
|
|
||
|
<style>
|
||
|
.a ~ .b { color: green; }
|
||
|
.a ~ .c { color: green; }
|
||
|
.a ~ .d { color: green; }
|
||
|
.b ~ .e { color: green; }
|
||
|
.c ~ .e { color: green; }
|
||
|
.d ~ .e { color: green; }
|
||
|
.a ~ .e { color: green; }
|
||
|
|
||
|
/* no match */
|
||
|
.b ~ .c { color: green; }
|
||
|
.b ~ .d { color: green; }
|
||
|
.c ~ .d { color: green; }
|
||
|
</style>
|
||
|
|
||
|
<div class="a" />
|
||
|
|
||
|
{#if foo}
|
||
|
<div class="b" />
|
||
|
{:else if bar}
|
||
|
<div class="c" />
|
||
|
{:else}
|
||
|
<div class="d" />
|
||
|
{/if}
|
||
|
|
||
|
<div class="e" />
|