Ticket #9127 (new Bug)
Stylesheet registry (portal_css) handles css files with leading Unicode BOM incorrectly (workaround included)
| Reported by: | kleist | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 3.3.x |
| Component: | Infrastructure | Keywords: | |
| Cc: |
Description
Plone 3.2.2
I've spent uncountable hours with this quite subtle issue, sometimes doubting my understanding of css, and sometimes my general mental health...
This article really says it all:
(ín its first sentence "Every Unicode string starts with a zero-width no-break space", "string" should of course be "file".)
I've encountered exactly the described symptom: The first rule in every css file was ignored, unless checkmarking "Debug/Development mode" in portal_css. In my case, I'm creating the css files with "Microsoft Expression Web". This program adds a BOM at the start of every file, which is perfectly fine according to the Unicode standard ( http://unicode.org/faq/utf_bom.html#bom5).
I could work around the issue by beginning each css file with a dummy rule:
.workaround-bug-in-plone-portal_css {
}
Attachments
Change History
Changed 2 years ago by kleist
-
attachment
utf8-bom-merge.txt
added
comment:1 Changed 18 months ago by kleist
Here a MSDN document about "Microsoft Expression Web" and BOM: http://msdn.microsoft.com/en-us/library/cc295463.aspx

Snapshot of article text explaining the issue