MyScript iink SDK makes it easy to style content with css properties listed in this page. In addition to these css styling properties, you can adjust its default configuration with different options presented here.

Restrictions from CSS

The following restrictions apply:

Type hierarchy

MyScript iink SDK exposes the following type hierarchy:

It is possible to combine class and type selectors:

glyph.text {}
line.diagram {}
arc.diagram {}

Available classes per content type

Diagram block

Class Description  
.diagram Default class for items in a “Diagram” content block.  
.diagram-anim-fill Style applied to fill diagram shapes when diagram.recognition.feedback is set to animation-fill.  
.diagram-fill Style applied to fill diagram shapes when diagram.recognition.feedback is set to background-fill.  
.diagram-guideline Style applied to the diagram alignment guides.  
.diagram-handle Style applied to the diagram selection handles.  

Drawing block

Class Description
.drawing Default class for items in a “Drawing” content block.

Math block

Class Description
.math Default class for items in a “Math” content block.
.math-variable Style applied to the variables after ink conversion.
.math-solved Style applied to the glyphs that are generated by the solver.

Text block

Class Description
.text Default class for items in a “Text” content block.
.text-heading1 Style of text headings of level 1 (Text Document only).
.text-heading2 Style of text headings of level 2 (Text Document only).
.text-emphasis1 Style of text emphasis type 1 (Text Document only).
.text-emphasis2 Style of text emphasis type 2 (Text Document only).
.text-highlight Style of highlighted text.

The behavior in a “Text Document” part is as follows:

Raw Content

The following classes apply to both Raw Content parts and blocks:

Class Description
.raw-content Default class for items in a “Raw Content” block/part.
.raw-content-grid Default class of the “Raw Content” block/part background grid, when the text-document.raw-content.line-pattern/raw-content.line-pattern is grid.

Whereas the following classes are specific to Raw Content parts:

Class Description
.raw-content-anim-fill Sets how shapes should be filled when raw-content.recognition.feedback is set to animation-fill.
.raw-content-fill Sets how shapes should be filled.
.raw-content-shape Default class for shape items in a “Raw Content” part.
.raw-content-text Default class for text blocks in a “Raw Content” part.
.raw-content-drawing Default class for non text and/or not shape items in a “Raw Content” part. See details below.

The recognition feedback via styling in a Raw Content part behaves as follows:

  1. if raw-content.recognition.shape is disabled, .raw-content-text styling properties will apply to text blocks and raw-content-drawing to the rest of the content.
  2. if raw-content.recognition.shape is enabled, .raw-content-text styling properties will apply to text blocks, .raw-content-shape to shape items and raw-content-drawing to the rest of the content.

The raw-content.feedback.type should be activated for debug purpose only.

Properties per class

.diagram

Property Default value Remarks
font-family “sans-serif”  
font-style normal  
font-variant normal  
font-weight 300 Only numerical values are supported.
font-size None1 In millimeters (model unit).
line-height None1 Multiplier of the font size.
color #000000FF See possible values.
-myscript-pen-width 0.625 In millimeters (model unit).
-myscript-pen-brush FeltPen Sets the brush for the drawn strokes. Does not impact selections, handles and converted shapes. See possible values.

.diagram-anim-fill

Property Default value Remarks
-myscript-pen-fill-color #00000014 See possible values.

.diagram-fill

Property Default value Remarks
-myscript-pen-fill-color none See possible values.

.diagram-guideline

Property Default value Remarks
color #1A8BFFFF See possible values.
-myscript-pen-width 1.0 In millimeters (model unit).

.diagram-handle

Property Default value Remarks
color #1A8BFFFF See possible values.
-myscript-pen-width 1.0 In millimeters (model unit).
-myscript-pen-fill-color #44AADF88 See possible values.

.drawing

Property Default value Remarks
color #000000FF See possible values.
-myscript-pen-width 0.625 Unit is mm.
-myscript-pen-brush FeltPen See possible values.

.math

Property Default value Remarks
font-family STIXGeneral  
font-style normal  
font-variant normal  
font-weight 300 Only numerical values are supported.
color #000000FF See possible values.
-myscript-pen-width 0.625 Unit is mm.
-myscript-pen-brush FeltPen See possible values.

.math-variable

Property Default value Remarks
font-family STIX  
font-style italic  
font-variant normal  
font-weight 300 Only numerical values are supported.
color #000000FF See possible values.

.math-solved

Property Default value Remarks
font-family STIXGeneral  
font-style normal  
font-variant normal  
font-weight 300 Only numerical values are supported.
color #A8A8A8FF See possible values.

.text

Property Default value Remarks
font-family “sans-serif”  
font-style normal  
font-variant normal  
font-weight 300 Only numerical values are supported.
font-size None1 In millimeters (model unit).
line-height None1 Multiplier of the font size.
color #000000FF See possible values.
-myscript-pen-width 0.625 In millimeters (model unit).
-myscript-pen-brush FeltPen See possible values.

Note that “Text” and “Text Document” guides spacings are not identical.

