Version: (using KDE KDE 3.5.0) Installed from: Gentoo Packages Compiler: gcc 3.3.5 OS: Linux :before and :after CSS pseudo-elements' content is incorrectly aligned in XHTML 1.0 Strict mode. XHTML 1.0 Transitional mode works fine. See the attached test case: good.html is XHTML 1.0 Transitional, bad.html is XHTML 1.0 Strict. Notice the alignment issue in upper-left and lower-left corners.
Created attachment 16267 [details] Test case
Confirmed. Notice however that there a several invalid statements in your CSS, which are ignored in both modes.
mmh, using font-size > 0 makes testcase work. Investigating that...
Created attachment 16299 [details] patch... Qt does not support setting a QFont to size zero (be it pixels or points, though it's only explicitly said in documentation for the latter)
SVN commit 552597 by ggarand: QFont does not support setting a zero pixel size. BUG:128024 M +3 -2 css/cssstyleselector.cpp M +3 -2 rendering/font.cpp --- branches/KDE/3.5/kdelibs/khtml/css/cssstyleselector.cpp #552596:552597 @@ -3167,10 +3167,11 @@ return; } - if(size < 1) return; + if (size < 0) return; // we never want to get smaller than the minimum font size to keep fonts readable - if(size < minFontSize ) size = minFontSize; + // do not however maximize zero as that is commonly used for fancy layouting purposes + if (size && size < minFontSize) size = minFontSize; //kdDebug( 6080 ) << "computed raw font size: " << size << endl; --- branches/KDE/3.5/kdelibs/khtml/rendering/font.cpp #552596:552597 @@ -459,7 +459,8 @@ } // make sure we don't bust up X11 - size = KMAX(0, KMIN(255, size)); + // Also, Qt does not support sizing a QFont to zero. + size = kMax(1, kMin(255, size)); // qDebug("setting font to %s, italic=%d, weight=%d, size=%d", fontDef.family.latin1(), fontDef.italic, // fontDef.weight, size ); @@ -475,7 +476,7 @@ if ( fontDef.smallCaps ) { scFont = new QFont( f ); - scFont->setPixelSize( f.pixelSize()*7/10 ); + scFont->setPixelSize( kMax(1, f.pixelSize()*7/10) ); } }