it should be a:focus, not :focus
Leo Savernik
l.savernik at aon.at
Tue Sep 9 12:33:42 BST 2003
Hello,
Once upon a time I replaced the rule
:focus { outline: ... }
with
a:focus { outline: ... }
in html4.css.
This change has been reverted since then. So I think it's time to explain why
the focus rectangle should not be applied to all elements.
The reason for this very focus rule is to indicate the currently focused <a
href>. No other element comes to my mind that has a need for a focus
rectangle. Input elements draw their focus rectangles themselves, and thus do
not react to any css outline property.
Using :focus instead of a:focus will, however, apply an outline to *every*
focused element, which simply looks ugly on most of them. So I propose *not*
to apply an outline to focused elements by default.
Why does it matter? It's about -konq-user-input. All elements having their
-konq-user-input: enabled can receive focus (to be compatible to IE's
contenteditable). As it can be *every* element having assigned this property,
the focused element will have a focus rectangle drawn around the text. IE
does not do this, and I think in this case khtml should emulate IE behaviour
because it simply looks better.
So is it ok if I revert the revert?
mfg
Leo
More information about the kfm-devel
mailing list