• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item6412: TWiki is confused by 3-space indent within CSS style tags

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal No Action Required   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

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

ItemTemplate
Summary TWiki is confused by 3-space indent within CSS style tags
ReportedBy TWiki:Main.VickiBrown
Codebase ~twiki4
SVN Range TWiki-5.0.0, Fri, 19 Mar 2010, build 18391
AppliesTo Engine
Component

Priority Normal
CurrentState No Action Required
WaitingFor

Checkins

TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r3 - 2010-03-30 - PeterThoeny
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback