I've discovered that CSS styles that are indented with 3 spaces "disappear". Two spaces works.
Co-worker theorizes that "since three leading spaces are significant to TWiki as a potential bulleted or numbered list, I think it’s anticipating the indentation as a list set-off and 'loses it' thereafter." It's certainly possible.
In any case, this code
<style>
pre
{
white-space: pre-wrap; /* css-3 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
}
</style>
shows up as
pre {
}
in the Firefox "Firebug" debugger. (And, therefore, the code inside the pre-block is absent and not used.)
Whereas this code
<style>
pre
{
white-space: pre-wrap; /* css-3 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
}
</style>
differing only in number of initial spaces, shows up as
pre {
white-space:pre-wrap;
}
in Firebug.
--
TWiki:Main/VickiBrown - 29 Mar 2010
Look at the raw HTML TWiki generates. I suspect that it creates a definition list.
Workaround: Put your style section in HTML-commented pre-tags such as:
<!-- <pre> -->
<style>
pre
{
white-space: pre-wrap; /* css-3 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
}
</style>
<!-- </pre> -->
I set this as "no action required" but we will update the docs to more explicit on how to embed CSS and JavaScript in TWiki pages.
--
TWiki:Main.PeterThoeny - 29 Mar 2010
TextFormattingRules and
UsingHTML is now updated with better docs on using CSS and JavaScript.
TWikirev:18407 and
TWikirev:18408.
--
TWiki:Main.PeterThoeny - 30 Mar 2010