Closed
Bug 292566
Opened 19 years ago
Closed 15 years ago
::selection/::-moz-selection pseudo-element ignored on form controls
Categories
(Core :: Layout: Form Controls, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 183646
People
(Reporter: pete_a90, Unassigned)
Details
Attachments
(1 file)
916 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050430 Firefox/1.0+ Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050430 Firefox/1.0+ It's ignored, but not quite really though. If you put something like this: ::-moz-selection { background-color:#EB0 !important; color:#fff !important; } in userContent.css, it uses these colors instead of the system colors except for SELECT element, where selected text still uses the system colors. Reproducible: Always Steps to Reproduce:
ugly looking testcase, but it shows that you can replace colors, bg-colors, and borders except for the selection color on form controls.
Comment 2•19 years ago
|
||
That's not a bug, IMHO; the select element's selection is not a text selection, it's an item selection, and is therefore not covered by ::selection.
Oops, you're right, authors should use option[selected] to style it. The rest of the bug report still applies though.
Comment 4•19 years ago
|
||
Could you specify what behaviour you think should change for this bug report to be considered fixed? I don't understand what there is here other than the <select> case.
On my machine, viewing this testcase, ::-moz-selection isn't being applied to the textarea or type="text" input box when you highlight its text.
Comment 6•19 years ago
|
||
The only reason it works in userContent.css is because that applies to anonymous content. From a page's point of view, the text in a text input doesn't exist -- the text input is a replaced element. So CSS doesn't apply to it. I don't think we should change that.
Comment 7•19 years ago
|
||
However, CSS3 explicitly say: "This also applies, for example, to selected text within an editable text field." http://www.w3.org/TR/2001/CR-css3-selectors-20011113/#UIfragments
Comment 8•19 years ago
|
||
That requirement cannot be fulfilled, in general.
Comment 9•19 years ago
|
||
Not working in html:textarea is bug 183646.
Updated•15 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•