Gnus development mailing list
 help / color / mirror / Atom feed
From: Julien Danjou <julien@danjou.info>
To: ding@gnus.org
Subject: Re: Cascading styles
Date: Mon, 06 Dec 2010 12:21:42 +0100	[thread overview]
Message-ID: <sa3pqtfqh89.fsf@cigue.easter-eggs.fr> (raw)
In-Reply-To: <m3pqtg1hvh.fsf@quimbies.gnus.org> (Lars Magne Ingebrigtsen's message of "Sun, 05 Dec 2010 14:14:42 +0100")

[-- Attachment #1: Type: text/plain, Size: 1358 bytes --]

On Sun, Dec 05 2010, Lars Magne Ingebrigtsen wrote:

> Yes, but that's special-casing the colour things.  :-)  If you have
>
> <p style="border: 3px;">foo<p>bar
>
> then only the top-level p should have a border, and the next one
> shouldn't.  But it's kinda moot, since I don't think any of the
> properties we're interested in have this kinda of behaviour.

Well, rendering foo is calling shr-descend, so you'll only have border
style set on foo. (how to draw the border is another problem. :))

>> With:
>> <p style="background: blue; color: red;">foo<p style="color: green;">bar</p></p>
>>
>> You start with the first style, render foo with background and
>> foreground. Then you got for bar via shr-descend, which changes color to
>> green, but merge with the previous dynamically bound shr-stylesheet, so
>> it still has background set to 'blue'. You render bar, exit 2
>> shr-descend calls, and continue to render what else is in the document.
>
> Yes...  except that we're setting the colour after rendering all the
> children today.

Yes, that's our problem I think. I think it should be done in 2 passes:
first render text (`insert') then render style (`overlay'). That would
probably solves all the problem (and maybe insert new ones :-)).

-- 
Julien Danjou
// ᐰ <julien@danjou.info>   http://julien.danjou.info

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

  parent reply	other threads:[~2010-12-06 11:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-25  1:20 Lars Magne Ingebrigtsen
2010-11-25  9:41 ` Julien Danjou
2010-11-26  1:16   ` Lars Magne Ingebrigtsen
2010-11-26  9:17     ` Julien Danjou
2010-12-05 13:14       ` Lars Magne Ingebrigtsen
2010-12-05 14:32         ` Lars Magne Ingebrigtsen
2010-12-06 11:21         ` Julien Danjou [this message]
2010-12-06 11:24           ` Lars Magne Ingebrigtsen
2010-12-06 15:12             ` Julien Danjou

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=sa3pqtfqh89.fsf@cigue.easter-eggs.fr \
    --to=julien@danjou.info \
    --cc=ding@gnus.org \
    /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).