pub const fn translate() -> Option<TranslationParts>Expand description
CSS’s translation parts. The manifest’s translate object says that CSS
is read as and written from a tree of its own shape, the reader’s
stylesheet (the schema css-ast, whose root is an object), and the
render, css-render, writes that tree back as CSS text. There is no
embed: a host composes a translation into CSS only from CSS itself or
from a program that builds the tree. The texts are the crate’s copies
in translate/ of tabnas.plugin.json and alchemy/render.alc, which
npm run embed in ts/ writes and tests/translate.rs holds to the
files.
let parts = tabnas_css::translate().expect("CSS carries translation parts");
assert_eq!(parts.render.map(|part| part.entry), Some("css-render"));
assert!(parts.embed.is_none());