cannot assign multiple classes to elements

VERIFIED FIXED

Status

SeaMonkey
Composer
--
minor
VERIFIED FIXED
16 years ago
14 years ago

People

(Reporter: Juliano F. Ravasi, Assigned: neil@parkwaycc.co.uk)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

16 years ago
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
(Assignee)

Comment 1

16 years ago
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?
(Reporter)

Comment 2

16 years ago
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.
(Assignee)

Comment 3

16 years ago
Created attachment 114333 [details] [diff] [review]
Proposed patch

Removes all restrictions on class attribute.
(Assignee)

Updated

16 years ago
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+

Comment 5

16 years ago
-->Neil since it's his patch
Assignee: composer → neil

Comment 6

15 years ago
Comment on attachment 114333 [details] [diff] [review]
Proposed patch

sr=kin@netsape.com
Attachment #114333 - Flags: superreview?(sfraser) → superreview+
(Assignee)

Comment 7

15 years ago
Fix checked in.
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED

Comment 8

15 years ago
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.