DITA and XMetaL Discussion

XMetaL Community Forum DITA and XMetaL Discussion Problem with overriding style for substeps

  • joehansen

    Problem with overriding style for substeps

    Participants 1
    Replies 2
    Last Activity 12 years, 1 month ago

    Hi
    I'm using XMetal 6.0.
    I have a question regarding how to override the style for substeps.
    Default substeps in task topics are numbered alphabetically like:

    1. step one
        a. substep one
        b. substep two

    I want to change this to numerical numbering:

    1. step one
        1. substep one
        2. substep two

    Customization of styles is done by editing the file: ditabase-derived-override.css
    located in C:Program FilesXMetaL 6.0AuthorDITAXACsditabase.

    First I inserted the following code, where I changed the list-style-type to decimal.
    This did not work.
    /* substeps {*/
    [class~=”task/substeps”] {
    display: block;
    list-style-type: decimal;
    counter-reset: substeps;
    }

    Then I removed the class definition and inserted the following code.
    This worked!
    /* substeps {*/
    {
    display: block;
    list-style-type: decimal;
    counter-reset: substeps;
    }

    Now my question:
    Why do I have to remove the class definition?
    Is this a bug or normal behaviour, so that styles can only be changed
    by deleting the class defintion?
    I suspect that i will loose inheritance when deleting the class definition.

    I sincerely hope that someone can explain this to me.

    Best regards
    Joe Hansen

    Reply

    Su-Laine Yeo

    Reply to: Problem with overriding style for substeps

    Hi Joe,

    The following code should work:

    /* substeps */
    [class~=”task/step”]>[class~=”task/substeps”] {
       display: block;
       list-style-type: decimal;
       counter-reset: substeps;
    }

    Class-based styling in the override.css files works, however this case was tricky because it is necessary to override the styling defined for nested

      elements, in addition to overriding the styling defined for elements.

      Your second code example applies decimal styling to all types of lists, not just substeps, because you had the word “substeps” commented out. You probably did this by accident, but if it's what you're after, it will work!

      Su-Laine

    Reply

    joehansen

    Reply to: Problem with overriding style for substeps

    Hi Su-Laine

    Thank you very much for your quick answer.
    This was a tough nut you cracked for me :-).
    I will change my code as you suggest.

    Best Regards
    Joe

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support