On 11/29/07, John Joyce <dangerwillrobinsondanger / gmail.com> wrote:
>
> On Nov 29, 2007, at 1:27 AM, Cristi BALAN wrote:
>
> > On 11/29/07, Aaron Patterson <aaron / tenderlovemaking.com> wrote:
> >> Gossip Girl says:
> >>
> >> csspool version 0.2.0 has been released!
> >>
> >> * <http://csspool.rubyforge.org/>
> >>
> >> CSSpool (pronounced "cesspool") is a validating SAC parser for
> >> CSS.  The parser
> >> calls methods on a document handler depending on what it has
> >> found. CSSPool
> >> currently only supports CSS 2.1.  CSSPool will not yield invalid
> >> properties or
> >> selectors.
> >>
> >> [Snip]
> > Hi Aaron,
> >
> > Long time listener, first time caller... Love the show, btw.
> >
> > I've been toying around with the lib and I noticed some issues:
> >
> > [SNIP other issues]
> >
> > - the following css breaks css breaks the parser and makes it ignore
> > all rules and declarations after the error. In css, with browsrs at
> > least, an error should just ignore the respective property or
> > properties, so I was expecting similar behaviour. I'll try to get my
> > hands into the ragel stuff, but this might take a while since I
> > haven't done any before, saw a presentation at euruko, tho :).
> >
> > So, the bad css that's preventing me from getting a pink background
> > and a blue p:
> > a { color: red; }
> > body { border: solid 1px; #000; color: pink; }
> > p { color: blue; }
> >
> >>
>
> Problem here is bad CSS.
> you have:
> > body { border: solid 1px; #000; color: pink; }
> which could also be this with  more space:
> body {
>         border: solid 1px;      /*      this border will default to black, but perhaps
> you intended the #000 to be in this line notice your extra
> semicolon  ... */
>          #000;  /*      no property listed!     */
>          color: pink;   /*      this gives you pink text        */
>         }
>
> When you don't make it so tightly compact, you can see the mistake, I
> hope. Nothing there is going to give you a pink background.
> you need to put:
>         background-color: pink;
> Inside of either declaration body or p.
>
>
Hi John,

Yes, and the error is there on purpose.

I was reporting a bug in the way such errors are handled by the
csspool parser. Instead of just skipping the declarations you
correctly noticed in the css, it stops parsing the rest of the css
file.

I would have expected the color: pink for body and p { color: blue; }
to get parsed in spite of the error.

Cristi

-- 
Cristi BALAN
http://evil.che.lu/