Gnus development mailing list
 help / color / mirror / Atom feed
From: Julien Danjou <julien@danjou.info>
To: ding@gnus.org
Subject: Re: [gnus git]  branch master updated: =2= shr: colorize only in one place ; shr: shr-colorize-region fix and stylesheet color retrieval fix
Date: Mon, 06 Dec 2010 17:33:33 +0100	[thread overview]
Message-ID: <sa3ipz6dfoi.fsf@cigue.easter-eggs.fr> (raw)
In-Reply-To: <m3ipz6vpk6.fsf@quimbies.gnus.org> (Lars Magne Ingebrigtsen's message of "Mon, 06 Dec 2010 17:22:49 +0100")

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

On Mon, Dec 06 2010, Lars Magne Ingebrigtsen wrote:

> It adds all the stuff from style="" to the (inherited) style sheet, so
> if background-color is present, it's inherited.

Yes, but you are forgetting about tag attributes like 'bgcolor':

<body bgcolor=...>
      ^^^^
this one was NOT added to shr-stylesheet, that's what I am talking
about. :)

> If any parent had color/background-color, then shr-colorize-region will
> be called with those colours.  That's the optimisation problem:
>
>     (let ((color (cdr (assq 'color shr-stylesheet)))
> 	  (background (cdr (assq 'background-color
> 				 shr-stylesheet))))
>
> shr-stylesheet here isn't the style="" from the current tag, but the
> inherited one (that includes the current tag, at this point).

I understand, but somehow you have to give the parent's background color
so if a children as a foreground color it can check the color.

One thing what still does not work correctly though:

<body bgcolor="yellow">
<div style="color: red; background-color: white;">
Foo la la la
<div style="color: white;">
<font color="red">dwq</font>
Bar
</div>
</div>
<div style="color: blue;">
Zot
</div>
</body>

"dwq" will not be in red. That's because I think we are not calling
shr-colorize at the right place.

-- 
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 16:33 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1PPcjn-0002Xs-00@quimby.gnus.org>
2010-12-06 15:24 ` Lars Magne Ingebrigtsen
2010-12-06 15:26   ` Lars Magne Ingebrigtsen
2010-12-06 15:54   ` Julien Danjou
2010-12-06 16:00     ` Lars Magne Ingebrigtsen
2010-12-06 16:03       ` Lars Magne Ingebrigtsen
2010-12-06 16:18         ` Julien Danjou
2010-12-06 16:25           ` Lars Magne Ingebrigtsen
2010-12-06 16:36             ` Julien Danjou
2010-12-06 16:41               ` Lars Magne Ingebrigtsen
2010-12-06 16:55                 ` Lars Magne Ingebrigtsen
2010-12-06 17:32                   ` colourising newlines (was: [gnus git] branch master updated: =2= shr: colorize only in one place ; shr: shr-colorize-region fix and stylesheet color retrieval fix) Lars Magne Ingebrigtsen
2010-12-14 23:51                     ` colourising newlines Ted Zlatanov
2010-12-15 19:30                       ` Lars Magne Ingebrigtsen
2010-12-15 21:03                         ` Ted Zlatanov
2010-12-15 21:30                           ` Lars Magne Ingebrigtsen
2010-12-15 21:40                             ` Ted Zlatanov
2010-12-16 15:54                               ` Lars Magne Ingebrigtsen
2010-12-16 20:43                                 ` Ted Zlatanov
2010-12-16 20:25                             ` Eric S Fraga
2010-12-17 16:43                               ` Lars Magne Ingebrigtsen
2010-12-18 19:20                                 ` Eric S Fraga
2011-01-19 22:24                             ` Ted Zlatanov
2011-01-22  3:02                               ` Lars Ingebrigtsen
2011-01-24 19:46                                 ` Ted Zlatanov
2010-12-06 16:17       ` [gnus git] branch master updated: =2= shr: colorize only in one place ; shr: shr-colorize-region fix and stylesheet color retrieval fix Julien Danjou
2010-12-06 16:22         ` Lars Magne Ingebrigtsen
2010-12-06 16:27           ` Lars Magne Ingebrigtsen
2010-12-06 16:48             ` Julien Danjou
2010-12-06 17:26               ` Lars Magne Ingebrigtsen
2010-12-06 17:30                 ` Julien Danjou
2010-12-06 17:33                   ` Lars Magne Ingebrigtsen
2010-12-06 16:33           ` Julien Danjou [this message]
2010-12-06 16:36             ` Lars Magne Ingebrigtsen

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=sa3ipz6dfoi.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).