[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#16200: shr should allow user to toggle HTML-specified colors on and
bug#16200: shr should allow user to toggle HTML-specified colors on and off
Thu, 03 Apr 2014 08:37:09 +0000
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
>>>>> Ivan Shmakov <address@hidden> writes:
> Badly-formatted netnews articles aren’t unknown in Usenet, so Gnus
> already comes with a set of commands  to improve the formatting of
> the messages as they’re shown to the user.
> I’d argue, however, that ugly HTML documents are much more common on
> the Web than such articles are on Usenet. Granted, shr.el does not
> (as of yet) support a good deal of features casually used to degrade
> the reader’s experience.
(Such as, for instance, font-size:, especially when combined
with a non-‘auto’ width:.)
> Still, it supports the ‘fgcolor’, ‘text’ and ‘bgcolor’ attributes to
> <body />, and the ‘color’ attribute to <font />, leaving the user no
> easy way to get rid of whatever color scheme the Web page author has
> decided to use.
And, well, it also supports the color-related CSS properties, at
least those specified via the ‘style’ HTML attribute.
> As a crude (but working) workaround, those suffering of the “too much
> color” problem may choose to redefine the shr-tag-body and
> shr-tag-font element handlers to simplistic wrappers around
> shr-generic in their ~/.emacs, like:
I stand corrected: this workaround does not help with the CSS
(‘style’ attribute) color settings. Redefining
shr-colorize-region to a no-op, however, seems to work:
'(defun shr-colorize-region (start end fg &optional bg)
A proper solution would probably be to allow for a custom
initial stylesheet, along with a proper cascading implementation
(including the ‘!important’ flag handling), so that the user
could both specify the default appearance, /and/ override the
explicit styles as set by the HTML document being rendered.
FSF associate member #7257
|[Prev in Thread]
||[Next in Thread]|
- bug#16200: shr should allow user to toggle HTML-specified colors on and off,
Ivan Shmakov <=