Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[] CSS Priorities

Hi all,

We've noticed an issue with the priorities of stylesheets declared in the Viewpoint/Architecture context (Which is actually an old issue, probably affecting at least Neon as well): as they are implemented in the same class as the Diagram stylesheets, they have the same priority (The viewpoint actually has a slightly higher priority in most cases). [1]

The idea for CSS was that "Tool stylesheets" have a lower priority, while "User" stylesheets have a higher one (i.e. more specific stylesheets have a higher priority).

The consequence of this bug is that, if a Viewpoint defines a rule (e.g. hides a Label), it may be impossible to override it, even via a rule defined in a CSS applied directly to the diagram (e.g. show the label hidden by the viewpoint).

A Gerrit patch [2] has been proposed to add a new priority level specifically for Viewpoints, rather than merging them with local diagram stylesheets. This priority is higher than user (Workspace) Theme, but lower than local (Diagram/Model/Project) stylesheets. This allows viewpoints to define "default preferences" but still lets the user to make local, diagram-specific adjustments.

This may however change some existing diagrams using local stylesheets. So, if you are concerned about this, please review the bug & patch, and speak up! :)

[1] 519412: Viewpoint Stylesheets have a very high priority

Camille Letavernier

Senior Software Engineer
EclipseSource Paris

Email: cletavernier@xxxxxxxxxxxxxxxxx
Phone: +33 1 85 41 09 21
Fax: +49 89 21 555 30 - 19

7 rue de la Croix Martre
91873 Palaiseau

General Manager: Rémi Schnekenburger

Back to the top