Summary: | [testcase] khtml should NOT use "standard background" and "standard text" settings from colour scheme | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Paul Hoepfner-Homme <ahd9ryi02> |
Component: | khtml renderer | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | bugzilla, chris, daniel.hill, finex, flami, Henning.Fleddermann, jgelens, maarizwan, maurizio.colucci, pch1, rafl |
Priority: | NOR | ||
Version: | 3.1 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
A screenshot of Konqueror displaying a popular website when a non-standard KDE colour scheme is chosen
Testcase rendering some sample text with background not set (transparent) |
Description
Paul Hoepfner-Homme
2003-02-02 08:45:27 UTC
Created attachment 860 [details] A screenshot of Konqueror displaying a popular website when a non-standard KDE colour scheme is chosen Here is what http://www.pcfinancial.ca/ looks in Konqueror when you have chosen light text and a dark background in the KDE colour scheme. Konqueror should not use those values for the default HTML text and background colours, but rather have its own colour settings, which are, respectively, black and white by default. As you can see, the website looks very sh*tty. I had the same problem with sites setting new background colour and at the same time not setting new text colour, fairly common I am afraid. See for example http://www.tbray.org/ongoing/ Note that I had to exit Konqueror and start a new one to actually see the error, for some reason refresh did not help (after I changed the colour scheme). I am running kde 3.1.1 on gentoo. One colour scheme with white text and dark green background is Digital CDE. hell, yes - we have enoght dups on this: 34248, 47320 (and at least one other) *** Bug 34248 has been marked as a duplicate of this bug. *** *** Bug 52610 has been marked as a duplicate of this bug. *** *** Bug 23963 has been marked as a duplicate of this bug. *** *** Bug 57183 has been marked as a duplicate of this bug. *** Let's just say, I can confirm this bug and know it has been present for ages. I have spoken to Dirk Mueller about this and he has tried to fix it. However, it's still broken and the solution should be, as is mentioned in the report, standard colors for khtml (text black, background white, links blue, visited links red, buttons, textforms etc 'normal' colors). *** Bug 36434 has been marked as a duplicate of this bug. *** For what it's worth, I believe you could work around this by specifying a custom stylesheet and setting colors in the stylesheet for INPUT and SELECT elements. *** Bug 74905 has been marked as a duplicate of this bug. *** On a related note, "standard HTML background" and "standard HTML text" colour settings could perhaps also be applied to other applications displaying printable documents, the one I have in mind being KWord. I like using dark colour schemes and it annoys me greatly that KWord draws my documents in deep purple/green/whatever colour takes my fancy that week. I know this is something that could be fixed per-application, but having global settings for "standard document background" and "standard document text" that could then be used by the HTML renderer, word processors and anything else seems sensible to me. This, i would say VERY annoying problem still exists in KDE 3.4. Because so many websites assume that default background colour is white, it's almost impossible to use konqueror for web surfing when user has custom colour scheme. Please fix this :I Also experiencing this problem, don't mind using a user-defined stylesheet for custom form element colours at all (they are useable with dark colours, just don't fit the colour schemes of sites that assume unspecified is light grey ;), but as khmtl currently (3.5.2) seems to default to black text when unspecified, wouldn't it make sense (or at least be legible) to default to a white background if that is unspecified? Still present in 3.5.6.... I've read quite a few postings about this bug, and appreciate that using the system background colour is correct. However this doesn't fit the use-case scenario of: a. good web designers specify a background colour using css (no problem either way). b. bad web designers assume the default background colour to be white. User css is currently not an option due to the unique handling of the body element (margins are also coloured in the body colour, unlike any other element), and the rampant use of the deprecated bgcolor body attribute, which does not override user css. Applying a colour to the html element using user css results in white borders round the body element (which can occasionally occupy a large portion of the page), and applying a colour to the body element using user css results in breakage of sites that are still using the bgcolor attribute. My suggestion to solve this issue is to make sure the special handling of the body element happen whether the html element has a css specified background or not, making user css a viable solution for those wishing to use a 'non-standard' system colour scheme yet have black on white (or any other colours for that matter) as default colours for web pages. In the meantime, for those who just want a fixed white background now: --- khtml/rendering/render_box.cpp~ 2007-04-29 21:37:09.000000000 +0100 +++ khtml/rendering/render_box.cpp 2007-04-29 21:37:11.000000000 +0100 @@ -323,7 +323,7 @@ } if( !bgColor.isValid() && canvas()->view()) - bgColor = canvas()->view()->palette().active().color(QColorGroup::Base); + bgColor = QColor(255, 255, 255); int w = width(); int h = height(); Created attachment 24213 [details]
Testcase rendering some sample text with background not set (transparent)
Confirmed in trunk r793971. New testcase added (ofc needs the KDE background set) Still present in 4.0.84, this might be the biggest nuisance in Konqueror. Because you cannot expect every website to have a perfect style information, i think it is important that they are rendered the same way as most web browsers do, (which is what web designers expect ) that would be white background , black text. Or make it completely customizable. The way it is now ( and apparently been for 7 years ) is not the right solution. PS: Also right now, I am using the additional comment box on this page, i have a dark text field , and somehow the text is black , so I'm typing blind , but Dots, comas, numbers appear in white. Still here in 4.1.0. Overall I really digg the much improved support for dark color schemes in KDE4. Many things work much better than with kde3, e.g. katepart gets a useable theme as well. However Konqueror copes rather badly. Of course, it would be nice, if all web-pages were programmed right, but until that is the case, I would really like to use Konqueror.... Please add a Checkbox to SystemSettings that reads something like this: [ ] Use Color-Scheme for KHTML-Part and WebKit-Part Thank you very much! P.S.: This issue was first reported for Konqueror2 IIRC ;) https://bugs.launchpad.net/ubuntu/+source/kdebase/+bug/260572 posted a bug for it on kubuntu, i would be nice if the Dev acknowledged the existence of this bug sure this may technically not be a bug, (actually using generic font colours and an inherited back ground colour is inconsistent. either, or but not both should be the way, so perhaps it is a bug), but the day that every web page complies with w3c guide lines( these are only guide lines as well not rules), is the day pigs fly Still present in KDE 4.1.1 on Gentoo (from kde-testing), but I've seen it since the KDE3 series. This actually applies to more than just background color, as KHTML uses the standard widgets inside the page. For example, the box I'm typing in is almost white-on-white because of my color scheme. Is it not possible to just fix the default colors for KHTML (text + background) to something sensible? It seems weird that this has been around this long without even a simple fix. I've been trying to adjust the default CSS file, and I've had some success. I see no reason that the defaults for web-related stuff shouldn't be black text on white background, and I think removing all of the ties between the default CSS and the user's color scheme would be a fair and rather easy solution to this. If I get something solid I'll post a patch. On a side-note, the last modification to the default stylesheet is copyright 2003, which is when this bug was filed (and it's still "NEW"). Has anyone looked at this since? Does it work if you create a default.css with the text: body { background-color:white; color:black } And go to Settings > Configure Konqueror > Appearance > Stylesheets and point it to this document in "Use user-defined stylesheet"? > Does it work if you create a default.css with the text:
I just tried the css, but it seems that it is ignored. standard apache directory listings are still black text on dark background.
Also the "accessibility stylesheet" is ignored, I set it to white Background, black text, but nothing has changed compared to the default stylesheet.
I looked at : kde4libs-4.1.2/doc/common/kde-default.css
and the 1st block says:
body {
background: white none;
color: black;
...
}
I assume this is the one konqueror uses when it is set to "use default stylesheet".
I'm wondering why it ignores the stylesheets.
I just edited "kde-default.css" by removing the "none" in the 1st block to : body { background: white; ... } and used it in the stylesheet settings . I restarted konqueror and my directory listing had a white background. ( but it seems to make the google.com copyright notice move from the middle to the bottom left. ) I tried to use the accessibility css again and it works too, but it seems to suppress background images , even though i disabled suppression of those. The css posted by Rafael Leal does not work. PS:Im sorry that I was a bit hasty with my previous message There is a bug with accessibility stylesheets in 4.1.2. Not sure which version I fixed it in (assuming I didn't forget to commit the fix). I'm using Konqueror 4.1.96 (4.2rc1, Kubuntu Intrepid) The css I posted works here. (In reply to comment #23) > Does it work if you create a default.css with the text: > > body { > background-color:white; > color:black > } > > And go to Settings > Configure Konqueror > Appearance > Stylesheets and point > it to this document in "Use user-defined stylesheet"? This works for me using KDE 4.2 on Gentoo x86_64. Thanks. Still it'd be nice if the devs would fix this problem in kde out of the box. Hannes Hauswedell's idea sounds reasonable. *** This bug has been marked as a duplicate of bug 47320 *** Please, all voters of this bug should vote for bug #47320. |