Overflow StyleSheetLayout Technique - a questions

14 views
Skip to first unread message

wolfgang

unread,
Sep 19, 2007, 4:20:15 PM9/19/07
to TiddlyWiki
Dear FND,

I tried your overflow technique for the Layout of a TW described at
http://groups.google.at/group/TiddlyWikiDev
(http://groups.google.at/group/TiddlyWikiDev/browse_thread/thread/
b55011665c5e04d9/2ee6414d098a625c#2ee6414d098a625c). Because trying to
adjust the side bar margins always gets me frustrated - and starting
anew already many times.

However, I've been surprised that I actually had to import the whole
StyleSheetLayout tiddler from http://cleanlayout.tiddlyspot.com/ - to
have it not blundly overlap the sidebars. I always thought one only
had to add only the required changes to the StyleSheetLayout, to
override the shadow tiddlers setting. In this case:

#mainMenu {float:left; width:10em; text-align:right; line-height:
1.6em; padding:1.5em 0.5em 0.5em 0.5em; font-size:1.1em;}
#sidebar {float:right; margin-right:3px; width:16em; font-size:.9em;}
#displayArea {display: inline-block;} /* IE bugfix: give layout
(hasLayout = true) */
#displayArea {display: block; /* restore proper behavior (see IE
bugfix above) */ overflow: hidden;margin:1em 1em 0;}

So I must have totally wrong with my assumptions?

Now my question:

How I actually get the toggling mechanism going - as exemplified in
your proof of concept?:

http://www.tiddlytools.com/#Welcome

Regards,

W.

FND

unread,
Sep 20, 2007, 7:16:23 AM9/20/07
to Tiddl...@googlegroups.com
> However, I've been surprised that I actually had to import the whole
> StyleSheetLayout tiddler [...] I always thought one only

> had to add only the required changes to the StyleSheetLayout, to
> override the shadow tiddlers setting.

Well, first of all, if you modify a shadow tiddler, you actually
override the entire default contents - i.e. the default contents are not
merged with your modifications (otherwise you could never get rid of
GettingStarted in preset DefaultTiddlers, for example).

Also, you should generally not edit the default StyleSheet shadow
tiddlers (StyleSheetColors, StyleSheetLayout and StyleSheetPrint); using
StyleSheet instead is more future- and upgrade-proof.
The reason I chose to edit StyleSheetLayout in my proof of concept is
that I was proposing a core change of the StyleSheetLayout shadow tiddler.

Anyway, in order to enable you to adopt these changes, I've created a
StyleSheet tiddler with the necessary changes for you to import:
http://cleanlayout.tiddlyspot.com/#StyleSheet
Please let me know if you encounter any issues.


-- F.

Message has been deleted

FND

unread,
Sep 21, 2007, 9:45:08 AM9/21/07
to Tiddl...@googlegroups.com
> the issues I am encountering are quite a few

Well, that was to be expected.
The problem obviously are the toggling plugins - fixing that would be
rather easy in theory (just style the respective sidebar element as
"display: none;"), but you never know what might pop up.
Also, I'm pretty much swamped at the moment (it's all Osmosoft's fault),
so I can't look into that right now.

Any other issues you've notied, apart from the squished display area?


-- F.

wolfgang

unread,
Sep 21, 2007, 3:19:26 PM9/21/07
to TiddlyWiki
Thanks for your reply. I didn't went much further with testing, since
I've found myself completely overstrained in finding a solution for
the squished displays. In fact, I very soon gave up on that, because
of busyness with other things too. But once I find some time to test
it further - I'll happily let you know.

Regards,

W.

FND

unread,
Sep 22, 2007, 4:24:52 PM9/22/07
to Tiddl...@googlegroups.com
> Thanks for your reply. I didn't went much further with testing, since
> I've found myself completely overstrained in finding a solution for
> the squished displays.

I've created a macro that plays nicely with the overflow technique:
http://devpad.tiddlyspot.com/#ToggleElementPlugin
(The overflow technique makes this macro much simpler than the existing
toggle macros/plugins/scripts, as I don't have to "manually" adjust the
display area.)

You can see it in action here:
http://cleanlayout.tiddlyspot.com/#FlexibilityTest

Let me know whether this works for you.


-- F.

wolfgang

