Opened 19 years ago
Closed 18 years ago
#1802 closed defect (bug) (wontfix)
Underscores not valid in CSS class/id names
Reported by: | dougal | Owned by: | rob1n |
---|---|---|---|
Milestone: | Priority: | low | |
Severity: | trivial | Version: | 1.6 |
Component: | Administration | Keywords: | css validation |
Focuses: | Cc: |
Description
We're generating class names like "current_page_item", which are invalid in CSS. The underscores should be replaced with dashes.
I'm flagging this for version 1.6, but this is present in the 1.5 codebase, too. So if we do another 1.5 point release (unlikely, though I know we considered it), we might as well patch it there, too.
Attachments (1)
Change History (12)
#1
@
19 years ago
underscores.txt was generated with this command:
$ grep -iRoE '(id|class)="[a-z]*_[a-z]*"' * | grep -o '".*"' | replace '"' '' | sort | uniq > underscores.txt
#4
@
19 years ago
http://developer.mozilla.org/en/docs/Underscores_in_class_and_ID_Names
Seems it's recommended not to use underscores.
#5
@
19 years ago
I wasn't aware that underscores were made valid in the errata. So I guess they're technically legal now. Considering the effort vs the impact, it may not be worth worrying about after all. Personally, I'll probably continue to use dashes in my class names, because it's a long-standing habit of mine now :)
#6
@
19 years ago
- Severity changed from normal to trivial
I'd still say we should follow devmo's guidelines, if anyone feels like patching this up that would be appreciated.
#8
@
19 years ago
I don't have the time to work on it. I accepted it when I seemed like I had time, but, alas, I have been busy for ages.
#11
@
18 years ago
- Milestone 2.2 deleted
- Resolution set to wontfix
- Status changed from assigned to closed
I'm going to close this as wontfix, actually. *Technically* underscores are allowed in CSS classes and ID's, and if we changed it now, we would break backwards compatibility a few times over. So it's not worth the effort.
List of all underscored class/id names