edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Adam Thompson <arthompson1990@gmail.com>
To: Karl Dahlke <eklhad@comcast.net>
Cc: Edbrowse-dev@lists.the-brannons.com
Subject: Re: [Edbrowse-dev] css parser
Date: Tue, 13 Feb 2018 18:59:36 +0000	[thread overview]
Message-ID: <20180213185936.l2la7s2rdsdze2fy@toaster> (raw)
In-Reply-To: <20180113134131.eklhad@comcast.net>

On Tue, Feb 13, 2018 at 01:41:31PM -0500, Karl Dahlke wrote:
> Earlier posts have discussed the possibility, and the advantages, of writing our own css parser and querySelectorAll.
> If we are content with handling the high runner cases, and maybe not every corner case, it might not be as hard as first appears.
> (We don't handle the unusual cases now anyways.)

Indeed and we've got to do something.  We need some of css but the third-party software just doesn't appear to be good enough... that's a shame.
> css selector syntax is described here.
> 
> https://www.w3.org/TR/CSS21/selector.html#grouping
> 
> There's a lot going on, but it's straightforward.
> An ideal css compiler would produce a 4 dimensional structure.
> I have implemented such, and it seems to work on the modest files I've tried.
> (I have yet to try the monster css file from stackoverflow.)
> Have a look at the comments in startwindow.js line 2105.
> If you want to play with it, browse any file with at least one css file,
> and in jdb,
> 
> v = mw0.cssPieces(mw0.uncomment(document.links[0].data));
> 
> Once this is shaken out, cssGather would call this instead of the third party css parser.
> Then we would write our own querySelectorAll, then invoke that from within cssApply.
> That's the roadmap.

Sounds good, I'll have a play with it and see what I can find.
Hopefully it all works as expected.

Thanks for working on this,
Adam.

  reply	other threads:[~2018-02-13 18:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-13 18:41 Karl Dahlke
2018-02-13 18:59 ` Adam Thompson [this message]
2018-02-14  4:54 ` Kevin Carhart
2018-02-14  7:59   ` Karl Dahlke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180213185936.l2la7s2rdsdze2fy@toaster \
    --to=arthompson1990@gmail.com \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    --cc=eklhad@comcast.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).