I'm having some trouble using the Custom Styles syntax in Sugarcube Markup, according to
this page. I want stats to display as a different color as regular text, and to be bolded as well, but it doesn't seem to be recognizing that I'm using a CSS id and class in the Custom Style.
Here's my code in the passage:
@#willpower;.stat;Willpower@@ is the player's ability to resist mental changes.
And here's my code on the CSS page:
.stat {
font-weight: bold;
}
#willpower {
color: green;
}
Instead of making it bold and green, it makes it yellow and italics, and includes the "#willpower;.stat;" from the original passage code. The following code does work:
@font-weight:bold;color:green;Willpower@@ is the player's ability to resist mental changes.
I'd rather not have to manually do that every time though, because if I make any changes to the style it's much easier to alter the CSS than alter every occurrence of the stat.
Comments
According to the SugarCube 1 documentation (and testing) it does not support the #id version of Custom Styles, which is why you would be seeing the result you are.
You may simply use a class in place of the ID, however, so you can still do it mostly the way you intended.