Closed Bug 193657 Opened 22 years ago Closed 11 years ago

[standards]should style attribute syntax accept braces ({}) around value?

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
minor

Tracking

()

RESOLVED INVALID

People

(Reporter: g.credland, Unassigned)

References

()

Details

(Whiteboard: CSSWG)

Attachments

(2 files, 1 obsolete file)

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; .NET CLR 1.0.3705)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3b) Gecko/20030210

If you apply an inline syle="{border-style:none; }" against an image, the image
still has a border. If you define the same style in the header section of the 
page against the IMG tag, then it is applied.

Reproducible: Always

Steps to Reproduce:
1.Create an anchor with an IMG tag and a link to a URL
2.Set syle="{border-style:none; }" against the IMG tag
3.Click the image, then back to the original page.
Actual Results:  
The image has a border when it shouldn't.

Expected Results:  
The image shouldn't have a border. Mozilla behaves correctly when the style is 
defined in the header section.

The bug occurs in both 1.3a and 1.3b on both Windows 2000 and XP Professional.
(Not tried any other versions). Also present in Netscape 7.01.

IE6 and Opera browsers exhibit correct behaviour.
I'm not seeing the problem you describe with that testcase (linux trunk build
2003-02-11-08).  Are you seeing the problem with it?  If not, could you attach a
testcase that _does_ show the problem?
>syle="{border-style:none; }"

Is the t missing just in your bug report, or also in the actual page?
I see the "t" in style, but I don't the border show up
when I return to this test.  I even modified the test
so that there were 2 (of the same) images, one with 
a border and one without and at no point did I ever see
the one without the border get a border put onto i.
Sorry, I made a typo in the bug report.

See page:
http://rhino.shef.ac.uk:3001/gc-home/border.html

The buttons at the bottom of the web page have the inline style, which is
ignored. It turns out that this only happens when the external stylesheet
is linked in, although the external stylesheet doesn't have any styles
applied to IMG tags.

Thanks for the speedy response!
It isn't the external CSS document, it was the
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
that was in the original site but NOT in your testcase.
Here is an updated testcase the exhibits the problem.
NOTE: if you remove the DOCTYPE line, everything is fine.
Attachment #114642 - Attachment is obsolete: true
The new testcase doesn't exhibit the problem for me. No border is displayed
on either Mozilla 1.3b or Netscape 7.01. I'm confused.

I get the problem when the external CSS file is linked, but not if I remove
the link to the file.(when using the sample at 
http://rhino.shef.ac.uk:3001/gc-home/border.html)


This is a CSS parsing issue (we accept the braces in quirks mode, even though
they're technically incorrect, at least by some interpretations).  I have no
idea why it's sitting around in the Image:Layout component.
Assignee: jdunn → dbaron
Component: Image: Layout → Style System
QA Contact: tpreston → ian
That page is in standards mode, so dropping those inline style rules is the
right thing to do....   What's the bug?  ;)
There are questions about what's correct according to the spec.  We should
probably find the other bug on this and mark as duplicate.
The only bug in "Style system" I can find on this (searched on "brace" in the
comments) is bug 99554
George Creland, are you satisfied this bug was not an issue?
As previous posters noted, removing the {} from the inline style rule, or
dropping the strict DOCTYPE/using a quirks DOCTYPE make the page show as
you expected.
The granddaddy of all bugs about inline styles containing braces appears to be
Bug 99554.
The confusion is caused by both IE6 and Opera accepting the braces
with strict doctype.

Removing the braces fixes the problem, so I'm happy to do that. Please
close this down.

Thanks for looking into it.

I've ran through the source using Mozilla DOM and it seems to apply two styles
to the A tag.  One for the A tag and one for the IMG tag.  The A tag gets the
A:link which is underlined and the IMG gets the 'A:link IMG' rather than
replacing it.

This seems to happen with Opera 7, but I can't see how this should be the case
as you can then never have borders for text and a different border for images.
That testcase has nothing to do with this bug.  Please file a separate bug on it
if you feel there is a problem there.
Marking invalid per reporter's comment 14.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
I want this open.  See comment 10.
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Whiteboard: CSSWG
Depends on: 201137
OS: Windows 2000 → All
Hardware: PC → All
Isn't this just a duplicate of the bug this depends on?
No, it's not.  That one is about a lot more functionality that this one.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Inline style="{border-style:none; }" doesn't work on images, but does work when applied indirectly → [standards]should style attribute syntax accept braces around value?
Summary: [standards]should style attribute syntax accept braces around value? → [standards]should style attribute syntax accept braces ({}) around value?
*** Bug 307785 has been marked as a duplicate of this bug. ***
Assignee: dbaron → nobody
QA Contact: ian → style-system
I think <http://www.w3.org/TR/css-style-attr/> makes it clear braces shouldn't be accepted. Invalid?
Yes, and bug 915053 covers removing the quirks mode behavior as well.
Status: NEW → RESOLVED
Closed: 21 years ago11 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: