Home

Styled Block

This type is marked as unstable and is subject to change.

Properties

The StyledBlock type has these properties:

NameDescriptionTypeInherited from
idThe identifier for this item.StringEntity
codeThe code of the equation in the styleLanguage.CordStyled
styleLanguageThe language used for the style specification e.g. css, twStringStyled
authorsThe authors of the code and content in the styled node.Author*Styled
provenanceA summary of the provenance of the code and content in the styed node.ProvenanceCount*Styled
compilationDigestA digest of the code and styleLanguage.CompilationDigestStyled
compilationMessagesMessages generated while parsing and transpiling the style.CompilationMessage*Styled
cssA Cascading Style Sheet (CSS) transpiled from the code property.StringStyled
classListA space separated list of class names associated with the node.StringStyled
contentThe content within the styled blockBlock*-

Related

The StyledBlock type is related to these types:

Bindings

The StyledBlock type is represented in:

Testing

During property-based (a.k.a generative) testing, the properties of the StyledBlock type are generated using the following strategies.

PropertyComplexityDescriptionStrategy
codeMin+Generate a simple fixed string of code.Cord::from("code")
Low+Generate a random string of up to 10 alphanumeric & space characters (trimmed). Avoid keywords used to identify other node types.r"[a-zA-Z0-9 ]{1,10}".prop_filter("No keywords", |code| !["include", "call", "if", "ifblock", "for"].contains(&code.trim())).prop_map(|code| Cord::from(code.trim()))
High+Generate a random string of up to 100 characters (excluding control characters).r"[^\p{C}]{1,100}".prop_map(Cord::from)
MaxGenerate an arbitrary string.String::arbitrary().prop_map(Cord::from)
styleLanguageMin+Do not generate a style language.None
High+Generate a random string of up to 10 alphanumeric characters.option::of(r"[a-zA-Z0-9]{1,10}")
MaxGenerate an arbitrary string.option::of(String::arbitrary())

This documentation was generated from StyledBlock.yaml by docs_types.rs.

© 2026 Stencila