I do this
{{reputation{some text}}}
and it spits out:
<div wikkly-reputation'>some text</div>
Is there a way I can stop it adding the "wikkly-" prefix?
--
You received this message because you are subscribed to the Google Groups "WikklyText" group.
To post to this group, send email to wikkl...@googlegroups.com.
To unsubscribe from this group, send email to wikklytext+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/wikklytext?hl=en.
TiddlyWiki's implementation of Wikklytext does not prefix wikkly- to
the front of classes. I am trying to replicate TiddlyWiki with your
python library however due to this difference, in TiddlyWiki I have a
css definition for .reputation which is obviously ignored here.
Personally if I ask for {{reputation{some text}}}
I would want the class to be reputation as I have declared this.
As a css user, if .reputation had a css rule outside the context of
wikklytext that I would want to override I would write a more specific
css rule to prevent this from happening. One way you could aid this is
by wrapping the entire wikklytext output with a class eg.
wikklytext_world
So now if I want to change the css of something within wikklytext
world I could write a rule .wikklytext_world .reputation which would
override the default non-wikklytext world css rule .reputation due to
being more specific.
Would this not solve the problem you are proposing? If not apologies
for misunderstanding - maybe a concrete example could help.
In the mean time I will do a string replace on the output to strip
the class :S (not good code! :))
Thanks
Jon
> > wikklytext+...@googlegroups.com<wikklytext%2Bunsu...@googlegroups.com>
My usecase is within TiddlyWeb/TiddlyWiki.
TiddlyWiki's implementation of Wikklytext does not prefix wikkly- to
the front of classes. I am trying to replicate TiddlyWiki with your
python library however due to this difference, in TiddlyWiki I have a
css definition for .reputation which is obviously ignored here.
Personally if I ask for {{reputation{some text}}}
I would want the class to be reputation as I have declared this.
As a css user, if .reputation had a css rule outside the context of
wikklytext that I would want to override I would write a more specific
css rule to prevent this from happening. One way you could aid this is
by wrapping the entire wikklytext output with a class eg.
wikklytext_world
In the mean time I will do a string replace on the output to strip
the class :S (not good code! :))
To unsubscribe from this group, send email to wikklytext+...@googlegroups.com.
No, I didn't do that. I think there's confusion over what Jon's
saying.
He wants identical css files to be used whether a piece of tiddler
content is being rendered to HTLM by tiddlywiki or by WikklyText.
Somewhere there is a tiddler with
{{reputation{some text}}}
and somewhere in the context is css entry for
.reputation {
border: black;
}
and if I'm understanding Jon right, what he wants is that the same
piece of css can style the rendered version of that wikitext, whether
it is in the server side context (using wikklytext) or in the client
context (using tiddlywiki).
Because wikklytext is prepending the wikkly- prefix, he can't do this
without post-processing the output from wikklytext's rendering system.
Assuming I'm understanding what's going on here, at all.
On Jan 8, 4:17 pm, Frank McIngvale <fmcingv...@gmail.com> wrote:
> On Fri, Jan 8, 2010 at 5:56 AM, jdlrobson <jdlrob...@gmail.com> wrote:No, I didn't do that. I think there's confusion over what Jon's
> > My usecase is within TiddlyWeb/TiddlyWiki.
>
> > TiddlyWiki's implementation of Wikklytext does not prefix wikkly- to
> > the front of classes. I am trying to replicate TiddlyWiki with your
> > python library however due to this difference, in TiddlyWiki I have a
> > css definition for .reputation which is obviously ignored here.
>
> I wasn't aware of that, I guess Chris edited the sources to remove the
> prefixing. That's fine for TiddlyWeb but in the general case some kind of
> prefixing or scoping is needed to prevent clashes when embedded in other
> environments. However ...
saying.
He wants identical css files to be used whether a piece of tiddler
content is being rendered to HTLM by tiddlywiki or by WikklyText.
Somewhere there is a tiddler with
{{reputation{some text}}}
and somewhere in the context is css entry for
.reputation {
border: black;
}
and if I'm understanding Jon right, what he wants is that the same
piece of css can style the rendered version of that wikitext, whether
it is in the server side context (using wikklytext) or in the client
context (using tiddlywiki).
Because wikklytext is prepending the wikkly- prefix, he can't do this
without post-processing the output from wikklytext's rendering system.
Assuming I'm understanding what's going on here, at all.
Well, one could use more specific rules to limit the context of
certain rule sets.
Assuming there's a common container for all WikklyText output:
<div class="wikklytext">
<h1>Foo</h1>
<blockquote>lorem ipsum</blockquote>
</div>
Then you can use CSS like so:
h1 { /* applies to the entire document */
font-size: 2em;
}
.wikklytext h1 { /* applies only to descendants of elements with
class "wikklytext" */
font-size: 1.5em;
}
Not sure about the implications for backwards-compatibility though...
-- F.
Not sure about the implications for backwards-compatibility though...
-- F.