An example: Apply text CSS rules

At this step, all nodes contains all their CSS rules.
MorphicBoxTextNode>>loadStylesFrom:aNode
self txtSize: aNode textSize.
self txtColor: aNode textColor.
self txtItalic: aNode textItalic.
self txtFont: aNode textFont.
self txtBold: aNode textBold.
self txtAlign: aNode textAlign.
...
****
HtmlDOMNode>>textColor
^( self getStyle: 'color' isNil )
	ifTrue:[Color black.]
	ifFalse:[Color fromString: color].
****
HtmlDOMNode>>getStyle: aStyle
|properties style|
style:=nil.
(self styles)
	do:[:rule | 
		properties:= rule properties.
		properties do:[:prop| 
			(prop propertyName = aStyle)
				ifTrue:[style:=prop propertyString]
			].].
^style.



Jerome Chauveau 2007-06-21