Skip to main content

Module drawable_defaults

Module drawable_defaults 

Source
Expand description

Default HTMLDrawable implementations for cotis_defaults::render_commands types.

These impls map layout output to CSS on shared DOM host elements (cotis-{id}). Multiple drawables with the same command id accumulate styles on one node via HTMLCanvas::ensure_command_element.

ยงSupported commands

CommandDOM hostKey CSS
Rectanglecotis-{id}, tag from ExtraHTMLDataposition:absolute, background-color, border-radius
Bordersameper-side border-*: Npx solid
Textsamefont-family: font{id}, color, flex, white-space: pre-wrap
Imagesamebackground-image: url(...), background-size: 100% 100%
ClipStart / ClipEndclip container stackoverflow: hidden, rounded clip
RenderTList(recursive)dispatches Type / List variants