One of the exciting things about cell is you can express everything as a JSON, except for a couple of scenarios. One of these is the style tag. And the style tag can be critical in some cases.
We can't always handle styles by attaching a style attribute directly to nodes, especially when we're trying to use change the style by toggling the node's class, as shown below:
One of the exciting things about cell is you can express everything as a JSON, except for a couple of scenarios. One of these is the style tag. And the style tag can be critical in some cases.
We can't always handle styles by attaching a
style
attribute directly to nodes, especially when we're trying to use change the style by toggling the node's class, as shown below:This is only possible as a CSS and not as an inline style, with all the css animations, etc.
Technically it is possible to create a style tag just like other tags, maybe like this:
But this doesn't scale because we're trying to squeeze in an entire CSS file into a
$text
attribute. Maybe there's an elegant way to handle CSS.