unread,
Sep 23, 2007, 6:49:56 PM9/23/07
to TiddlyWiki
That's really brilliant - and I personally consider this a worthwhile
change to the default TiddlyWiki core layout.

Making the MainMenu automatically fit the width of its content will in
future save me a lot of nerves (.. only drag and drop for adjusting
sidebar widths would still be a iota better.. ;-)

At the moment I was trying to come to grip with a TW with the TWkd-
layout - with sidebars reaching far into the header area - but this
seem to work only with absolute positioning. - However, maybe you
would know how to go about with a TWkd and overflow positioned
sidebars?
(http://yann.perrin.googlepages.com/twkd.html)

Beside the above, I didn't encounter problems with other plugins
tested. Only too many Tabs by TiddlerBarPlugin
(http://visualtw.ouvaton.org/VisualTW.html) seem to disappear behind
the SideBar. And I guess that could be easily fixed with proper
positioning within the page template.

Anyway, many thanks for this one,

W.

schilke

unread,
Sep 24, 2007, 3:54:42 AM9/24/07
to TiddlyWiki
> You can see it in action here:
> http://cleanlayout.tiddlyspot.com/#FlexibilityTest

I just thought, your rating should be boosted a bit ;)
That's a nice one - and yes: a core candidate - definitely...

--
schilke

FND

unread,
Sep 24, 2007, 7:42:12 AM9/24/07
to Tiddl...@googlegroups.com
> At the moment I was trying to come to grip with a TW with the TWkd-
> layout - with sidebars reaching far into the header area - but this
> seem to work only with absolute positioning.

I'm not sure what you mean there; are you referring to the buttons in the header ("Blog", "Agenda" and "Contenu") to toggle the sidebar contents?
For those, it's okay to use absolute positioning to place them at the bottom of the header.
Layout-wise, I don't see any sidebars reaching into the header area... !?

> too many Tabs by TiddlerBarPlugin [...] seem to disappear behind


> the SideBar. And I guess that could be easily fixed with proper
> positioning within the page template.

Without having seen this, I would guess that's due to the TiddlersBar container not being inside the display area.
Try adding this to your StyleSheet:
#tiddlersBar { overflow: hidden; }

HTH.


-- F.
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

FND

unread,
Sep 24, 2007, 8:25:05 AM9/24/07
to Tiddl...@googlegroups.com
> I just thought, your rating should be boosted a bit ;)

My rating? ... Oh, of my Google Groups profile?!
That's kind of you, but I've never actually taken a look at that (I rarely use the Google Groups web interface, as I prefer having the messages delivered to my inbox).
Also, you should be aware that misleading people by telling them I wasn't a horrible person could be considered trolling... ;)

> That's a nice one - and yes: a core candidate - definitely

We've discussed the UI situation with PhilH last week, and there's something beautiful in the pipeline.
However, there's still a number of issues to sort out, so don't hold your breath for now...


-- F.
--
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger

schilke

unread,
Sep 24, 2007, 10:02:24 AM9/24/07
to TiddlyWiki
> I rarely use the Google Groups web interface, as I prefer having the
> messages delivered to my inbox

I know, else we would miss your provider's offers - what would
definitely be a loss ;)

> misleading people by telling them I wasn't a horrible person could be
> considered trolling... ;)

caught - damn :-/

> However, there's still a number of issues to sort out, so don't hold
> your breath for now...

I know - there are all those fantastic features - but in the end I
would like to see a reduction of the core first. That's what I would
really fight for - everything else might be discussed :-7

--
schilke

FND

unread,
Sep 24, 2007, 10:51:58 AM9/24/07
to Tiddl...@googlegroups.com
> I know, else we would miss your provider's offers - what would
> definitely be a loss ;)

I know; I hate having to use their web interface (which is when they
attach those stupid ads), but sometimes there's just no way around that...

> I know - there are all those fantastic features - but in the end I
> would like to see a reduction of the core first. That's what I would
> really fight for - everything else might be discussed :-7

Luckily, this UI stuff is largely independent of the core modularization
(which is already underway, from what I can tell).


-- F.

Message has been deleted

schilke

unread,
Sep 24, 2007, 5:30:35 PM9/24/07
to TiddlyWiki
FOA: Sorry for hijacking the thread (and the topic, too LOL)

