From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/74821 Path: news.gmane.org!not-for-mail From: Julien Danjou Newsgroups: gmane.emacs.gnus.general Subject: Re: [PATCH] shr: render table with style Date: Tue, 07 Dec 2010 12:16:15 +0100 Message-ID: References: <1291656608-16263-1-git-send-email-julien@danjou.info> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: dough.gmane.org 1291720611 15955 80.91.229.12 (7 Dec 2010 11:16:51 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 7 Dec 2010 11:16:51 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M23177@lists.math.uh.edu Tue Dec 07 12:16:48 2010 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PPvXL-0007tR-1k for ding-account@gmane.org; Tue, 07 Dec 2010 12:16:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1PPvX4-0002uH-TL; Tue, 07 Dec 2010 05:16:30 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1PPvX2-0002tw-PY for ding@lists.math.uh.edu; Tue, 07 Dec 2010 05:16:28 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PPvWx-0002w2-M1 for ding@lists.math.uh.edu; Tue, 07 Dec 2010 05:16:28 -0600 Original-Received: from coquelicot-s.easter-eggs.com ([213.215.37.94]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1PPvWw-0000fc-00 for ; Tue, 07 Dec 2010 12:16:22 +0100 Original-Received: from cigue.easter-eggs.fr (cigue.easter-eggs.fr [10.0.0.33]) by rose.easter-eggs.fr (Postfix) with ESMTPS id 5F51814035 for ; Tue, 7 Dec 2010 12:16:14 +0100 (CET) Original-Received: from jdanjou by cigue.easter-eggs.fr with local (Exim 4.72) (envelope-from ) id 1PPvWq-0001xu-Ar for ding@gnus.org; Tue, 07 Dec 2010 12:16:16 +0100 Mail-Followup-To: ding@gnus.org In-Reply-To: (Lars Magne Ingebrigtsen's message of "Tue, 07 Dec 2010 11:50:50 +0100") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:74821 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Tue, Dec 07 2010, Lars Magne Ingebrigtsen wrote: > If you replace bgcolor with style=3D"background-color: black", it looks > like I would expect... but perhaps I'm expecting the wrong thing? Yes it does. The problem is that bgcolor attribute reading is not done at the same level than style parsing. So, unless you want to special case bgcolor for in shr-descend, which would be ugly, I do not see how to deal with that. Well, I do have an idea: I think the colorization is not done at the right level. Maybe that should be the responsibility of shr-insert to colorize what it inserted, based on the current value of shr-stylesheet. That would solve the
problem, at least partially. Because the table code use `insert' rather than `shr-insert' for things like borders, they would not be colorized. This is why in my patches I've introduced another shr-insert-with-style function, and because shr-insert do some weird treatment on text. I let you think about that. :) =2D-=20 Julien Danjou // =E1=90=B0 http://julien.danjou.info --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkz+F4AACgkQpGK1HsL+5c21SgCePDPZuYqAr4rmXlK+2eIDBFXE ZXMAn0RRBp7iweWFI1i/+JI636S7YPQ3 =Ab3h -----END PGP SIGNATURE----- --=-=-=--