Gnus development mailing list
 help / color / mirror / Atom feed
From: Julien Danjou <julien@danjou.info>
To: ding@gnus.org
Subject: Re: Cascading styles
Date: Fri, 26 Nov 2010 10:17:25 +0100	[thread overview]
Message-ID: <sa339qomoka.fsf@cigue.easter-eggs.fr> (raw)
In-Reply-To: <m3eia8vq8b.fsf@quimbies.gnus.org> (Lars Magne Ingebrigtsen's message of "Fri, 26 Nov 2010 02:16:36 +0100")

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

On Fri, Nov 26 2010, Lars Magne Ingebrigtsen wrote:

>>> So you'd inherit down into the DOM and pop when you exit.  However,
>>> would that be correct?  Er, no, not really.  So you'd basically have the
>>> inline thing, plus the stylesheet, but not endlessly combining inline
>>> things.
>>
>> I am missing the why. :)
>
> Well, in this case, the colour renderer is interested in seeing what
> background is, so it's (sort of) inherited downwards, while a border
> setting is not.
>
> Perhaps we should just special-case the colour settings.

I don't like special-case.

I don't see why inheriting would not work with what you did propose. if
its shr-descend call adds style information to the dynamic variable
shr-stylesheet (and merge them of course), we're just having correct
inheritance.

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.

If only I had more time I would try to implement something. :)

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

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

  reply	other threads:[~2010-11-26  9:17 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 [this message]
2010-12-05 13:14       ` Lars Magne Ingebrigtsen
2010-12-05 14:32         ` Lars Magne Ingebrigtsen
2010-12-06 11:21         ` Julien Danjou
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=sa339qomoka.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).