Quick question. While I understand how to style
styling links in HTML and CSS, how can I style the standard wiki links using
SugarCube 1 in Twine 1 so that each link is different in appearance?
Just to make sure I'm clear, I want these two links in the same passage to look different:
[[link1]]
[[link2]]
Thanks!
Comments
If you want to be able to style links separately, then you need to be able to select them separately. You can do so by either wrapping them in some extra markup or by using HTML. Either way, you'll be adding classes, since I'm assuming you be wanting style categories (if not, you could use IDs or, possibly, the attribute selector; see below). For example: The selectors are slightly different: (only showing one of the styles):
Additionally, if you ever need to style a link based on the passage it links to, then you can simply use the attribute selector with the data-passage attribute (since all markup based links receive the attribute). For example:
Then, style the link as one normally would do, by adding:
Then, in the stylesheet, add:
Okay, I think I got it!
However, now I'd like to ask how one can style individual buttons using SugarCube's <<button>> and <<click>> macros. For the button, does one just use regular HTML/CSS like above?
Well, I tired figuring that out, but I did it incorrectly (obviously, to someone who knows how to do this, lol):
Example:
Wrapping the button (either of these should work):
Styling it: