LivelyKernel/LivelyKernel — pull request #61 by bgnk (2012-10-30 21:16:30+00:00)
Title: Text Styling via CSS

Use `myTextMorph.setTextStylingMode(true)` to enable text CSS styling.
Supported properties are font-size, font-family, font-weight, font-style, text-align, color and white-space.

Right now the properties text-decoration, vertical-align, display and word-break cannot be set via CSS. This is due to the general DOM structure of the text morph. There the text itself sits inside a div (the textNode) which is a child of the morph's shapeNode. Since with the usual way of selecting a morph only the shapeNode is addressed, merely the style properties that are inherited (which are font-size, font-family etc.) take effect on the actual text when applied through CSS.

Possible solutions for this problem:
+ Disable the built-in setting of the affected properties when CSS text styling is on and simply let the user *directly* select the textNode (i.e. ".Text .visibleSelection")
+ Catch the affected properties while parsing and inject a *separate style node* with an adapted selector for the textNode into the DOM

I don't think the missing support for these properties should be a reason not to merge this branch into master, but bringing them in should definitely go on our todo list.