text selection consistency

Leo Savernik l.savernik at aon.at
Sun Sep 28 15:54:21 BST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Freitag, 26. September 2003 16:01 schrieb Dirk Mueller:
> On Thursday 25 September 2003 23:25, Leo Savernik wrote:
> > Btw, to give the user more control, I'd also like to port the ::selection
> > pseudo element from safari. This allows for custom selection colors in
> > style sheets.
>
> Never heard about something like that. is this specified by CSS ?

Yes, CSS 3 Selectors[1]. There are testcases available, too[2, 3, 4, 5]. khtml 
only supports color and background-color, I think that's sufficient (though 
not compliant). I merged it because otherwise the selection colors cannot be 
influenced by user style sheets. It's not meant to be used in author style 
sheets (yet).
>
> > We still don't know, but this isn't necessary to match NN, IE, Opera. I
> > solved it by simply adding a half-leading to the top and bottom of the
> > selection rectangle.
>
> Thats not solution. Of course it works now when you don't do XOR painting
> anymore, as overlapping selection areas don't neutralize each other.

Though the old solution used the text color as the background color and vice 
versa, it didn't do XOR painting. The new version does neither. Or are you 
referring to another aspect?

Khtml now exhibits the same behaviour wrt to text selections as Mozilla, i. e. 
if the line height is too small (< font-size), the selected text boxes will 
overlap. However, no sane site designer would do that.

mfg
	Leo

References:
[1] http://www.w3.org/TR/css3-selectors/#UIfragments
[2] 
http://www.w3.org/Style/CSS/Test/CSS3/Selectors/20030709/html/tests/css3-modsel-40.html
[3] 
http://www.w3.org/Style/CSS/Test/CSS3/Selectors/20030709/html/tests/css3-modsel-162.html
[4] 
http://www.w3.org/Style/CSS/Test/CSS3/Selectors/20030709/html/tests/css3-modsel-164.html 
[5] 
http://www.w3.org/Style/CSS/Test/CSS3/Selectors/20030709/html/tests/css3-modsel-165.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE/dvYdj5jssenUYTsRAvVvAJ9Y84yPhmpVYvxrgNK4NjgA9KzyDACeO5m0
HiXTXUEqDYu9dos+pS1ZI5k=
=I8DS
-----END PGP SIGNATURE-----





More information about the kfm-devel mailing list