Hi Whatever,
thanks a lot for your help. I do not know whether styling in transclusions still works that way. I thought now it is {{tiddler||templateTiddler}}. Anyway this is a little too complicated. Because this is about editing scripts the text has to be readable in editmode.

Greetings Jan


Am 09.04.2017 um 10:14 schrieb whatever:
Hey!
Try this:

in your stylesheet, add the following, but adapt both numbers appropriately (they should be identical, but you can experiment with different numbers, if you like):
.dialog {padding-left: 130px; text-indent: -130px;}
.text {margin-left: 150px; font-style: italic;}


Then in your tiddler, you can put the following:
{{dialog{{{role{Your Role Name}}}{{text{ dialog text
                                        more dialog text
                                        more dialog text}}}}}}

The "dialog" class determines the style for both the role and the text, in this case the indentation, and the "role" class only determines the style for the role name. The "text" class determines the style for the text. And to answer your question from the topic title, a node following a node is its sibling, regardless if it is within tags, and a node within a node is its child, but unless you actually plan to have a paragraph break after the role name, you need to change that rule to the "text" class.

hth,
w

PS: I'm not sure if TW5 also uses {{className{text}}} notation, like TWC, but the principle is the same.


On Sunday, April 9, 2017 at 9:51:29 AM UTC+2, Jan wrote:

    Hi Mat,
    Perhaps you are right.
    I want to create a class which makes the name of the person
    speaking in capital letters in the left. And i would like the
    dialogue-text following this name to appear indent.
    I thought I could use the adjacent sibling selector to make it
    indent without further formatting in the text.

    As a further difficulty, the span containing the role class will
    be transcluded into the tiddler... I do. Not know whether this
    changes anything...

    Thanks for helping
    Jan

    Mat <[email protected] <javascript:>> schrieb am So. 9. Apr. 2017
    um 02:27:

        Hi Jan

        Forgive me if I'm wrong, but it seems to me that you're mixing
        things up in a beginners kind of way? At least I can't quite
        make sense of it. May I propose that you instead describe
        exactly what you wish the end result to look like?

        <:-)


        On Sunday, April 9, 2017 at 12:22:31 AM UTC+2, Jan wrote:

            Hello!
            I want to realize an editor for screenwriting within TW
            and during that
            process have come to a formatting/CSS question.
            The dialogue-text after the role shall be indent. Now my
            question is
            is the Text following a span a child or a sibling?

            .role{text-transform: uppercase;}
            .role > p{margin-left: 150px; font-style: italic;}

            It shall be used within this construction

            {{rolename}} Dialoguetext text......
                                     Text Text

            Where rolename is a transclude span with the class role...


            Thanks for help
            Jan

-- 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 [email protected]
        <javascript:>.
        To post to this group, send email to [email protected]
        <javascript:>.
        Visit this group at https://groups.google.com/group/tiddlywiki
        <https://groups.google.com/group/tiddlywiki>.
        To view this discussion on the web visit
        
https://groups.google.com/d/msgid/tiddlywiki/f36c2b4b-a4f3-4901-992b-7f658493b7ea%40googlegroups.com
        
<https://groups.google.com/d/msgid/tiddlywiki/f36c2b4b-a4f3-4901-992b-7f658493b7ea%40googlegroups.com?utm_medium=email&utm_source=footer>.
        For more options, visit https://groups.google.com/d/optout
        <https://groups.google.com/d/optout>.

--
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 [email protected] <mailto:[email protected]>. To post to this group, send email to [email protected] <mailto:[email protected]>.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/56f6ecdc-a213-4532-ab70-c2a92ddc3be9%40googlegroups.com <https://groups.google.com/d/msgid/tiddlywiki/56f6ecdc-a213-4532-ab70-c2a92ddc3be9%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/58EAA7B7.6020102%40googlemail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to