a highlighting colors proposal (with code)
(Maybe this one deserves to be called a patch. It seems pretty clearly to be an improvement to me, at least...) If a page has, e.g., black text on a black background, it is nice to be able to highlight it to read it. So this changes the behavior from highlighted background is inverted background and highlighted text is inverted text to highlighted background is inverted background and highlighted text is normal background. And that is a good improvement in most cases, but then bg_color=#808080 inverts to 7f7f7f. So I changed SHADING_INVERSE so that it's really more of a SHADING_CONTRAST (I left the name alone because you might have chosen to apply my recent widget coloring code, which had SHADING_INVERSE in it somewhere, and it's nice to have patches compile cleanly.) The one negative point I've seen is in something like: <html><head></head><body bgcolor=#808080 text=#808080 link=blue> words words <s>strike</s> <u>underline</u> <a href=link>link</a> words. </body></html> The highlighted text will show no distinction between the underlined text and the link. It didn't seem important enough to bother with at the moment...
Hi, On Tue, Jan 29, 2008 at 04:31:15AM +0000, place wrote:
(Maybe this one deserves to be called a patch. It seems pretty clearly to be an improvement to me, at least...)
If a page has, e.g., black text on a black background, it is nice to be able to highlight it to read it.
The idea for this problem (and others) is to have a small button, like the img-on/off, with a toolbox icon. When clicked the page is rendered using the force_my_colors style. The idea is to eventually be able to specify a CSS stylesheet that defines what "my_colors" is. And the button applies it on the rendered page. After developing the table apportion patch, it became somehow clear to me that the next big step to undertake is to start parsing some CSS. If we add a very simple parser and hook a few elements, then it can grow incrementally. This is not as hard as it looks because we presented a working prototype of this at FOSDEM 2005 with Sebastian. The parser should be no problem (as I know the html parser well), but for the CSS-dw2 hooks we'd need to ask Sebastian (and hope for some free time on his part) or to dig in the old prototype code and try to figure it out. I'd much prefer Sebastian to advice us because he has the CSS model and dw2 design in his head, and can save us from a boat load of trouble. Note: with regard to this patch. Would you mind implement the toolbox-button/force-my-colors approach? Note2: if this kind of highlight is regarded as better than the former, I have no problems to commit. These are independent ideas. -- Cheers Jorge.-
Jorge wrote:
On Tue, Jan 29, 2008 at 04:31:15AM +0000, place wrote:
(Maybe this one deserves to be called a patch. It seems pretty clearly to be an improvement to me, at least...)
If a page has, e.g., black text on a black background, it is nice to be able to highlight it to read it.
The idea for this problem (and others) is to have a small button, like the img-on/off, with a toolbox icon. When clicked the page is rendered using the force_my_colors style.
The idea is to eventually be able to specify a CSS stylesheet that defines what "my_colors" is. And the button applies it on the rendered page.
After developing the table apportion patch, it became somehow clear to me that the next big step to undertake is to start parsing some CSS. If we add a very simple parser and hook a few elements, then it can grow incrementally.
This is not as hard as it looks because we presented a working prototype of this at FOSDEM 2005 with Sebastian. The parser should be no problem (as I know the html parser well), but for the CSS-dw2 hooks we'd need to ask Sebastian (and hope for some free time on his part) or to dig in the old prototype code and try to figure it out.
I'd much prefer Sebastian to advice us because he has the CSS model and dw2 design in his head, and can save us from a boat load of trouble.
Note: with regard to this patch. Would you mind implement the toolbox-button/force-my-colors approach?
Note2: if this kind of highlight is regarded as better than the former, I have no problems to commit. These are independent ideas.
I started trying to formulate questions because it made sense to do things that fit with how it would eventually work with CSS -- and I don't really know too clearly how things are supposed to work with CSS -- but... well, if your Devious Maintainer Plan was to get me to say "Oh, let's not worry about forcing colors for now, and try to get some css going," then you have succeeded.
participants (2)
-
jcid@dillo.org
-
place@gobigwest.com