W3CAmaya Doc

Cascading Style Sheet support in Amaya

This document describes the current state of the Cascading Style Sheet support in Amaya. The implementation is based on the CSS2 proposal . We focused on providing as many features as possible while offering an easy-to-use and learn interface. To make learning easy we choose a "learn by example" approach suitable for users not experienced with style sheets.

This document contains the following sections:

  1. Section "Presentation" gives a short overview of the CSS.
  2. Section "Interface" details the CSS specific areas of the Amaya interface.
  3. Section "Current State" presents the CSS functionalities that are currently implemented.
  4. Section "What's lacking" explains the main points to be improved or added.

Presentation

CSS defines a syntax to describe presentation associated with elements as a set of properties (like colors, fonts, etc.). Associated to properties, a selector restricts the application of these rules to a set of elements depending on their type (like H1, or LI), their context (like an EM in a H3) or classes applied to an element. A set of rules defines which properties are applied when more than one selector match a given element. While this is relatively simple for someone accustomed to handling structured documents, experience has shown that a new user may have difficulties modeling a document as a structured entity. This might be a problem when trying to introduce the CSS to a large audience.

Thus, the challenge is to build a tool simple enough so that inexperienced people can use styles when creating HTML pages with Amaya, while retaining all the possibilities of CSS. The interface was also designed to not hide the underlying complexity of the document structure (Structure View) and of the CSS language (CSS rules may be shown), in order to shorten the learning curve to structured presentation design.

One of the strongest features of CSS is the cascading model. Presentation rules can be fetched from different remote files, tied to the document or associated to one specific element in a page. This allows sharing and reuse of sets of rules while allowing specific presentation. It also allows the use of an user defined set of rules to accommodate his preferences. We tried to give a complete and simple view of the cascading model, showing separately specific presentation (Structure View), document specific rules (Structure View and CSS dialog box) and all the set of rules associated to the external style sheets referenced by the document. It is possible to manipulate rules in one style sheet but also to move them from one style sheet to another, allowing a user to take presentation rules from a remote server and apply them selectively to his own pages, in the purpose of building a pool of presentation rules.

User interface

We first present the Style interface as provided by the current version of Amaya:

The Amaya menu bar contains a Style menu containing all the actions related to presentation and style manipulation. Entries in that menu are ordered from the most specific to the most generic operations, except the last two entries, which are not related to CSS, but to HTML (Information type and Character element).

Current State

Here, we focus on what is currently supported from the CSS2 proposal:

There is support for user's preference which can be provided in

$(HOME)/.amaya/amaya.css (Unix) or Amaya\users\username\amaya.css (Windows).

What's lacking

First, considering the current draft compliance, the main issues for full CSS2 support are:


Irène Vatton
$Date: 1999/12/16 15:00:59 $