*a.myClass* should have a slightly higher CSS specificity <https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwjUtILCyoHyAhXH6Z4KHRPZAo8QFjAAegQIBhAD&url=https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FCSS%2FSpecificity&usg=AOvVaw2rieJN3zQaGzGiOgQnLCmJ> than the default link styling, whereas *.myClass* by itself is not higher enough to override the TW defaults.
On Monday, July 26, 2021 at 1:21:11 PM UTC-7 Si wrote: > Perfect thank you! > > Out of curiousity, why *does* this work? As far as I know a.myClass will > select any link element that has the class myClass, but why doesn't > .myClass work? Shouldn't it select any element with the class myClass, > which would naturally include any link element with that class? > On Monday, 26 July 2021 at 19:21:54 UTC+1 Brian Radspinner wrote: > >> Try this: >> >> >> *<style>a.myClass {color:green;}* >> >> >> >> *</style><$link class=myClass to="Hello"/>* >> >> On Monday, July 26, 2021 at 10:09:46 AM UTC-7 Si wrote: >> >>> I'm trying to create a template using the link widget that gives me >>> green links. I tried the following which does not work: >>> >>> <style> >>> .myClass {color:green;} >>> </style> >>> >>> <$link class=myClass to="Hello"/> >>> >>> I know about the overrideClass attribute, but using this means that I >>> loose all the other styling that normally applies to links (for example >>> italicising missing tiddlers). >>> >>> *Is there a way to get green links without changing the rest of the >>> styling for links?* >>> >>> Note: I don't want to change the color for every link in my wiki, just >>> for a specific template. >>> >> -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/da97dc7e-b0b8-4344-821c-d88ec9e3df86n%40googlegroups.com.