Pages: 1
Print
Author Topic: Problem with overriding style for substeps  (Read 2833 times)
joehansen
Member

Posts: 10


« on: August 30, 2010, 12:39:30 AM »

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 Files\XMetaL 6.0\Author\DITA\XACs\ditabase.

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
Logged
Su-Laine Yeo
Solutions Consultant
Member

Posts: 260


« Reply #1 on: August 30, 2010, 06:23:34 PM »

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 <ol> elements, in addition to overriding the styling defined for <substeps> 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
« Last Edit: August 30, 2010, 07:27:42 PM by Su-Laine Yeo » Logged

Su-Laine Yeo
Solutions Consultant
JustSystems Canada, Inc.
joehansen
Member

Posts: 10


« Reply #2 on: August 30, 2010, 10:32:59 PM »

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
Logged
Pages: 1
Print
Jump to: