Closed Bug 192084 Opened 22 years ago Closed 21 years ago

cannot assign multiple classes to elements

Categories

(SeaMonkey :: Composer, defect)

defect
Not set
minor

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: bugs+mozilla, Assigned: neil)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030201
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030201

Composer doesn't allow the user to set more than one class for the same element.
The "Advanced Property Editor" window eats the spaces on the "Value" field if
the "class" attribute is selected.

I think this is a very-easy-to-solve problem, and will help me a lot.

Reproducible: Always

Steps to Reproduce:
1. Open composer (Ctrl-Shift-N)
2. Right-click on <body> element on status bar, select "Advanced Properties"
3. Select "class" on "Attribute" field ("HTML Attributes" tab)
4. Write two words separated by a whitespace on the "Value" field.

Actual Results:  
The space is removed, and the two words are joined.

Expected Results:  
The two class names not being joined.

From:
    http://www.w3.org/TR/html4/struct/global.html#h-7.5.2

7.5.2 Element identifiers: the id and class attributes
(...)
class = cdata-list [CS]
    This attribute assigns a class name or set of class names
    to an element. Any number of elements may be assigned the
    same class name or names. Multiple class names must be
    separated by white space characters.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Currently composer is limiting a class (name) as it does for an id, disallowing
any punctuation including spaces. What (if any) rules should a class name have?
This is ok for id, because an element should have at most one single id, and it
should be unique for the entire document. An element can have as many classes as
needed, separated by spaces, inside the class attribute. Any other punctuation
should be disallowed.

If you change the class attribute manually (editing the HTML code), Composer
renders it OK.
Attached patch Proposed patchSplinter Review
Removes all restrictions on class attribute.
Attachment #114333 - Flags: superreview?(sfraser)
Attachment #114333 - Flags: review?(glazman)
Comment on attachment 114333 [details] [diff] [review]
Proposed patch

Absolutely.
r=glazman
Attachment #114333 - Flags: review?(glazman) → review+
-->Neil since it's his patch
Assignee: composer → neil
Comment on attachment 114333 [details] [diff] [review]
Proposed patch

sr=kin@netsape.com
Attachment #114333 - Flags: superreview?(sfraser) → superreview+
Fix checked in.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Verified in the 2003-05-09-08 Macho trunk build.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: