Motivation
TWikiVariables and a few other topics in the system web have a div tag surrounding
%TOC%
specifying style directly:
<div style="float:right; background-color:#EBEEF0; margin:0 0 -3em 20px; padding: 0 10px 0 10px;">%TOC{title="Contents:"}%</div>
The style specification may not be suitable for other skins than the topmenu-pattern skin combo.
Description and Documentation
Original design
- Introduce the class parameter to %TOC%.
- Replace the direct style specification as shown above with
%TOC{title="Contents:" class="twikiToc twikiTocFloat"}%
- Add a definition of the twikiTocFloat class to style sheets
Revised design
It turned out that the above design does not work.
Simply having ".twikiTocFloat {float:right; background-color:#EBEEF0; margin:0 0 20px 20px; padding: 0 10px 0 10px;}" in style.css of the pattern skin and then having <div class="twikiToc twikiTocFloat"> in place of <div class="twikiToc"> don't yield the same result as now.
This is because what you can do with a nested div is broader than you can do with a single div.
As such, here's the revised design
- put ".twikiTocFloat {float:right; margin:0 0 20px 20px; padding: 0 10px 0 10px;}" in style.css and put ".twikiTocFloat {background-color:#EBEEF0;}" in colors.css
- replace
<div style="float:right; background-color:#EBEEF0; margin:0 0 -3em 20px; padding: 0 10px 0 10px;">
with <div class="twikiTocFloat">
Examples
Impact
Implementation
--
Contributors: Hideyo Imazu - 2015-09-16
Discussion
Makes sense!
--
Peter Thoeny - 2015-09-16