DITA and XMetaL Discussion
XMetaL Community Forum › DITA and XMetaL Discussion › Problem with overriding style for substeps
-
joehansen August 30, 2010 at 6:39 am
Problem with overriding style for substeps
August 30, 2010 at 6:39 amParticipants 1Replies 2Last Activity 12 years, 5 months agoHi
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 twoI want to change this to numerical numbering:
1. step one
1. substep one
2. substep twoCustomization 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 HansenSu-Laine Yeo August 31, 2010 at 12:23 am
Reply to: Problem with overriding style for substeps
August 31, 2010 at 12:23 amHi 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
-
AuthorPosts
- You must be logged in to reply to this topic.