This is a super-simplistic CSS micro-engine. Phases The CSS handling is divided into: * The scanner It takes care of composing tokens from a string containing CSS source. It also takes care of eliminating either garbage code that was not recognized or things like whitespace and comments. The scanner will not attempt to recover from this garbage code but merely signal them to the upper layers. The scanner only works with strings but is a bit more high level than scanners in the sense of flex. The string "10em" will not just generate the two tokens , but rather combine them into one token. This only leads to problems with tokens of the sort # that can be both a hex color or hash so should not be a problem but rather mean that we will do less scanner calls. The scanner lives in scanner.* * The parser It takes a string with CSS code, composes tokens (from the scanner) into some meaningful syntax and transforms it to an internal set of structures describing the data (let's call it a "rawer"). It currently does no recovery when something unexpected shows up but skips to next special control char. The parser lives in parser.* and value.* * The applier It applies style info from a syntax tree (parsed ELinks or document stylesheet) or fragment of one (in the case of style="" attributes) to the current element. The applier lives in apply.* The current state Currently we both check the element's 'style' attribute, content of