diff --git a/Guide/recipes.markdown b/Guide/recipes.markdown index b2575fa1c..f257d16fc 100644 --- a/Guide/recipes.markdown +++ b/Guide/recipes.markdown @@ -430,7 +430,11 @@ case post of ## Highlight the targeted element -Let's say you have a page with comments, and you link to them with ``. +Let's say you have a page with comments, and you link to them with ``. You can build it like this (assuming you have a `comment.id`): + +```haskell +[hsx||] +``` The browser will scroll to the relevant comment when you follow the link, but let's say you also want to highlight the linked comment — like GitHub does. You could use the `:target` selector, but it doesn't play well with Turbolinks.