Hi,
I'm learning to use Harlowe, and I'm just getting the hang of styling text using classes. Everything seems to work except for the text that uses changer macros. For example
|moan>[a low moan,] (click-replace: ?moan)[wind through trees,]
This text was the wrong color, so I made a new class for it.
<span class="changeClass">|moan>[a low moan,] (click-replace: ?moan)[wind through trees,]</span>
That mostly worked, but the hover color is still wrong. This is the css I'm using for the hover styling:
.changeClass .enchantment-link:hover, .changeClass tw-link:hover {
color: green; }
I would like this text to have one hover color before it's be clicked and a different one after, but I can't figure out how to do that ether. Can anybody help?
Comments
The first issue is that in the before example the hover occurs on the tw-enchantment element and in the after example the hover occurs on the tw-hook, which is why your CSS was including both in the selector.
The second issue is that both before and after contain the <tw-hook name="moan"> element, and you want to only colour one in the after example.
You can get around both these issues by making your CSS selector more precise by using the > parent/child filter: