Creating CSS for Author mode - How?

Oxygen general issues.
rmcape
Posts: 2
Joined: Tue Mar 22, 2011 3:55 pm

Creating CSS for Author mode - How?

Post by rmcape »

I'm trying to build a CSS file for Author mode for an xml file that follows a schema that I didn't create. It doesn't follow DITA or Docbook.
All of the oXygen help examples I could find are pretty simple-minded and thus not very helpful to me.
I need to be able to create selectors based on attributes/values.

For example, I need to be able to treat these elements differently:
<div type="book">...</div>
<div type="tableofContents">...</div>
<div type="section">...</div>
<div type="subSection">...</div>
<title>...</title>
<title type="main">
<title level="1">...</title>
<title level="2">...</title>
</title>
<title type="parallel">
<xreference>...</xreference>
</title>

The different <div> types need to have different css renderings.
The different <title> types need to have different css renderings.

I didn't create the schema for this; I just have to make the author mode work.

Thank-you for any/all help with this.

Regards,
Bob
Radu
Posts: 9446
Joined: Fri Jul 09, 2004 5:18 pm

Re: Creating CSS for Author mode - How?

Post by Radu »

Dear Bob,

All CSS 2.1 selectors are supported in Oxygen:
http://www.w3.org/TR/CSS2/selector.html

For example you can use attribute selectors like:

Code: Select all


div[type="book"]{
font-size:10px;
}
For more complex Author CSS examples you can look in the Oxygen frameworks at the Docbook CSS:
OXYGEN_INSTALL_DIR/frameworks/docbook/css/docbook.css

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
rmcape
Posts: 2
Joined: Tue Mar 22, 2011 3:55 pm

Re: Creating CSS for Author mode - How?

Post by rmcape »

Thanks, Radu!
That seems to do the trick so far!
I appreciate your help.
Regards,
Bob
Post Reply