> I know; I hate having to use their web interface (which is when they
> attach those stupid ads), but sometimes there's just no way around
> that...

use Google Mail ;) (you could also send messages with your GMX address
as originator...)

...


> the core modularization
> (which is already underway, from what I can tell)

good to hear.

--
schilke

FND

unread,
Sep 24, 2007, 6:25:12 PM9/24/07
to Tiddl...@googlegroups.com
> Sorry for hijacking the thread (and the topic, too LOL)

Actually, changing the topic made it much more bearable IMO.
(I'll change it back when I respond to wolfgang's on-topic posting,
tomorrow-ish.)

> use Google Mail ;) (you could also send messages with your GMX address
> as originator...)

Meh!
I'd tried GMail a while back, didn't like it a lot.
Thunderbird makes me feel much more in control (e.g. I just did some
editing of a few plain-text files tweak my profile).
Nevertheless, I might give GMail another chance when they roll out v2.0,
because having it all server-side obviously does have its advantages...

>> the core modularization
>> (which is already underway, from what I can tell)
>
> good to hear.

Disclaimer: I am not an official source.


-- F.

schilke

unread,
Sep 24, 2007, 7:25:06 PM9/24/07
to TiddlyWiki
> Nevertheless, I might give GMail another chance when they roll out
> v2.0, because having it all server-side obviously does have its
> advantages...

it does - but you could also catch all your email by POP at any time
with Google Mail.
>From my point of view it doesn't matter if your emails are on a server
for some milliseconds or years - as long as you've got copies of the
important stuff.
The privacy (or security) concerns could only be (fully) eliminated by
using your own mail server (plus own machine physically located at
your house and a trusted provider).

I use GMail from near the beginning now (and started handling all
email accounts by GMail soon) - the best thing about it: following my
experiences (and I could tell a lot) Google has been the most reliable
mail service provider (regarding up-/downtime and speed). But I don't
earn money on it - so I won't guarantee anything ;)

--
schilke

wolfgang

unread,
Sep 25, 2007, 12:00:49 AM9/25/07
to TiddlyWiki
On 25 Sep., 00:25, FND <Ace_No...@gmx.net> wrote:
> ...

> Actually, changing the topic made it much more bearable IMO.
> (I'll change it back when I respond to wolfgang's on-topic posting,
> tomorrow-ish.)...
>
> -- F.

... didn't meant it so serious at all. ;-)

However, in this case I'm gladdened too, schilke lighted it up that
bid.


> But as I said - I am happy that overflow already works so nice
> with usual layouts, and ...

W.

FND

unread,
Sep 28, 2007, 3:33:53 PM9/28/07
to Tiddl...@googlegroups.com
> But as I said - I am happy that overflow already works so nice with
> usual layouts, and TWkd is really a very special case :-)

Yeah, it really is; there are too many customizations/tweaks/hacks to
provide an easy solution here.
Also remember that the whole overflow thing is still (more or less)
experimental anyway...


-- F.

wolfgang

unread,
Nov 9, 2007, 4:23:21 AM11/9/07
to TiddlyWiki
I really like the MainMenu adapting itself to a variable width. But
could there somehow also be the option for a maxmal width?

Regards,

W.

On 28 Sep., 20:33, FND <Ace_No...@gmx.net> wrote:
> > But as I said - I am happy thatoverflowalready works so nice with


> > usual layouts, and TWkd is really a very special case :-)
>
> Yeah, it really is; there are too many customizations/tweaks/hacks to
> provide an easy solution here.

> Also remember that the wholeoverflowthing is still (more or less)
> experimental anyway...
>
> -- F.

FND

unread,
Nov 9, 2007, 6:14:03 AM11/9/07
to Tiddl...@googlegroups.com
> I really like the MainMenu adapting itself to a variable width. But
> could there somehow also be the option for a maxmal width?

Well, yes and no.
In theory, something like this would work:
#mainMenu {
max-width: 15em;
}
However, the max-width property is not supported[1] by Internet Explorer
below version 7.
There are hacks[2], but they're messy.


-- F.