For instance, the following CSS will correspond to a 13-millimeter spacing when the theme is set to a “Text” part. For a “Text Document” part, the example is still valid but the outcome might be slightly different.

.text {
  font-size: 10;
  line-height: 1.3;
}
In both cases, to avoid visual artifacts, you should change the editor theme before opening the part.

.text-heading1

Property Default value Remarks
font-family “sans-serif”  
font-style normal  
font-variant normal  
font-weight 700 Only numerical values are supported.
font-size None1 In millimeters (model unit).
line-height None1 Multiplier of the font size.
color #000000FF See possible values.
-myscript-pen-width 0.625 In millimeters (model unit).
-myscript-text-decoration-pen-width 0.625 In millimeters (model unit).
-myscript-pen-brush FeltPen See possible values.

stroke.text-heading1

Property Default value Remarks
-myscript-text-decoration-style double-underlined See possible values

glyph.text-heading1

Property Default value Remarks
-myscript-text-decoration-style none See possible values

.text-heading2

Property Default value Remarks
font-family “sans-serif”  
font-style normal  
font-variant normal  
font-weight 700 Only numerical values are supported.
font-size None1 In millimeters (model unit).
line-height None1 Multiplier of the font size.
color #000000FF See possible values.
-myscript-pen-width 0.625 In millimeters (model unit).
-myscript-text-decoration-pen-width 0.625 In millimeters (model unit).
-myscript-pen-brush FeltPen See possible values.

stroke.text-heading2

Property Default value Remarks
-myscript-text-decoration-style underlined See possible values

glyph.text-heading2

Property Default value Remarks
-myscript-text-decoration-style none See possible values

.text-emphasis1

Property Default value Remarks
font-family “sans-serif”  
font-style normal  
font-variant normal  
font-weight 700 Only numerical values are supported.
font-size None1 In millimeters (model unit).
color #000000FF See possible values.
-myscript-pen-width 0.625 In millimeters (model unit).
-myscript-text-decoration-pen-width 0.625 In millimeters (model unit).
-myscript-pen-brush FeltPen See possible values.

stroke.text-emphasis1

Property Default value Remarks
-myscript-text-decoration-style underlined See possible values

glyph.text-emphasis1

Property Default value Remarks
-myscript-text-decoration-style none See possible values

.text-emphasis2

Property Default value Remarks
font-family “sans-serif”  
font-style normal  
font-variant normal  
font-weight 700 Only numerical values are supported.
font-size None1 In millimeters (model unit).
color #000000FF See possible values.
-myscript-pen-width 0.625 In millimeters (model unit).
-myscript-text-decoration-pen-width 0.625 In millimeters (model unit).
-myscript-pen-brush FeltPen See possible values.

stroke.text-emphasis2

Property Default value Remarks
-myscript-text-decoration-style double-underlined See possible values

glyph.text-emphasis2

Property Default value Remarks
-myscript-text-decoration-style none See possible values

.text-highlight

Property Default value Remarks
font-family “sans-serif”  
font-style normal  
font-variant normal  
font-weight 700 Only numerical values are supported.
font-size None1 In millimeters (model unit).
-myscript-pen-width 0.625 In millimeters (model unit).
-myscript-text-decoration-pen-width 0.625 In millimeters (model unit).
-myscript-pen-brush FeltPen See possible values.

stroke.text-highlight

Property Default value Remarks
-myscript-text-decoration-style framed-background See possible values

glyph.text-highlight

Property Default value Remarks
-myscript-text-decoration-style framed-background See possible values

.raw-content

Property Default value Remarks
color #000000FF See possible values.
-myscript-pen-width 0.625 Unit is mm.
-myscript-pen-brush FeltPen See possible values.

.raw-content-grid

Property Default value Remarks
color #00000011 See possible values.

.raw-content-fill

Property Default value Remarks
-myscript-pen-fill-color none See possible values.

.raw-content-anim-fill

Property Default value Remarks
-myscript-pen-fill-color none See possible values.

.raw-content-shape

Property Default value Remarks
color #000000FF See possible values.
-myscript-pen-width 0.625 Unit is mm.
-myscript-pen-brush FeltPen See possible values.

.raw-content-text

Property Default value Remarks
color #000000FF See possible values.
-myscript-pen-width 0.625 Unit is mm.
-myscript-pen-brush FeltPen See possible values.

.raw-content-drawing

Property Default value Remarks
color #000000FF See possible values.
-myscript-pen-width 0.625 Unit is mm.
-myscript-pen-brush FeltPen See possible values.

Possible values

Colors

Colors can be specified as rgb(), rgba(), hsl(), hsla(), #rgb, #rgba, #rrggbb, #rrggbbaa.

Named colors (black, red, etc.) are not supported.

-myscript-pen-brush

Possible values for pen brushes are: Polyline, FountainPen, CalligraphicQuill, CalligraphicBrush, Qalam and FeltPen.

-myscript-text-decoration-style

The highlight background color is the pen color with alpha, and the frame color is the pen color.

  1. iink computes the default line height and font size based on the device resolution instead of using a static css containing default values.  2 3 4 5 6 7 8 9 10 11