#9486 closed enhancement (fixed)
Scripts and stylesheets should not have an ID
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 2.8 | Priority: | low |
| Severity: | minor | Version: | 2.8 |
| Component: | JavaScript | Keywords: | has-patch tested commit |
| Focuses: | Cc: |
Description
Just noticed on my dev site (2.8), things like this in the page's head section:
<link rel='stylesheet' id='myscript' ....
It was inserted using wp_print_styles().
Some browsers (and validators) will complain if the same ID is used further down in the actual content, and this can cause scripts to ultimately fail. Are there any good reasons for these IDs to be set?
Attachments (2)
Change History (6)
#1
@
17 years ago
- Priority changed from high to low
- Severity changed from major to minor
- Type changed from defect (bug) to enhancement
#2
@
17 years ago
- Keywords has-patch tested commit added
have it whichever way you prefer, both patches are attached
Note: See
TracTickets for help on using
tickets.
You mean the IDs on the <link> elements in the head? No, they aren't used currently by default but would allow for some nice "css tricks" by dynamically switching stylesheets on and off, like changing the typeface, font size, or even the whole color scheme. They will probably be used in the future, better to have them in place.
Don't think there are any HTML ID conflicts in the admin. Can probably change these IDs to include "-css" at the end just in case.