The style-global object

Type: Dictionary

The style object is a way to define visual styling within an MNX document. Its required "selector" specifies which MNX element(s) the style applies to.

See Styling an MNX document for more.

This example defines a style class "emphasized", which means to use the color red:

{"selector": ".emphasized", "color": "#ff0000"}

A note object can then use "class" to use this style class.

This example says "all notes must be blue":

{"selector": "note", "color": "#0000ff"}

At the moment, the only available style property is "color".

Attributes

Name Type Required? Description
color color No The color to apply to any elements targeted by this style.
selector style-selector Yes A CSS-style selector that specifies which MNX object(s) this style applies to.

Currently MNX supports two types of selectors, object selectors and style selectors.

Plus globally available attributes: _c, _x, id

Parent objects

This object is used by the following parent objects:

Examples

This object is used in the following examples:

Styling elements (basic), Styling via a class (basic)