optgroup doesn't display label with CSS :before pseudo-element content

RESOLVED INVALID

Status

()

Core
Layout: Form Controls
RESOLVED INVALID
15 years ago
4 years ago

People

(Reporter: Guy McArthur, Unassigned)

Tracking

(Depends on: 1 bug, 4 keywords)

Trunk
css2, css3, qawanted, testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5b) Gecko/20030916
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5b) Gecko/20030916

Using the CSS :before pseudo-element to insert some content before an optgroup
element causes the label to not be displayed.

E.g. 
optgroup:before { content: " [+] "; }

The content can be text or an image from a url.
Presumably, this is a problem with :after also, though I haven't tried that.

Reproducible: Always

Steps to Reproduce:




Expected Results:  
Display label after psuedo-element content.
-> form controls
Assignee: other → form
Component: Layout → Layout: Form Controls
jkeiser, where exactly do we get the optgroup labels.
(Reporter)

Comment 3

14 years ago
Just a note, still present in 1.7rc1.
(Reporter)

Comment 4

14 years ago
Created attachment 147772 [details]
testcase for optgroup css3 content bug

Here is a testcase.

Comment 5

14 years ago
Ok, as it seems Mozilla implementd OPTGROUP as:

  optgroup[label]::before{
   content:attr(label);
  }

You overwrite that and obviously, it won't display the text anymore. So until
bug 215083 is fixed, we will have this problem.

Once it is fixed however, OPTGROUP becomes "some kind of" replaced element and
both '::before' and '::after' won't apply anymore, since they are children of
the element.

So, in the end, this would be INVALID I assume.
Depends on: 215083
Keywords: css2, css3, testcase

Updated

14 years ago
Keywords: qawanted

Comment 6

14 years ago
duping just to ensure that the bug when fixed marks this as fixed if this is
still open.



*** This bug has been marked as a duplicate of 215083 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → DUPLICATE

Comment 7

14 years ago
Marking re-opened now: since the problem is very real, we should allow real
*content* to sink through on a :before ::before of the element.

The fact that we do it the way we currently do as a quick "hey it works" thing
is not enough to mark invalid, imo.

It may be possible to code a `hack` (as much as I hate them) to fix this bug
before the dupe is fixed, if someone wants to, its `Open` for it, otherwise, the
bug I had duped of, is a good solution.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---

Comment 8

14 years ago
correctly moving to new, grr ;-)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: optgroup doesn't display label with CSS :before psuedo-element content → optgroup doesn't display label with CSS :before pseudo-element content
So...  I'm with comment 5 here.  Not a bug.
Status: NEW → RESOLVED
Last Resolved: 14 years ago9 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.