From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Thu, 13 Mar 2008 17:30:27 -0300 From: "Iruata Souza" To: weigelt@metux.de, "Fans of the OS Plan 9 from Bell Labs" <9fans@9fans.net> In-Reply-To: <20080313145830.GB24834@nibiru.local> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080311170105.GA28200@nibiru.local> <32d987d50803111012u5c91384ale2ef958e0558cbf5@mail.gmail.com> <20080312213636.GB28200@nibiru.local> <20080313145830.GB24834@nibiru.local> Subject: Re: [9fans] CSS parser for abaco [WAS: abaco @ plan9port] Topicbox-Message-UUID: 7886591c-ead3-11e9-9d60-3106f5b1d025 On Thu, Mar 13, 2008 at 11:58 AM, Enrico Weigelt wrote: > > Hi folks, > > as abaco doesn't yet have CSS support, I intend to write some > tiny CSS parser/loader. > > If we represent the CSS contents as an tree structure, we basicly > have these node types: > > * media type: container for holding media-specific data. > per default we're operating in "all". to make it simplier, > the parse could be told to only honor one specific type. > * @import: tells us to include another file > it could be either resolved within the parsing process by > an call-back or simply added to the output tree > * per-object: has one and more object addresses (eg. via ID, > classname or even some path) and contains a list of properties. > for make it simpler, we can "flatten" multiple addresses by > inserting an copy per single address > * object properties: are just name+value pairs of (almost) > arbitrary strings. some of the values could be also parsed and > split into several other properties (eg. some url() statement > could be replaced by an addittional *-url property). > > While parsing this way into a list of property lists isn't that > challenge, there are still some open questions, eg. should most > of the properties representing specific type of data (eg. borders > and padding) be split off to the finest granilarity and maybe also > identified by an integer ID instead of the name or does this > belong to the client (-> renderer) ? > a css parser is already being added. if you had bothered yourself searching the archives, you'd know that. iru