Hello Craig,
On 5 фев, 18:32, Craig in Calgary <[email protected]> wrote:
> Is there any documentation available that explains which standard CSS
> to modify for standard TW elements? For example; I want to make macro
> links in MainMenu look the same as ToolbarCommands links.
I'm not aware of any such documentation; however, it seems that
there's no much need in it: what you can use is
* DOM/CSS inspectors, like FireBug extension for FireFox or the Opera
DragonFly tool built in Opera (I don't know what options are available
for other browsers)
** these let you see what classes do some elements have. For instance,
you can explore that links to existing tiddlers have classes
"tiddlyLink" and "tiddlyLinkExisting", or that the content of tabs
generated with tabs macro has "tabContents" class
** these also let you see the id's, so that you can create rools like
#mainMenu .tiddlyLink { ... }
** finally, you can inspect calculated styles, so that you can further
use them in other parts of document, like in font-color, font-size and
font-family in your example
* shadowed style sheets. In principle you can want to use the same
"semantical" styles, like colors from ColorPalette. In that case open
StyleSheetLayout and StyleSheetColors and search through them. For
instance, you can see there
#sidebarOptions .sliderPanel a {border:none;color:
[[ColorPalette::PrimaryMid]];}
which makes "new journal" button and others of the color which is
defined in ColorPalette. But it is recomended not to overwrite these
shadowed StyleSheets for better updating; instead, add your CSS rules
to StyleSheet which will have more priority than the rules shadowed
ones.
> Another
> example; I want the <<tiddler ToggleSliders>> link in ToolbarCommands
> to look the same on :hover as the closeOthers or closeTiddler macros.
I don't understand what do you mean. ToolbarCommands doesn't contain
<<tiddler ToggleSliders>> by default..
> The problem I am trying to solve is that I have integrated several
> plugins which create their own shadow stylesheets and I need to figure
> out the load order and which UI elements are affected by their CSS.
> There are a lot of declarations which supersede each other and I want
> to figure out how to manage the mess.
As I understand, StyleSheet has more priority than any shadowed CSS
tiddler; I'm not sure, though. The order of applying of new
StyleSheets is defined by the order the extensions call setStylesheet
funcion [1], but if, as you say, they generate shadow stylesheets
(using setStylesheet, an extension can apply styles directly), you can
just edit them as tiddlers!
Not sure if I answered the question, though.
[1] https://github.com/TiddlyWiki/tiddlywiki/blob/master/js/Dom.js (in
the end of the page; not very helpful definition, as you can see)
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/tiddlywiki?hl=en.