Module n.blocks

Part of nevow View Source

Easy to use box layout model. Works cross-browser on IE 6, Safari, Opera, and Mozilla (using Evil Hack(tm)). Until a known bug in Mozilla is fixed, the Evil Hack will be in place. This evil hack prevents text inside of a Block from being selected. Example:
 text = "Hello lots of text " * 20

 line(width='100%')[
   box(width='50%')[text],
   box(width='50%')[text]]
 # Note there is a mozilla bug right now where the second, flowing percentage is calculated using only
 # the empty space, so the second value here would have to be 100%; This module will soon add browser
 # sniffing to detect if mozilla is being used and adjust percentages accordingly. For now, use pixel, em, or
 # point values instead.
Experimental feature: Keyword arguments to the line and box protos are converted into css styles: box(color='red') => <span style="color: red" />

Known Mozilla bugs

If you use border, padding, or margin, mozilla shows weird rendering artifacts. background color and background images generally appear to be safe.

It doesn't appear to be possible to set the vertical-align in some cases in mozilla.
Line # Kind Name Docs
150 Class collapser Render a fragment of html with a head and a body.
API Documentation for Nevow, generated by pydoctor.