[1] http://tinyurl.com/2hpadm
(http://www.webdevout.net/browser-support-css#support-css2propsbasic-maxwidth)
[2] e.g. http://www.doxdesk.com/software/js/minmax.htm or
http://www.webreference.com/programming/min-width/

wolfgang

unread,
Nov 9, 2007, 2:51:45 PM11/9/07
to TiddlyWiki
Thanks for the quick reply. It works perfectly.

Can't help IE with it's shortcomings.

Regards,

W.

On 9 Nov., 12:14, FND <Ace_No...@gmx.net> wrote:
> > I really like the MainMenu adapting itself to a variable width. But
> > could there somehow also be the option for a maxmal width?
>
> Well, yes and no.
> In theory, something like this would work:
> #mainMenu {
> max-width: 15em;
> }
> However, the max-width property is not supported[1] by Internet Explorer
> below version 7.
> There are hacks[2], but they're messy.
>
> -- F.
>
> [1]http://tinyurl.com/2hpadm

> (http://www.webdevout.net/browser-support-css#support-css2propsbasic-m...)
> [2] e.g.http://www.doxdesk.com/software/js/minmax.htmor
> http://www.webreference.com/programming/min-width/

wolfgang

unread,
Nov 10, 2007, 7:37:16 PM11/10/07
to TiddlyWiki
A further question:

Does ToggleElementPlugin of http://cleanlayout.tiddlyspot.com/ already
provide a way to have, for example, the right SideBar closed by
default?

W.

FND

unread,
Nov 11, 2007, 3:28:24 AM11/11/07
to Tiddl...@googlegroups.com
> Does ToggleElementPlugin of http://cleanlayout.tiddlyspot.com/ already
> provide a way to have, for example, the right SideBar closed by
> default?

I have updated (and renamed) the plugin/macro to include a parameter for
the startup mode:
http://cleanlayout.tiddlyspot.com/#ToggleElementMacro
So you can now use something like
<<toggleElement "" "" "" "" "" "hide">>
to hide the respective element on startup.

However, the macro has to be rendered on startup for this to work. So
put the macro call into one of the DefaultTiddlers, one of the sidebars,
or maybe even into the header (the resulting button could always be
hidden using a custom class and "display: none;").

Thanks for the suggestion.


-- F.

wolfgang

unread,
Nov 13, 2007, 12:41:53 AM11/13/07
to TiddlyWiki
Great, thanks for the timely update.

Regards,

W.

On 11 Nov., 09:28, FND <Ace_No...@gmx.net> wrote:
> > Does ToggleElementPlugin ofhttp://cleanlayout.tiddlyspot.com/already

FND

unread,
Dec 1, 2007, 4:38:17 AM12/1/07
to Tiddl...@googlegroups.com
> However, the max-width property is not supported by Internet Explorer
> below version 7. There are hacks, but they're messy.

I forgot to mention the simplest solution - using IE expressions:
#mainMenu {
max-width: 400px;
}
* html #mainMenu { /* IE6 */
width: expression(this.clientWidth > 400 ? 400 : auto);
}
*:first-child+html #mainMenu { /* IE7 */
width: expression(this.clientWidth > 400 ? 400 : auto);
}
However, these expression work only with pixels, not any other units
(e.g. "em" or "%"), which kinda limits its appeal.


-- F.

wolfgang

unread,
Dec 3, 2007, 12:24:43 PM12/3/07
to TiddlyWiki
I see - thanks for this latest IE hack. so I also will able to use the
overflow layout with public TiddlyWikis. :-)

Regards,

W.

FND

unread,
Dec 10, 2007, 4:29:11 AM12/10/07
to Tiddl...@googlegroups.com
> I forgot to mention the simplest solution - using IE expressions

Sorry, I made a little mistake there; IE7 does support the max-width
property[1], so you can remove these three lines:

> *:first-child+html #mainMenu { /* IE7 */
> width: expression(this.clientWidth > 400 ? 400 : auto);
> }

By the way: The problem with using IE expressions is that that they're
evaluated whenever the mouse moves[2], which can result in performance
degradation.


-- F.


[1] cf. http://tinyurl.com/2kgzvm
(http://www.webdevout.net/browser-support-css#support-css2propsbasic-minwidth)
[2] cf. http://tinyurl.com/39h8av
(http://developer.yahoo.net/blog/archives/2007/07/high_performanc_6.html)

Reply all
Reply to author
Forward
0 new messages