Ronoix and CSS

Ronoix and CSS are both interesting technologies. Here, we have tried to best integrate the two, while maintaining the syntax, format, and development process for the two, while allowing tight integration with the CSS and Ronoix interfaces.

Syntax

Ronoix provides a simple and direct method for integrating CSS into a document. (Note that CSS is only compatible with Ronoix data types, and not encapsulated data types)

<ronoix version="1.0">
<load></load>
<meta>
</meta>
<content-type>Ronoix</content-type>
<contents css="ULS">
<text>This text is great for CSS</text>
</contents>
</ronoix>

This document, when ULS points to a CSS file, can be styled easily and with no problems. Here is an example of the CSS that can style the above Ronoix document.

contents {color: red; font-family: Veranda}
contents text {font-weight: bold}

This simple amount of code will produce something along the lines of:

This text is great for CSS

Support

Support for the CSS and CSS2 specifications varies. Here is a list of the currently supported features:

Selectors

  1. Standard type selectors: type
  2. Standard class selectors: .class
  3. Type and class selectors: type.class
  4. Grouped selectors: selector,selector,selector
  5. Selectors with IDs: type #ID; .class #ID; etc.
  6. Multiple classes: type.class.class...
  7. Descendant elements: selector selector selector... (Note: Support is limited to only one ID)
  8. Child elements: selector > selector...

Units of Measurement

  1. Inches
  2. Centimeters
  3. Millimeters
  4. Points
  5. Picas
  6. Pixels

Proposed Units of Measure

  1. EX: the 'x-height' of the font of the object being referenced
  2. EM: the 'font-size' of the object being referenced; already in place for fonts only
  3. Percentages: Based off of the inherited value of the type being referenced

Shorthand

We highly recommend that you do not use shorthand. It is more difficult for the parser to interpret and also is usually less specific. Using longhand to describe these elements instead is a better solution.
  1. padding
  2. margin*
  3. font
* These properties are unavailable for Form-based elements. Only control elements may use these properties.

Font Properties

  1. color
  2. font-size*
  3. font-weight**
  4. font-family
  5. font-style
* These properties only support an input as EM.
** This property only supports 'bold' as a value. All other values will be considered bold except 'lighter' and 'normal'.
 

CSS Extensions

In order to make our algorithms compatible with the CSS2 selectors and inheritance, we have implemented a number of features that provide readability and easy formatting to selectors in CSS. Note that we have not tested these methods to work with other CSS parsing algorithms, nor do we intend to. These modifications are designed to work strictly within Ronoix code, and will most likely *NOT* work in other parsing systems.

  1. Selector Fishing:

    Selector fishing is the process of using various prefixes to modify the behavior of the heirs of an element. For example:
    content > text {}
    and
    content !text {}
    will work the same. Here is a list of what can be replaced:

  2. Quoted Values:

    By default, CSS2 (as well as CSS) bans the use of quoting values. For example, under the current CSS/CSS2 specifications, the following CSS is invalid:
    h1 {color: "red"}
    The correct syntax would be:
    h1 {color: red}
    Our CSS parser is specifically designed to accept this, even though it is invalid. Regardless, quotes are stripped from the ends of the values by default, eliminating this problem.
  3. Underline Compatibility

    Because Ronoix uses WinForms to render pages, there may at times be data types that you need to modify that are automatically generated, and are not documented in Ronoix. To access these, simply find out what the true Type.ToString is for that object, and reference it as follows:

    Suppose you are modifying a divider. You would replace all '.'s in the divider type.tostring with '_'s and place that as a type descriptor in your CSS. Ex.:
    lookleft1_divider #menu {...}
    Because this method would automatically erase all underscores in the type, we highly recommend that you do not introduce any underscores into type descriptors that describe non-Ronoix objects.

HTML Conformance

Selectors

Extensions

HTML has been extended hundreds, if not thousands of times, making it more complex for everyone overall. Ronoix, because it is compatible with XML, is freely extensible. Thus, the CSS involved describes XML, not a dependant language such as HTML.

Shortcomings

Though we are working constantly to improve our CSS parser, we still are exhibiting some difficulties:

Notices

Here is some information that should be known when writing in CSS for this parser.