mirror of https://github.com/sveltejs/svelte
Merge pull request #2607 from EmilTholin/figcaption_figure_first_element_ancestor
Check if a figcaption's first element ancestor is a figurepull/2675/head
commit
16dbb8f437
@ -0,0 +1,10 @@
|
||||
<script>
|
||||
let caption = 'a foo in its natural habitat';
|
||||
</script>
|
||||
|
||||
<figure>
|
||||
<img src='foo.jpg' alt='a picture of a foo'>
|
||||
{#if caption}
|
||||
<figcaption>{caption}</figcaption>
|
||||
{/if}
|
||||
</figure>
|
Loading…
Reference in new issue