Version: (using KDE KDE 3.1) Installed from: Compiled From Sources Compiler: gcc (GCC) 3.2 OS: Linux Konqueror uses the first alternate stylesheet instead of the default stylesheet on all (new, after the redesign) pages of http://www.wired.com/. The stylesheets are imported via a section of <link>s looking like this: <link rel="stylesheet" type="text/css" media="screen" href="http://a1112.g.akamai.net/7/1112/492/2002091423/www.wired.com/news/v/20020914/css/cs6/wnScreen.css" /> <link rel="stylesheet" type="text/css" media="aural,braille,embossed" href="http://a1112.g.akamai.net/7/1112/492/2002091423/www.wired.com/news/v/20020914/css/wnOther.css" /> <link rel="stylesheet" type="text/css" media="print" href="http://a1112.g.akamai.net/7/1112/492/2002091423/www.wired.com/news/v/20020914/css/wnPrint.css" /> <link rel="alternate stylesheet" type="text/css" media="screen,print" href="http://a1112.g.akamai.net/7/1112/492/2002091423/www.wired.com/news/v/20020914/css/wnSm.css" title="Small Text" /> <link rel="alternate stylesheet" type="text/css" media="screen,print" href="http://a1112.g.akamai.net/7/1112/492/2002091423/www.wired.com/news/v/20020914/css/wnLg.css" title="Large Text" /> <link rel="alternate stylesheet" type="text/css" media="screen,print" href="http://a1112.g.akamai.net/7/1112/492/2002091423/www.wired.com/news/v/20020914/css/wnLg2.css" title="Larger Text" /> Mozilla shows 4 available styles in its menu: "Basic Stylesheet", "Small Text", "Large Text" and "Larger Text". Konqueror only the last three. Konqueror switches by default to "Small Text", while Mozilla stays with the "Basic Stylesheet". A similar behaviour can be observed on http://www.alistapart.com/. Both pages also offers style switching via JavaScript. This has no effect at all.
I can confirm the same wrong behaviour of khtml, with 3.1.2. An easy example is in: http://www.w3.org/Style Konqueror loads "blue shadows" by default, but it shouldn't, because that's an alternate stylesheet (it's the first stylesheet linked, but that fact, must be ignored). The default selected stylesheet, must be "Gold (right, fixed) + navbar", which has the "stylesheet" value for "rel" attribute. The explanation is in the specification ;-) : http://www.w3.org/TR/1999/REC-html401-19991224/present/styles.html#style-external
both examples wfm.
I can confirm the same behaviour (style change has no effect) with http://frenchmozilla.org and konqueror 3.1.3 (from kdebase-3.1.3-4tex)
This is odd. With Konq cvs the http://www.w3.org/Style page works as intended and you can switch between the sheets fine. However, like in bug: 63348, if you go to www.kde.org first and then to w3's style page, the style sheets do not get 'chosen' correctly. You still have the ability to view and choose each of them, but the first one that gets loaded is "Basic Page Style" -- this is the first one in the list -- not the desired "Gold (right, fixed) + navbar" style. Seems that it's a matter of Konqueror not selecting the correct style sheet when more than one is available.
I think this is related. http://toast.debian.net/~jmtd/konq/index.html This test page has two link tags - the first is an alternate stylesheet, the second a normal stylesheet. Konqueror opts for the former rather than the latter. It appears konq does not make a distinction between alternate stylesheet and stylesheet, and opts for the first one it comes across in the source.
Same wrong behaviour of khtml with 3.1.4 on GentooLinux
I could confirm this bug with kde 3.1.4 and KDE-HEAD from 03/10/19 as well. For an example see http://www.dipe.org - just switch there the styles at the top right...
With cvs-head from yesterday there seems to be still some bigger css-problems. As example just take a lookat the url given above with konqi and with moz. I guess this bug is really somewhat major cause there are more and more pages using css in replacment for blind tables, so I mark it as major :-)
Subject: kdelibs/khtml CVS commit by ggarand: - as discussed on kfm-devel: add an Automatic Detection mode in the "Use Stylesheet" menu. In this mode, the preferred sheet is chosen by the document, following the standard rules of precedence. If another sheet is manually chosen, then it gains a higher precedence and overrides the document's choice, thus becoming "sticky". - for manually chosen sheets: if the wanted stylesheet is still missing after <body> has been parsed, choose the document's preferred stylesheet until parsing ends(#63348). CCMAIL: 54335-done@bugs.kde.org CCMAIL: 63348-done@bugs.kde.org M +11 -0 ChangeLog 1.112 M +8 -4 khtml_part.cpp 1.943 M +9 -4 xml/dom_docimpl.cpp 1.264