Home
Categories
Dictionary
Download
Project Details
Changes Log
What Links Here
How To
Syntax
FAQ
License

Generic apidocs API styles



It is possible to specify custom CSS styles for an element in the apidoc html rendering. It will override the styles defined for this element by default in the API type.

List of style IDs

Style ID Apply On Default Java styleClass Default Python styleClass Default CSharp styleClass Default Doxygen styleClass Comment
header table headerTitleAPI headerTitlePythonAPI headerTitleCSharpAPI headerTitleDoxygenAPI styleClass specifying the style of the table enclosing the title of the API
apiTitle th headerAPI headerPythonAPI headerCSharpAPI headerTitleDoxygenAPI styleClass specifying the style of the title of the API
api table headerAPI headerPythonAPI headerCSharpAPI headerTitleDoxygenAPI styleClass specifying the style of the title of the API
caption caption tableAPI - - - styleClass specifying the style of the tables caption
api table apidoc - CSharpAPI DoxygenAPI styleClass specifying the style of the element tables
api table apidoc - CSharpAPI DoxygenAPI styleClass specifying the style of the element tables
row tr rowAPI rowPythonAPI - - styleClass specifying the style of the rows
rowModifier th rowModifierAPI rowModifierPythonAPI rowModifierCSharpAPI rowModifierDoxygenAPI styleClass specifying the style of the cells specifying the modifier and types of the elements
rowContent th rowContentAPI rowContenPythonAPI rowContenCSharpAPI rowContenDoxygenAPI styleClass specifying the style of the cells specifying the path of the elements
rowContentText div rowContentTextAPI rowContenTextPythonAPI rowContenTextCSharpAPI rowContenTextDoxygenAPI styleClass specifying the style of the div specifying the description of the elements
argName span argNameAPI - - - styleClass specifying the style of the arguments names
stateAPI span argNameAPI - - stateDoxygenAPI styleClass specifying the style of the states names

Example

Suppose that we want to define a custom "java" API, with the method arguments highlighted in yellow. The original Java API has the following specification:
  <api id="java" desc="Java" type="java">
  ...  
     <element type="method" name="method">
        <children>
           <child name="argument" />       
        </children>           
        <property id="modifierAndType" desc="Modifier and Type" />
        <property id="description" desc="Method and Description" />
        <property id="params" desc="Parameters" /> 
     </element>  
  ...
  </api>
The default style for arguments span is argNameAPI:
   span.argNameAPI {
     font-family: Monospace;
   }      
The result is the following:
apidocparamdefault
We will define a new API (for example we could call it "java2") and add a custom style for the argName style id:
      <api id="java2" desc="CustomJava" type="java">
      ...  
         <element type="method" name="method">
            <children>
               <child name="argument" />       
            </children>           
            <property id="modifierAndType" desc="Modifier and Type" />
            <property id="description" desc="Method and Description" />
            <property id="params" desc="Parameters" /> 
            <style id="argName" style="myArgStyle" >
         </element>  
      ...
      </api>
and the associated new CSS rules:
   span.argNameAPI {
     font-family: Monospace;
     background-color: yellow;
   }      
We could set the new CSS file using the "css" property in the configuration file or the command-line.

The result will be:
apidocparamcustom

See also


Categories: configuration

docJGenerator Copyright (c) 2016-2023 Herve Girod. All rights reserved.