It looks like you're new here. If you want to get involved, click one of these buttons!
The CSS rule for styling links in all story formats was changed from "a.internalLink,a.externalLink" to ".passage a". This was done for one major reason: a vast number of people were using HTML links "<a href="http://www.example.org">" instead of proper external links "[[link text|http://www.example.org]]" and the former links were appearing as unstyled dark-blue-on-black links in Sugarcane. To mitigate this problem, I changed the rule to guarantee that even people unaware of the external link syntax would receive properly styled links. (It also has the intended side-effect of making other links created by macros (such as <<choice>> or <<return>>) not require the author to supply extra rules to re-style them.)
But, ".passage a" should have identical specificity to both "a.internalLink" and your own "a:link", so if you're having a problem with that, hmm, that might indeed indicate a problem of some sort.
.passage { font: normal 14pt Lucida Console, monospace; width: 600px; color:#00FF00; !important }
a:link {color:#00FF00 !important; text-decoration:underline;}
a:visited {color:#00FF00 !important;}
a:hover {color:#008000 !important;}
a:active {color:#008000 !important;}
Never mind the visited code.
Comments
Anyway, the makeshift solution is to just put ".passage " in front of each "a"... for instance, change "a:link" to ".passage a:link" and so forth.
There are other tiny issues I've noticed with links using other people's style sheets. Should I give you information on that or do you think you have the answer to those as well?
I want to be able change text colour for paragraphs or links. I tried copying some of the code provided above in this thread but cannot get that working, could an example be provided? All i want to do is change colour only and not anything else.
Why cannot i use <font color="red">Text paragraph</font> this would seem much more simple.
**Update**
This was what I was looking for- I have copy/pasted it from the Syntax page on the Twine wiki in here other newbies like me. There is a little bit more info on that page if using something like that a lot.
Inline styling
Inline styling is a shorthand way to apply one-off CSS styles to a span of text. Where normally you would have to write:
<span style=color:magenta;letter-spacing:3px;font-size:1.5em;>Some text</span>
You can instead write:
@color:magenta;letter-spacing:3px;font-size:1.5em;Some text@@
I don't really recommend copy-pasting that tag into every passage, though.
You just want to change the color of all your links? That's what the code provided above does.
You can right click anywhere in your story and click "New Stylesheet Here" and a template will be created. Just learned that a couple days ago. ;D
Attached is a story file with a stylesheet where all the links are red and all text is blue.
Hope that helps!
Hey thanks for that. Sometimes seeing an actual demo of something is easier.
Ok, so its right clicking anywhere in the background window/wall where the passage panels go (I was at first clicking inside the passage panels).
That's a neat feature.
Thanks.
You can also make any passage a stylesheet just by adding the tag, "stylesheet" without the quotation marks.