Closed Bug 219417 Opened 21 years ago Closed 15 years ago

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

Categories

(Core :: Layout: Form Controls, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: guym, Unassigned)

References

()

Details

(4 keywords)

Attachments

(1 file)

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.
Just a note, still present in 1.7rc1.
Here is a testcase.
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.
Keywords: css2, css3, testcase
Keywords: qawanted
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
Closed: 20 years ago
Resolution: --- → DUPLICATE
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 → ---
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
Closed: 20 years ago15 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: