CSS

Imports

You can set a stylesheet to be used in a canvas by using the stylesheet property on the root node. The path is relative to the project’s root directory.

<div stylesheet="path_to_stylesheet.css">
  // Rest of layout
</div>


If you wish to use more than one stylesheet in a canvas, you can use the @import in your main CSS file.

@import "my_other_css.css";

// rest of CSS

Supported CSS properties

Property name

Property value

background-color

HEX COLOR

border-width

float

width, min-width, max-width

%, px or auto

height, min-height, max-height

%, px or auto

padding-left, padding-right, padding-top, padding-bottom

%, px or auto

margin-left, margin-right, margin-top, margin-bottom

%, px or auto

position

Absolute, relative

self-align

auto, flex-start, flex-end, center

justify-content

flex-start, flex-end, center, space-between, space-around, space-evenly

align-items

flex-start, flex-end, center, space-between, space-around, space-evenly

flex-wrap

wrap, no-wrap, wrap-reversed

flex-direction

row, column, row-reverse, column-reversed

flex-basis

px, %

flex-grow

%

flex-shrink

%

align-content

flex-start, center, flex-end, stretch, space-between, space-around

border-size

float

border-radius

px

border-color

hex

font-size

px

font-family

path to a font file

text-align

left, right, center

font-color

hex

overflow

show, hidden, scroll

visibility

visible, hidden

background-image

path to an image

z-index

int

top, bottom, left, right

px

Supported rules

Selector

Example

Explanation

class

.button

Selects all elements with the specified class

id

#root

Selects a unique id

:hover, :active

.button:hover

Selects when the class is hovered

descendent

.dropdown .content

Selects all child of dropdown with the class content